| Crates.io | ubl-auth |
| lib.rs | ubl-auth |
| version | 0.1.3 |
| created_at | 2026-01-11 22:41:44.49332+00 |
| updated_at | 2026-01-13 20:56:23.490634+00 |
| description | DID-first Ed25519 JWT/JWKS verification for OIDC-style flows. Enforces alg=EdDSA, checks exp/nbf/iat, JWKS cache. |
| homepage | https://id.ubl.agency |
| repository | https://github.com/danvoulez/ubl-auth |
| max_upload_size | |
| id | 2036643 |
| size | 45,635 |
Strict EdDSA (Ed25519) JWT/JWKS verification for OIDC-style flows. DID-first: expects sub to be a DID (e.g., did:key:z... / did:web:...).
alg = "EdDSA"exp / nbf / iat with leeway (default 300s)iss and aud checks via VerifyOptions[dependencies]
ubl-auth = "0.1.1"
use ubl_auth::{verify_ed25519_jwt_with_jwks, VerifyOptions};
let token = std::env::var("UBL_TOKEN")?;
let jwks_uri = "https://id.ubl.agency/.well-known/jwks.json";
let opts = VerifyOptions::default().with_issuer("https://id.ubl.agency");
let claims = verify_ed25519_jwt_with_jwks(&token, jwks_uri, &opts)?;
assert!(claims.sub.starts_with("did:"));
# Ok::<(), anyhow::Error>(())