One Python authentication stack. Separate trust paths for people and machines.
litestar-auth 7 is the human-authentication layer in a coordinated three-package stack for
Python 3.12–3.14. It keeps browser sessions, workload credentials, and framework-neutral
coordination in explicit packages instead of mixing them behind one credential parser.
Choose the layer you need
| Package | Use it for | Install |
|---|---|---|
litestar-auth |
Registration, login, OAuth + PKCE, TOTP, roles, organizations, and opaque database or Redis sessions in Litestar | uv add litestar-auth |
authweave-core |
Typed principals, evidence, decisions, route policies, and fail-closed provider coordination | uv add authweave-core |
authweave-workload |
X.509 workload lifecycle, direct mTLS, and externally issued certificate-bound JWTs | uv add 'authweave-workload[mtls,jwt]' |
All three distributions use coordinated 7.x versions. The dependency direction stays one-way:
authweave-core
├── litestar-auth
└── authweave-workload
└── authweave-workload[litestar] → litestar-auth Extension SDK v2
Start with a secure human session
uv add litestar-auth aiosqlite
from uuid import UUID
from litestar import Litestar
from litestar_auth import DatabaseTokenAuthConfig, LitestarAuth, LitestarAuthConfig
config = LitestarAuthConfig(
database_token_auth=DatabaseTokenAuthConfig(
token_hash_secret=session_digest_secret,
),
csrf_secret=csrf_secret,
session_maker=session_maker,
user_model=User,
user_manager_class=UserManager,
user_db_factory=user_db_factory,
user_manager_security=user_manager_security,
)
app = Litestar(plugins=[LitestarAuth(config)])
The quickstart covers schema requirements and links the runnable
registration/login flow. Use RedisTokenStrategy with litestar-auth[redis] when sessions belong
in Redis. Both implementations issue opaque access and refresh tokens, rotate refresh tokens,
revoke replayed chains, and expose safe session metadata.
Keep machine identity on its own path
uv add 'authweave-workload[mtls,jwt,sqlalchemy]'
# Add [litestar] only for the Extension SDK v2 integration.
WorkloadLifecycleService manages service applications, principals, public certificate metadata,
overlapping rotation, revocation, and same-transaction security events. Private keys are rejected
at the package boundary and are never stored.
At request time:
DirectMTLSProviderconsumes trusted TLS peer evidence.MTLSBoundJWTProviderverifies an asymmetric access token from a configured external issuer.- The token's RFC 8705 thumbprint must match the same peer certificate.
- Ambiguous credential ownership and provider failures stop authentication; they never fall through to another provider.
The repository includes an Envoy-based reference stack with negative-path verification:
sh docker/reference/verify.sh
Security boundary
Authentication establishes a verified principal and constraints. Your application still owns tenant mapping, row-level security, resource ownership, and business authorization.
Version 7 intentionally does not provide bearer login, user-owned API keys, proprietary HMAC request signing, an OAuth Authorization Server, generic IAM, DPoP, SPIFFE, opaque-token introspection, or production rollout automation.
Documentation
- Quickstart
- Installation and extras
- Architecture contract
- Security posture
- Vulnerability reporting
- Version 7 migration
- Changelog
- Deployment reference
- Contributing
License
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file litestar_auth-7.0.0.tar.gz.
File metadata
- Download URL: litestar_auth-7.0.0.tar.gz
- Upload date:
- Size: 1.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f5cc25bbbf1c674546be163f5de93f08689d6bf3763b955e5317d9e9a0c8d41f
|
|
| MD5 |
10d50da5951f8be99c0fce6e7777fa50
|
|
| BLAKE2b-256 |
d0a38114e1fa5b3f1859d10a5c983c6f1e91cf5edfa8435eaa40e3955cd1dbfc
|
Provenance
The following attestation bundles were made for litestar_auth-7.0.0.tar.gz:
Publisher:
3_release.yml on ZYLVEXT/litestar-auth
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
litestar_auth-7.0.0.tar.gz -
Subject digest:
f5cc25bbbf1c674546be163f5de93f08689d6bf3763b955e5317d9e9a0c8d41f - Sigstore transparency entry: 2298300527
- Sigstore integration time:
-
Permalink:
ZYLVEXT/litestar-auth@a1968be76ff2bfbca1a10e71d07898db0c053a56 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/ZYLVEXT
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
3_release.yml@a1968be76ff2bfbca1a10e71d07898db0c053a56 -
Trigger Event:
workflow_run
-
Statement type:
File details
Details for the file litestar_auth-7.0.0-py3-none-any.whl.
File metadata
- Download URL: litestar_auth-7.0.0-py3-none-any.whl
- Upload date:
- Size: 449.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
313072f499416fda806c1b6d74489a3c8fb440a08b6ad2d2faf72daea99b3ed7
|
|
| MD5 |
5e9b2a12878e37a90a533b69475f439c
|
|
| BLAKE2b-256 |
2189a535ff7662fd131031cf91b3bf3ccb7c9c07f66a5cbb98b82903032b916c
|
Provenance
The following attestation bundles were made for litestar_auth-7.0.0-py3-none-any.whl:
Publisher:
3_release.yml on ZYLVEXT/litestar-auth
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
litestar_auth-7.0.0-py3-none-any.whl -
Subject digest:
313072f499416fda806c1b6d74489a3c8fb440a08b6ad2d2faf72daea99b3ed7 - Sigstore transparency entry: 2298300544
- Sigstore integration time:
-
Permalink:
ZYLVEXT/litestar-auth@a1968be76ff2bfbca1a10e71d07898db0c053a56 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/ZYLVEXT
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
3_release.yml@a1968be76ff2bfbca1a10e71d07898db0c053a56 -
Trigger Event:
workflow_run
-
Statement type: