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>
impl<V, M, F> SignedToken<V, M, F>
Sourcepub fn verify(
self,
key: &PublicKey<V>,
v: &impl Validate<Claims = M>,
) -> Result<UnsignedToken<V, M, F>, PasetoError>
pub fn verify( self, key: &PublicKey<V>, v: &impl Validate<Claims = M>, ) -> Result<UnsignedToken<V, M, F>, PasetoError>
Try to verify the token signature
Sourcepub fn verify_with_aad(
self,
key: &PublicKey<V>,
aad: &[u8],
v: &impl Validate<Claims = M>,
) -> Result<UnsignedToken<V, M, F>, PasetoError>
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