UnsignedToken

Type Alias UnsignedToken 

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

A SignedToken that has been verified

Aliased Type§

pub struct UnsignedToken<V, M, F = ()> {
    pub claims: M,
    pub footer: F,
    /* private fields */
}

Fields§

§claims: M

The message that was contained in the token

§footer: F

The footer that was sent with the token

Implementations§

Source§

impl<V, M, F> UnsignedToken<V, M, F>
where V: SealingVersion<Public>, M: Payload, F: Footer,

Source

pub fn sign( self, key: &SecretKey<V>, ) -> Result<SignedToken<V, M, F>, PasetoError>

Sign the token

Source

pub fn sign_with_aad( self, key: &SecretKey<V>, aad: &[u8], ) -> Result<SignedToken<V, M, F>, PasetoError>

Sign the token, additionally authenticating the implicit assertions.