Expand description
JWT token implementation.
Re-exports EdDSA signing from hyprstream-rpc and adds ES256 (P-256) signing.
Structs§
- Claims
- JWT claims for authentication.
Enums§
- JwtError
- Errors from JWT operations
Functions§
- composite_
jwk - Build a JWK for a composite ML-DSA-65-Ed25519 key (
kty: "AKP"). - composite_
kid - Compute the RFC 7638 JWK thumbprint for one exact composite key pair.
- decode
- Decode and verify a JWT token issued by the local node.
- decode_
with_ any_ key - Try every supplied Ed25519 key for a JWT that has no
kid. - decode_
with_ any_ key_ lenient - Lenient-audience twin of
decode_with_any_key. This remains restricted to kid-less JWTs; only the absent-audience behavior differs. - decode_
with_ federation_ candidates - Verify a federation JWT without losing its JWKS
kidbinding. - decode_
with_ key - Decode a JWT using a caller-supplied verifying key (for multi-issuer support).
- encode
- Encode a user/client OAuth 2.0 access token (
typ: "at+jwt", RFC 9068). Includeskidin the JOSE header for key rotation support. Automatically assigns ajtiif the claims don’t already have one. - encode_
composite_ ml_ dsa_ 65_ ed25519 - Encode and sign a composite ML-DSA-65-Ed25519 JWT.
- encode_
composite_ service_ jwt - Encode a service WIT (
typ: "wit+jwt") with ML-DSA-65-Ed25519 composite signature. - encode_
es256 - Encode and sign an OAuth 2.0 access token with ES256 (P-256 ECDSA).
- encode_
ml_ dsa_ 65 - Encode and sign a JWT with ML-DSA-65 (
alg: "ML-DSA-65",kty: "AKP"). - encode_
service_ jwt - Encode a WIMSE Workload Identity Token (
typ: "wit+jwt") for service JWTs. Includeskidin the JOSE header for key rotation support. Automatically assigns ajtiif the claims don’t already have one. - encode_
service_ jwt_ hybrid_ via_ authority - Encode a service WIT with the mandatory hybrid suite for the dispatch plane.
- es256_
jwk - Build a JWK (serde_json::Value) for JWKS publishing from a P-256 signing key.
- es256_
kid - Compute the RFC 7638 JWK Thumbprint for a P-256 signing key.
- generate_
es256_ key - Generate a new random P-256 signing key.
- ml_
dsa_ 65_ jwk - Build a JWK for an ML-DSA-65 key (
kty: "AKP").