SignedToken

Type Alias SignedToken 

Source
pub type SignedToken<V, M, F = ()> = SealedToken<V, Public, M, F>;
Expand description

A token with publically readable data, but not yet verified

Aliased Type§

pub struct SignedToken<V, M, F = ()> { /* private fields */ }

Implementations§

Source§

impl<V, M, F> SignedToken<V, M, F>

Source

pub fn verify( self, key: &PublicKey<V>, v: &impl Validate<Claims = M>, ) -> Result<UnsignedToken<V, M, F>, PasetoError>

Try to verify the token signature

Source

pub fn verify_with_aad( self, key: &PublicKey<V>, aad: &[u8], v: &impl Validate<Claims = M>, ) -> Result<UnsignedToken<V, M, F>, PasetoError>

Try to verify the token signature and authenticate the implicit assertion