pub struct ApiKeyAuthenticator { /* private fields */ }Expand description
Built-in Authenticator validating static or rotated API keys from a configured header.
Implementations§
Source§impl ApiKeyAuthenticator
Inherent implementation of ApiKeyAuthenticator.
impl ApiKeyAuthenticator
Inherent implementation of ApiKeyAuthenticator.
Trait Implementations§
Source§impl Authenticator for ApiKeyAuthenticator
Implements Authenticator for ApiKeyAuthenticator.
impl Authenticator for ApiKeyAuthenticator
Implements Authenticator for ApiKeyAuthenticator.
Source§fn authenticate<'a>(&'a self, ctx: &'a Context) -> AuthFuture<'a>
fn authenticate<'a>(&'a self, ctx: &'a Context) -> AuthFuture<'a>
Authenticates incoming API key headers using constant-time key comparisons.
§Arguments
&'a self- Shared reference to self.&'a Context- Incoming request context.
§Returns
AuthFuture<'a>- Future resolving toAuthPrincipalorAuthError.
Source§impl Clone for ApiKeyAuthenticator
impl Clone for ApiKeyAuthenticator
Source§impl Debug for ApiKeyAuthenticator
impl Debug for ApiKeyAuthenticator
Source§impl Default for ApiKeyAuthenticator
Default construction for ApiKeyAuthenticator.
impl Default for ApiKeyAuthenticator
Default construction for ApiKeyAuthenticator.
Source§fn default() -> Self
fn default() -> Self
Constructs an empty ApiKeyAuthenticator reading X-Api-Key.
Auto Trait Implementations§
impl Forget for ApiKeyAuthenticator
impl Freeze for ApiKeyAuthenticator
impl Move for ApiKeyAuthenticator
impl RefUnwindSafe for ApiKeyAuthenticator
impl Send for ApiKeyAuthenticator
impl Sync for ApiKeyAuthenticator
impl Unpin for ApiKeyAuthenticator
impl UnsafeUnpin for ApiKeyAuthenticator
impl UnwindSafe for ApiKeyAuthenticator
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