OakQuant shared token contract: canonical JWT claim schema, EdDSA signer, verifier, JWKS, and Ed25519 key management. The single source of truth for issuing (Canopy) and verifying (grove, ranger, ...) access tokens.
Project description
oakquant-tokens
The shared token contract for the OakQuant platform — the single source of truth for the access-token format so the issuer (Canopy) and every verifier (grove, ranger, …) cannot drift.
Deliberately tiny: depends only on authlib + cryptography. No service-level
coupling — unlike depending on the full timber-common, any service can adopt
this without inheriting a database/ORM/encryption stack.
from oak_tokens import (
TokenSigner, TokenVerifier, TokenContext, TokenError,
JwksClient, build_jwks, public_jwk,
generate_ed25519_keypair, compute_kid, public_pem_from_private,
)
Roles
- Issuer (Canopy): holds the Ed25519 private key, mints JWTs with
TokenSigner, publishes the public half viabuild_jwks/public_jwkat/.well-known/jwks.json. - Verifiers (grove, ranger): verify with
TokenVerifier, resolving the signing key from the issuer's JWKS viaJwksClient(rotation-friendly) or a static public key. Returns aTokenContext.
Claim schema
Header: alg=EdDSA, kid, typ=JWT. Payload:
iss, sub, aud, exp, iat, jti, scope, client_id, tenant_id, actor_kind, roles[].
Algorithm allow-list excludes none; iss/aud/exp and required claims are
enforced. An optional revocation_check callback supports a jti/introspection
revocation fallback for sensitive operations.
Project details
Release history Release notifications | RSS feed
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 oakquant_tokens-0.1.0.tar.gz.
File metadata
- Download URL: oakquant_tokens-0.1.0.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.0.1 CPython/3.13.13 Linux/6.17.0-1015-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e47dd19fb669abc8b320a45d50fe0e3432bdd408320b63ff79916d3bd21840c
|
|
| MD5 |
8319758064683aef7f2e96693981e7b7
|
|
| BLAKE2b-256 |
f1925976630c2fc244f91e2f5fa7434936d83327b6bcdeae8d1076ebf70548c4
|
File details
Details for the file oakquant_tokens-0.1.0-py3-none-any.whl.
File metadata
- Download URL: oakquant_tokens-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.0.1 CPython/3.13.13 Linux/6.17.0-1015-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ec2152dff324ce449cd1f5383487d1b91ab447f92e9f275c94d97488c4577279
|
|
| MD5 |
019da2eed7ef57a9d4a715d116e53f44
|
|
| BLAKE2b-256 |
35695c0cd79da3f6c91934cf074ad2bc0e6aff66f43544fae3a24ed6054cffb7
|