Pre-release
This release is a pre-release and may not be stable for production use.
Swarmauri Auth IDP Azure AD
Azure Active Directory / Entra ID OAuth 2.0, OAuth 2.1, and OIDC 1.0 login flows packaged for Swarmauri deployments.
Features
- PKCE-enabled authorization URL generation with signed state payloads to protect verifiers.
- Token exchange helpers that return normalized identity details from Microsoft Graph.
- Built-in retrying HTTP client for resilient calls against Azure AD and Graph endpoints.
- ComponentBase-compatible models that register under
swarmauri.auth_idpentry points. - Support for both interactive browser logins and confidential client OIDC workflows.
Installation
pip
pip install swarmauri_auth_idp_azure
uv (project)
uv add swarmauri_auth_idp_azure
uv (environment)
uv pip install swarmauri_auth_idp_azure
Usage
from pydantic import SecretStr
from swarmauri_auth_idp_azure import AzureOAuth21Login
login = AzureOAuth21Login(
tenant="organizations",
client_id="00000000-0000-0000-0000-000000000000",
client_secret=SecretStr("client-secret"),
redirect_uri="https://app.example.com/auth/callback",
state_secret=b"azure-ad-state-key",
)
print(login.client_id)
Workflow Summary
- Call
auth_url()and redirect the browser to the returned Microsoft login URL. - Persist the
statetoken and compare it when handling the callback. - Exchange the authorization code via
exchange_and_identity()to obtain tokens and Graph profile data. - Persist the returned tokens or computed identity details for session and authorization workflows.
Entry Points
swarmauri.auth_idp:AzureOAuth20Loginswarmauri.auth_idp:AzureOAuth21Loginswarmauri.auth_idp:AzureOIDC10Login
Contributing
To contribute to swarmauri-sdk, review the guidelines for contributing which cover development workflow, testing, and coding standards.
Metadata
Release files for swarmauri_auth_idp_azure 0.11.0.dev2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| swarmauri_auth_idp_azure-0.11.0.dev2.tar.gz | 9.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| swarmauri_auth_idp_azure-0.11.0.dev2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.5 kB
Release files / swarmauri_auth_idp_azure-0.11.0.dev2.tar.gz
| Download URL | swarmauri_auth_idp_azure-0.11.0.dev2.tar.gz |
|---|---|
| Size | 9.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5a5cc6d92fc8d8bffaa6ce89997c2bc5629d40234776ab5bb2d65715b76aa326
|
|
BLAKE2b-256 checksum How to use checksums |
55f02a9b863986b4acba231f621d98ee438c937675cd443d37ed2b645b50279b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / swarmauri_auth_idp_azure-0.11.0.dev2-py3-none-any.whl
| Download URL | swarmauri_auth_idp_azure-0.11.0.dev2-py3-none-any.whl |
|---|---|
| Size | 12.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
99935478efa05f4a12582cbad4ddc306dc6053e1053859d324084bc23acffa45
|
|
BLAKE2b-256 checksum How to use checksums |
0748ac8d05578f251e7f17e40eed6cd43e5d662bc7af3de3d7c61b38e2fbf3b2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|