Skip to main content

TokenValidator

Trait TokenValidator 

Source
pub trait TokenValidator: Send + Sync {
    // Required method
    fn validate_and_parse<'life0, 'life1, 'async_trait>(
        &'life0 self,
        token: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Claims, AuthError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Validates and parses JWT tokens

Required Methods§

Source

fn validate_and_parse<'life0, 'life1, 'async_trait>( &'life0 self, token: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Claims, AuthError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Validate a JWT token and return normalized claims

Implementors§

Source§

impl TokenValidator for AuthDispatcher

Implement TokenValidator trait for AuthDispatcher