AuthRepository

Trait AuthRepository 

Source
pub trait AuthRepository: Send + Sync {
    // Required methods
    fn validate_token(
        &self,
        token: &str,
    ) -> impl Future<Output = Result<Claims, AuthError>> + Send;
    fn identify(
        &self,
        token: &str,
    ) -> impl Future<Output = Result<Identity, AuthError>> + Send;
}

Required Methods§

Source

fn validate_token( &self, token: &str, ) -> impl Future<Output = Result<Claims, AuthError>> + Send

Source

fn identify( &self, token: &str, ) -> impl Future<Output = Result<Identity, AuthError>> + Send

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§