A simple Dingding auth Django app.
Project description
Dingo-Auth-Dingding
a dingding app auth django app. you should have follow this section to configure dingding app.
Quick start
- Add "polls" to your INSTALLED_APPS setting like this::
INSTALLED_APPS = [
...
'django_auth_dingding',
]
- Include the URLconf in your project urls.py like this::
path('dingding/', include("django_auth_dingding.urls")),
- Add ding_user_id field to User Model like this::
from django.contrib.auth.models import AbstractUser
class Users(AbstractUser):
...
ding_user_id = models.CharField("钉钉UserID", max_length=64, blank=True)
- Setting config in your django's settings.py like this::
INSTALLED_APPS += ("django_auth_dingding",)
AUTHENTICATION_BACKENDS = (
"django_auth_dingding.auth.DingdingAuthenticationBackend",
"django.contrib.auth.backends.ModelBackend",
)
DINGDING_AUTH_AUTHENTICATION_CALLBACK_URL = env("DINGDING_AUTH_AUTHENTICATION_CALLBACK_URL")
DINGDING_AUTH_APP_KEY = env("DINGDING_AUTH_APP_KEY")
DINGDING_AUTH_APP_SECRET = env("DINGDING_AUTH_APP_SECRET")
-
Run
python manage.py migrate
to Modify the User models. -
Browser visit
http://{host}:{port}/dingding/authenticate/
will redirect to dingding auth page
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for django_auth_dingding-0.0.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 61ea958a1170ae49acf8eb519750ef93de2f59e6ab2126515810b5bb3e834b5c |
|
MD5 | b9982f17542ebde2b466e7fa1827669f |
|
BLAKE2b-256 | d1fbacaf6acfda78225e9911229dabf48398e97840b371290ef6ea35fbdee062 |
Close
Hashes for django_auth_dingding-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c18b4392f358cf76ad90b947b30779f12f93a71e377f1b375312f272a0fb2de |
|
MD5 | 29148116d80247c2576b6401bc5a0822 |
|
BLAKE2b-256 | 70afeb004f3c6543984a241937dbfef1a14030dd54141170036dd896946d4df1 |