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.24.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

File details

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

File metadata

  • Download URL: django_azure_ad_auth_redux-1.5.24.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.13 Linux/4.15.0-142-generic

File hashes

Hashes for django_azure_ad_auth_redux-1.5.24.tar.gz
Algorithm Hash digest
SHA256 e44481f6768196e7d882b421e8187e23971913f1d20e1d49eec8ea470b9b4f88
MD5 592abbda7604a1a859d7e8118b166d7f
BLAKE2b-256 26d2794f94aebb4c0fe2e4c57ebda07b175bde9abd4ec2f27f5780f0e41299c0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_azure_ad_auth_redux-1.5.24-py3-none-any.whl
Algorithm Hash digest
SHA256 a98f16f2e47aac1468c0c2a1956b78961611c9deede1514c68024789ba5f18e6
MD5 69cd1f6dd7d0384d9a150ddaba2d0a11
BLAKE2b-256 7ddbd790259b48049d21555f32797bc855c5be9373c70f82553e2fc383ae1651

See more details on using hashes here.

Supported by

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