Phzyx Auth
Secure-by-default identity, sessions, JWT, API keys, and RBAC for Forge apps and AdminBoard.
This is an optional battery. Most apps start with:
uv add phzyx-forge
uv add 'phzyx-forge[auth]'
# or: uv add phzyx-auth
Full docs live on the website
PyPI is the install surface. Tutorials, production notes, and product context are on phzyx.xyz:
| Auth tutorial | https://phzyx.xyz/forge/tutorials/auth |
| Forge docs | https://phzyx.xyz/forge |
| Getting started | https://phzyx.xyz/forge/getting-started |
| Product home | https://phzyx.xyz |
| Source | https://github.com/phzyxyz/forge |
After install → open phzyx.xyz/forge/tutorials/auth.
Install
uv add 'phzyx-forge[auth]'
# equivalent
uv add 'phzyx-auth[fastapi]'
Requires phzyx-forge (library wheel).
What you get (0.1)
| Area | Capability |
|---|---|
| Passwords | Argon2id, policy min length |
| Sessions | Opaque cookie sessions (hashed at rest), idle + absolute TTL |
| JWT | HS256 access + rotating refresh |
| API keys | phx_ prefix, scopes, list/revoke |
| RBAC | Groups / permissions, Principal, guards |
| Lockout | Failed-login counter + rate limits + audit log |
| Reset / change | Forgot/reset (anti-enum), change password, revoke sessions |
| CSRF | Double-submit cookie + X-CSRF-Token for session mutations |
| AdminBoard | Permission bridge for staff UI |
| CLI | phzyx-auth create-superuser |
Pre-1.0: APIs may change. Prefer lockfiles.
Quick start (FastAPI)
from fastapi import Depends, FastAPI
from phzyx.auth import AuthConfig, AuthService, Principal
from phzyx.auth.adapters.fastapi import mount_auth, require_user
app = FastAPI()
svc = AuthService(
config=AuthConfig(
secret="use-PHZYX_AUTH_SECRET-32+bytes-in-prod!!",
production=False,
cookie_secure=False,
)
)
mount_auth(app, svc)
@app.get("/private")
async def private(user: Principal = Depends(require_user)):
return {"email": user.email}
phzyx-auth create-superuser --email admin@example.com --password 'longpassword1'
Full walkthrough: Auth tutorial.
Related
- Product: phzyx-forge
- Cache battery: phzyx-cache
- Site: phzyx.xyz
License
MIT · phzyx.xyz
Metadata
Release files for phzyx-auth 0.1.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| phzyx_auth-0.1.7.tar.gz | 57.1 kB | With provenance | Details for phzyx_auth-0.1.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| phzyx_auth-0.1.7-py3-none-any.whl | Python 3 | none | any | Details for phzyx_auth-0.1.7-py3-none-any.whl |
Total release size: 117.2 kB
Release files / phzyx_auth-0.1.7.tar.gz
| Download URL | phzyx_auth-0.1.7.tar.gz |
|---|---|
| Size | 57.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1aa71457ddb1a73ae9438444cd615df3c1fd47996f161b90d00c14244f427fa5
|
|
BLAKE2b-256 checksum How to use checksums |
ad38ccff0c6f770be61326a3d577e65a84ae5222e5537dfabd25075c91e49a1f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.
Transparency logRelease files / phzyx_auth-0.1.7-py3-none-any.whl
| Download URL | phzyx_auth-0.1.7-py3-none-any.whl |
|---|---|
| Size | 60.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6c62616a1f11aa0a43fa1162e488399c779a0881ec9273237a6fd1f47f02ac0e
|
|
BLAKE2b-256 checksum How to use checksums |
ae6a71ef6d4cc35600156e05b9ec45862d3f3ea5203402da4a7352971262e48a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.
Transparency logSecurity for phzyx-auth 0.1.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for phzyx_auth-0.1.7.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.