Current collected state Current
Observed since 20 Oct, 16:51 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
aad
Async Python SDK for validating Azure AD B2C access tokens
Simplified Python SDK for verifying AD B2C-issued JWTs
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
# }
pip install aad[fastapi]
from fastapi import FastAPI
import aad
Claims = aad.claims(tenant, app_id, policy)
app = FastAPI()
@app.get("...")
def get(claims: Claims):
...
The JWT decoding part is heavily inspired by azure-ad-verify-token, but with an async interface
Download counts and popularity will appear here as the collector receives them.
| Package / target | Requirement | Relationship |
|---|---|---|
aiohttpEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | aiohttp | runtime |
pydanticEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | pydantic | runtime |
pyjwtEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | pyjwt | runtime |
fastapiEnvironment{
"extras": "",
"marker": "extra == 'fastapi'",
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | fastapi ; extra == 'fastapi' | runtime |
bdist_wheel · 4.99 KB · Python py3
sdist · 4.13 KB · Python source
Observed since 20 Oct, 16:51 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:630ff3889a41afd468fc0858510cd7802da766e51caea6ccb59c4de1f737f45f