Skip to main content

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.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for waona-identity-sdk 0.2.0
File Size Uploaded Provenance Actions
waona_identity_sdk-0.2.0.tar.gz 7.7 kB With provenance Details for waona_identity_sdk-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for waona-identity-sdk 0.2.0
File Interpreter ABI Platform Actions
waona_identity_sdk-0.2.0-py3-none-any.whl Python 3 none any Details for waona_identity_sdk-0.2.0-py3-none-any.whl

Total release size: 17.2 kB

Release files / waona_identity_sdk-0.2.0.tar.gz

Download URL waona_identity_sdk-0.2.0.tar.gz
Size 7.7 kB
Tags Source
SHA-256 checksum
How to use checksums
bdb96ed840bbcb4140f506ff5b3cad4bcfbf0674d2e9b3f44ebe6a21a517f74a
BLAKE2b-256 checksum
How to use checksums
256efd48019945d7323ec2108eb0b2fee8d8b716ed9c8fee0c6484f0ed66408f
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 11, 2026.

Transparency log

Release files / waona_identity_sdk-0.2.0-py3-none-any.whl

Download URL waona_identity_sdk-0.2.0-py3-none-any.whl
Size 9.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a692a51dc8495a788cfb4d7a666db5b8cd5bcba348e13c4e23b31a7a94175d3d
BLAKE2b-256 checksum
How to use checksums
5b74aa6ce5d8034ccea4c11d78ff8003c47f4f7ed5e8fd22062b10dfb2014752
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 11, 2026.

Transparency log

Security for waona-identity-sdk 0.2.0

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.

Select from 2 files

Attestation for waona_identity_sdk-0.2.0.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 11, 2026.

Transparency log

A 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.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page