pub struct Verifier { /* private fields */ }
Implementations§
Source§impl Verifier
impl Verifier
Sourcepub fn new(key: VerifyingKey) -> Self
pub fn new(key: VerifyingKey) -> Self
Creates a new Verifier
from an ed25519 VerifyingKey
pub fn verify<CLAIMS: Message + Default>( &self, token: &str, ) -> Result<TokenData<CLAIMS>, Error>
pub fn verify_bytes<CLAIMS: Message + Default>( &self, token: &[u8], ) -> Result<TokenData<CLAIMS>, Error>
pub fn verify_and_check_expiry<CLAIMS: Message + Default>( &self, token: &str, ) -> Result<CLAIMS, Error>
pub fn verify_bytes_and_check_expiry<CLAIMS: Message + Default>( &self, token: &[u8], ) -> Result<CLAIMS, Error>
Trait Implementations§
impl Copy for Verifier
impl Eq for Verifier
impl StructuralPartialEq for Verifier
Auto Trait Implementations§
impl Freeze for Verifier
impl RefUnwindSafe for Verifier
impl Send for Verifier
impl Sync for Verifier
impl Unpin for Verifier
impl UnwindSafe for Verifier
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more