Skip to main content

Crate reallyme_jose

Crate reallyme_jose 

Source
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§

jwe
JSON Web Encryption helpers.
jws
JSON Web Signature support.
jwt
JSON Web Token (JWT) support.

Structs§

Zeroizing
Zeroizing owner used for decrypted plaintext and derived CEK bytes. Zeroizing is a wrapper for any Z: Zeroize type which implements a Drop handler which zeroizes dropped values.

Enums§

Algorithm
Crypto algorithm selector used by JOSE/JWT public APIs.
JsonValue
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§

SecureRandom
Crypto algorithm selector used by JOSE/JWT public APIs.
Signer
Crypto algorithm selector used by JOSE/JWT public APIs.