Metadata-Version: 2.5
Name: au1h
Version: 0.1.1
Summary: Verify au1h tokens and read au1h gateway headers. FastAPI helpers included.
Project-URL: Homepage, https://github.com/AD12-codes/au1h
Project-URL: Documentation, https://github.com/AD12-codes/au1h/tree/main/apps/docs
Project-URL: Source, https://github.com/AD12-codes/au1h
License: MIT
Requires-Python: >=3.10
Requires-Dist: pyjwt[crypto]>=2.9
Provides-Extra: fastapi
Requires-Dist: fastapi>=0.110; extra == 'fastapi'
Provides-Extra: httpx
Requires-Dist: httpx>=0.27; extra == 'httpx'
Description-Content-Type: text/markdown

# au1h for Python

```bash
pip install au1h            # add [fastapi] for the FastAPI helpers
```

```python
from fastapi import Depends, FastAPI
from au1h import User, Verifier
from au1h.fastapi import require_user

au1h = Verifier("https://auth.example.com", "my-app")
current_user = require_user(au1h)

@app.get("/api/me")
def me(user: User = Depends(current_user)):
    return user
```

Behind the gateway: `require_proxy(au1h)` reads `x-user-*` and verifies `x-au1h-token`.
Server-to-server: `ServerClient(url, slug, secret).introspect(token)`.
