Skip to main content

Async Python SDK for validating Azure AD B2C access tokens

Project description

Azure AD B2C

Simplified Python SDK for verifying AD B2C-issued JWTs

Usage

import aad

token = "..." # JWT to verify
tenant = "..." # B2C tenant (as in `"{tenant}.b2clogin.com/{tenant}..."`)
app_id = "..." # ClientID of app registered in the B2C tenant
policy = "B2C_1_..." # policy (aka user flow) name

await aad.authorize(token, tenant, app_id, policy)
# {
#   "idp": "...",
#   "aud": "...",
#   ... # other JWT fields
#   ... # fields configured in B2C
# }

Disclaimer

Heavily inspired by azure-ad-verify-token, but with an async interface

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

aad-0.1.1-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file aad-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: aad-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for aad-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 31a66087e5105ca2f357a135f8f00a1a43bbc5bef9b9cbe7d110fc1d91b50850
MD5 ac748e873ce8dfd1974e28adcf1445a6
BLAKE2b-256 219ff0936ebee03ece96113514a871afdf97ff130838c9452a4a135751dbdd28

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