Pre-release
This release is a pre-release and may not be stable for production use.
Swarmauri Auth IDP AWS
AWS IAM Identity Center OAuth 2.0 / 2.1 logins packaged for Swarmauri deployments.
Features
- PKCE-enabled authorization URL generation with signed state payloads.
- Token exchange helpers that return normalized payloads for downstream services.
- Optional identity resolver that hydrates user details via AWS Identity Store.
- ComponentBase-compatible models that register under
swarmauri.auth_idpentry points. - Retry-aware HTTP client tuned for AWS IAM Identity Center endpoints.
Installation
pip
pip install swarmauri_auth_idp_aws
uv (project)
uv add swarmauri_auth_idp_aws
uv (environment)
uv pip install swarmauri_auth_idp_aws
Usage
import asyncio
from swarmauri_auth_idp_aws import AwsOAuth21Login
from pydantic import SecretStr
login = AwsOAuth21Login(
authorization_endpoint="https://example.awsapps.com/start/oauth2/authorize",
token_endpoint="https://example.awsapps.com/start/oauth2/token",
client_id="client-id",
client_secret=SecretStr("client-secret"),
redirect_uri="https://app.example.com/callback",
state_secret=b"aws-workforce-state-key",
)
async def flow() -> None:
auth = await login.auth_url()
# Redirect the user to auth["url"], then capture the returned code/state.
print(auth["url"])
asyncio.run(flow())
Workflow Summary
- Call
auth_url()and redirect the browser to the returned URL. - Persist the
stateand compare it when handling the callback. - Exchange the authorization code via
exchange_and_identity()to obtain tokens. - Optionally use
AwsIdentityResolverto enrich identity details for the session.
Entry Points
swarmauri.auth_idp:AwsOAuth20Loginswarmauri.auth_idp:AwsOAuth21Login
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_aws 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_aws-0.11.0.dev2.tar.gz | 8.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| swarmauri_auth_idp_aws-0.11.0.dev2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.4 kB
Release files / swarmauri_auth_idp_aws-0.11.0.dev2.tar.gz
| Download URL | swarmauri_auth_idp_aws-0.11.0.dev2.tar.gz |
|---|---|
| Size | 8.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5905a5e25b2dfa6a48bf58c4535184e02eeab4a0dcff25bd08a7e739893ffc45
|
|
BLAKE2b-256 checksum How to use checksums |
51fd8cb6272357b724c13bd05989b08628d0a186f20bdda065b2077454053172
|
| 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_aws-0.11.0.dev2-py3-none-any.whl
| Download URL | swarmauri_auth_idp_aws-0.11.0.dev2-py3-none-any.whl |
|---|---|
| Size | 10.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3552ca5ebb579bfd708018dfa3a0df928e0da4d69ab8e7482798ef2acdc63c49
|
|
BLAKE2b-256 checksum How to use checksums |
25bb61e58953ba1cf411eeac90c7b9c88135c5e0a49b2138348c243dd0629ab0
|
| 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}
|