pub trait Authenticator: Send + Sync {
// Required methods
fn authenticate<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 AuthnRequest<'life2>,
) -> Pin<Box<dyn Future<Output = Result<Option<Identity>, AuthError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn challenge(&self) -> String;
}Expand description
One pluggable authenticator (dyn-compatible seam). Ok(None) is
Anonymous; Err(AuthError::Invalid(..)) means a credential was
PRESENTED and rejected.