Skip to main content

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

django_azure_ad_auth_redux-1.5.21.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_azure_ad_auth_redux-1.5.21-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file django_azure_ad_auth_redux-1.5.21.tar.gz.

File metadata

File hashes

Hashes for django_azure_ad_auth_redux-1.5.21.tar.gz
Algorithm Hash digest
SHA256 21659839e051f9e404bd9a6b6b1446d38a9af2c1cc6483564622d0af321f9b38
MD5 2840cbd270e46a22e52dfc3eb7ee8272
BLAKE2b-256 1e720e28a368809ca8909f37e5c9ce00868cc4c78bf884a746d84952703e5d52

See more details on using hashes here.

File details

Details for the file django_azure_ad_auth_redux-1.5.21-py3-none-any.whl.

File metadata

File hashes

Hashes for django_azure_ad_auth_redux-1.5.21-py3-none-any.whl
Algorithm Hash digest
SHA256 c99c8035e12ad217b53e881e70040400226bb60552346c907e89615b05acd079
MD5 3b68f325aa2d89c63171271381a15e59
BLAKE2b-256 eee89f2d5bc47a65c1462a4e6dc0842f2260ef86a507095f45df01360d9e0dfc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page