Expand description
JOSE, JWT, and JWS helpers.
reallyme-jose owns JOSE byte-format mechanics for compact JWS, JWT, and
JWE. Cryptographic operations are routed through reallyme-crypto; this
crate adds JOSE header policy, compact serialization, algorithm/key binding,
temporal JWT policy, and JWE content-encryption handling.
§Example
use reallyme_jose::jwt::{decode_unsigned_jwt, encode_unsigned_jwt};
let claims = serde_json::json!({
"iss": "did:me:issuer",
"sub": "alice",
});
let compact = encode_unsigned_jwt(&claims)?;
let decoded: serde_json::Value = decode_unsigned_jwt(&compact)?;
assert_eq!(decoded.get("sub"), Some(&serde_json::json!("alice")));Unsigned JWT decoding is a parser for profiles that explicitly allow
alg = "none"; it does not authenticate the sender. Use the signed JWT
verification APIs for verifier-grade paths.
Modules§
Structs§
- Zeroizing
- Zeroizing owner used for decrypted plaintext and derived CEK bytes.
Zeroizingis a wrapper for anyZ: Zeroizetype which implements aDrophandler which zeroizes dropped values.
Enums§
- Algorithm
- Crypto algorithm selector used by JOSE/JWT public APIs.
- Json
Value - JSON value type used by claim maps and protected-header values. Represents any valid JSON value.
- Jwk
- Crypto algorithm selector used by JOSE/JWT public APIs.
Traits§
- Secure
Random - Crypto algorithm selector used by JOSE/JWT public APIs.
- Signer
- Crypto algorithm selector used by JOSE/JWT public APIs.