jwt::algorithm

Trait VerifyingAlgorithm

Source
pub trait VerifyingAlgorithm {
    // Required methods
    fn algorithm_type(&self) -> AlgorithmType;
    fn verify_bytes(
        &self,
        header: &str,
        claims: &str,
        signature: &[u8],
    ) -> Result<bool, Error>;

    // Provided method
    fn verify(
        &self,
        header: &str,
        claims: &str,
        signature: &str,
    ) -> Result<bool, Error> { ... }
}
Expand description

An algorithm capable of verifying base64 encoded header and claims strings.

Required Methods§

Source

fn algorithm_type(&self) -> AlgorithmType

Source

fn verify_bytes( &self, header: &str, claims: &str, signature: &[u8], ) -> Result<bool, Error>

Provided Methods§

Source

fn verify( &self, header: &str, claims: &str, signature: &str, ) -> Result<bool, Error>

Implementations on Foreign Types§

Source§

impl<D> VerifyingAlgorithm for Hmac<D>

Source§

fn algorithm_type(&self) -> AlgorithmType

Source§

fn verify_bytes( &self, header: &str, claims: &str, signature: &[u8], ) -> Result<bool, Error>

Implementors§