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>> { ... }
}