pub struct CompositeAuthenticator { /* private fields */ }Expand description
Composite Authenticator trying a sequence of authenticators until one succeeds.
Implementations§
Source§impl CompositeAuthenticator
Inherent implementation of CompositeAuthenticator.
impl CompositeAuthenticator
Inherent implementation of CompositeAuthenticator.
Sourcepub fn new(chain: Vec<Arc<dyn Authenticator>>) -> Self
pub fn new(chain: Vec<Arc<dyn Authenticator>>) -> Self
Creates a CompositeAuthenticator chaining chain in priority order.
§Arguments
Vec<Arc<dyn Authenticator>>- Ordered list of authenticators.
§Returns
Self- Composite authenticator.
Trait Implementations§
Source§impl Authenticator for CompositeAuthenticator
Implements Authenticator for CompositeAuthenticator.
impl Authenticator for CompositeAuthenticator
Implements Authenticator for CompositeAuthenticator.
Source§fn authenticate<'a>(&'a self, ctx: &'a Context) -> AuthFuture<'a>
fn authenticate<'a>(&'a self, ctx: &'a Context) -> AuthFuture<'a>
Evaluates each authenticator in order, returning the first verified AuthPrincipal.
§Arguments
&'a self- Shared reference to self.&'a Context- Incoming request context.
§Returns
AuthFuture<'a>- Future resolving to the first matchingAuthPrincipalor last non-missing error.
Source§fn authenticate_sync(
&self,
_ctx: &Context,
) -> Option<Result<AuthPrincipal, AuthError>>
fn authenticate_sync( &self, _ctx: &Context, ) -> Option<Result<AuthPrincipal, AuthError>>
Optional zero-allocation synchronous fast path for non-blocking authenticators. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for CompositeAuthenticator
impl !UnwindSafe for CompositeAuthenticator
impl Forget for CompositeAuthenticator
impl Freeze for CompositeAuthenticator
impl Move for CompositeAuthenticator
impl Send for CompositeAuthenticator
impl Sync for CompositeAuthenticator
impl Unpin for CompositeAuthenticator
impl UnsafeUnpin for CompositeAuthenticator
Blanket Implementations§
impl<T> AnySend for T
impl<T> AnySendClone for T
impl<T> AnySendSync for T
impl<T> AnySendSyncClone for T
impl<T> AnySync for T
impl<T> AnySyncClone for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more