Authenticate users using Azure Active Directory.
Project description
Django Azure AD Auth Redux
Django Azure AD Auth allows you to authenticate through Azure Active Directory.
This fork has the following additional features:
- Add the specification of the decode algorithm per newer PyJWT requirements.
- Supports django > 3.2.18
Installation
Run pip install django-azure-ad-auth-redux
Add the AzureActiveDirectoryBackend
to your AUTHENTICATION_BACKENDS
setting:
AUTHENTICATION_BACKENDS = (
...
"azure_ad_auth.backends.AzureActiveDirectoryBackend",
)
Settings
AAD_TENANT_ID
The Azure Tenant ID. It can be found in the URL of the Azure Management Portal.
AAD_CLIENT_ID
The Azure Application Client ID.
AAD_AUTHORITY
default: "https://login.microsoftonline.com"
The domain that is used for authorization, the federation metadata document, and logging out.
AAD_SCOPE
default: "openid"
OAuth scope parameter.
AAD_RESPONSE_TYPE
default: "id_token"
Tells OAuth to return a JWT token in its response.
AAD_RESPONSE_MODE
default: "form_post"
Defines how the response parameters are returned. Valid choices are fragment
or form_post
.
AAD_USER_CREATION
default: True
Allow creation of new users after successful authentication.
AAD_USER_MAPPING
default: {}
Map fields from the token to the user, to be used on creation.
AAD_USER_STATIC_MAPPING
default: {}
Map static values to user fields on creation.
AAD_GROUP_MAPPING
default: {}
Map group ids to group names for user permissions.
Project details
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
File details
Details for the file django_azure_ad_auth_redux-1.5.23.tar.gz
.
File metadata
- Download URL: django_azure_ad_auth_redux-1.5.23.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 566ad50145c4fc73ff7499cfadd7b08b925bcb956c411cd87b4e2a411681a34e |
|
MD5 | 6f7fce99843ff3dc000f618814c19b3e |
|
BLAKE2b-256 | 632407ba1805ece161785da1df9e2f5c09d456629f10c676e4ba7dfcff7defeb |
File details
Details for the file django_azure_ad_auth_redux-1.5.23-py3-none-any.whl
.
File metadata
- Download URL: django_azure_ad_auth_redux-1.5.23-py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec7d049d1d55853103a041f348a58d76a65c065d06c34baf48c94068c6a0f42b |
|
MD5 | f22f4fde5d583539fde0c3273f18c5e1 |
|
BLAKE2b-256 | 8675a07c31ea8c5bafc106aa6f838386d6efe24bc2f1b6e1622a6320bb3d9cde |