pub trait TokenMinter {
// Required method
fn mint(&self, claims: &Claims) -> Result<String, CodecError>;
}Expand description
Mint session tokens carrying Claims.
Origin-only capability. A type that can mint can forge any session, so
this is the trait the session authority (origin) holds — never the edge.
Splitting it out from TokenVerifier is the keystone of edge-verifiable
auth (R019): the edge depends on TokenVerifier alone, and the only way to
satisfy verify-but-can’t-mint is an asymmetric public verifier
(cheers_verify::PasetoV4PublicVerifier).
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".