waona-identity-sdk
Verify WAONA Identity access tokens in Python APIs.
pip install waona-identity-sdk
Protect a FastAPI API
from fastapi import Depends, FastAPI
from waona_identity_sdk import Identity, TokenVerifier, create_current_identity_dependency
verifier = TokenVerifier.discover(
"https://identity.waona.ke/realms/t-acme-prod", # your environment's issuer
audience="acme-orders", # the API identifier you registered
)
current_identity = create_current_identity_dependency(verifier)
app = FastAPI()
@app.get("/me")
def me(identity: Identity = Depends(current_identity)):
return {"id": identity.subject, "email": identity.email}
Every request is checked for signature, issuer, audience, expiry and token type.
Missing or invalid tokens get 401; ID tokens are rejected.
Require scopes
from waona_identity_sdk import require_scopes
@app.post("/orders")
def create(identity: Identity = Depends(require_scopes(current_identity, "orders:write"))):
...
Test without a server
from waona_identity_sdk.testing import TestIssuer
issuer = TestIssuer()
verifier = issuer.verifier(audience="acme-orders")
token = issuer.token(subject="user-1", audience="acme-orders", scope="openid orders:write")
Identity exposes subject, issuer, email, email_verified, name, username,
scopes and the raw claims. Store subject (with the issuer) as the user's ID, not the email.
License
MIT. The SDK is open source; the WAONA Identity service itself is proprietary.
Metadata
Release files for waona-identity-sdk 0.2.1
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 |
|---|---|---|---|---|
| waona_identity_sdk-0.2.1.tar.gz | 9.1 kB | With provenance | Details for waona_identity_sdk-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| waona_identity_sdk-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for waona_identity_sdk-0.2.1-py3-none-any.whl |
Total release size: 18.8 kB
Release files / waona_identity_sdk-0.2.1.tar.gz
| Download URL | waona_identity_sdk-0.2.1.tar.gz |
|---|---|
| Size | 9.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7b140a08ec26149c06630e5d8f55a0bba8b8553d0c4b59d6dd50cd30603b2c75
|
|
BLAKE2b-256 checksum How to use checksums |
8cd1f2909a303f212ed267eb1bb90ca84084133c1a16ab4317549e71134551de
|
| 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 Nov 18, 2026.
Transparency logRelease files / waona_identity_sdk-0.2.1-py3-none-any.whl
| Download URL | waona_identity_sdk-0.2.1-py3-none-any.whl |
|---|---|
| Size | 9.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ee97f342ba57e351b4902f8a0774201974617a560f4d981f37ad0c0aa078b82e
|
|
BLAKE2b-256 checksum How to use checksums |
00c50a3c97d68eb531852dfd5a6d2fcf7a2192d7ed75eb7921f3b3b9547e8bf6
|
| 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 Nov 18, 2026.
Transparency logSecurity for waona-identity-sdk 0.2.1
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 waona_identity_sdk-0.2.1.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 Nov 18, 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.