Skip to main content

AuthPlugin

Trait AuthPlugin 

Source
pub trait AuthPlugin: Send + Sync {
    // Required methods
    fn provider_id(&self) -> ProviderId;
    fn supported_methods(&self) -> Vec<AuthMethod>;
    fn create_flow(
        &self,
        storage: Arc<dyn AuthStorage>,
    ) -> Option<Box<dyn DynAuthenticationFlow>>;
    fn resolve_auth<'life0, 'async_trait>(
        &'life0 self,
        storage: Arc<dyn AuthStorage>,
    ) -> Pin<Box<dyn Future<Output = Result<Option<AuthDirective>, AuthError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn is_authenticated<'life0, 'async_trait>(
        &'life0 self,
        storage: Arc<dyn AuthStorage>,
    ) -> Pin<Box<dyn Future<Output = Result<bool, AuthError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided method
    fn model_visibility(&self) -> Option<Box<dyn ModelVisibilityPolicy>> { ... }
}

Required Methods§

Source

fn provider_id(&self) -> ProviderId

Source

fn supported_methods(&self) -> Vec<AuthMethod>

Source

fn create_flow( &self, storage: Arc<dyn AuthStorage>, ) -> Option<Box<dyn DynAuthenticationFlow>>

Source

fn resolve_auth<'life0, 'async_trait>( &'life0 self, storage: Arc<dyn AuthStorage>, ) -> Pin<Box<dyn Future<Output = Result<Option<AuthDirective>, AuthError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn is_authenticated<'life0, 'async_trait>( &'life0 self, storage: Arc<dyn AuthStorage>, ) -> Pin<Box<dyn Future<Output = Result<bool, AuthError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Provided Methods§

Implementors§