pub struct ApiKeyAuthenticator { /* private fields */ }Expand description
API-key authenticator backed by a CredentialLink store.
Resolution is lookup, never minting: a key that is not linked to a
principal is UnknownCredential.
That is what makes an API key a credential of a principal rather than a
second identity for the same human.
Implementations§
Source§impl ApiKeyAuthenticator
impl ApiKeyAuthenticator
Sourcepub fn new(
name: impl Into<String>,
links: Arc<dyn CredentialLink>,
digest: ApiKeyDigest,
) -> Self
pub fn new( name: impl Into<String>, links: Arc<dyn CredentialLink>, digest: ApiKeyDigest, ) -> Self
Build an authenticator that looks keys up, after digesting them, in
links.
Trait Implementations§
Source§impl Authenticator for ApiKeyAuthenticator
impl Authenticator for ApiKeyAuthenticator
Source§fn name(&self) -> &str
fn name(&self) -> &str
A stable, non-secret name for logs, audit records, and capability
advertisement.
Source§fn accepts(&self, presentation: &Presentation) -> bool
fn accepts(&self, presentation: &Presentation) -> bool
Does this authenticator handle this presentation?
Source§fn authenticate<'life0, 'life1, 'async_trait>(
&'life0 self,
presentation: &'life1 Presentation,
) -> Pin<Box<dyn Future<Output = Result<Authenticated, AuthnRejection>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn authenticate<'life0, 'life1, 'async_trait>(
&'life0 self,
presentation: &'life1 Presentation,
) -> Pin<Box<dyn Future<Output = Result<Authenticated, AuthnRejection>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Verify the material and name the subject it proves.
Auto Trait Implementations§
impl !RefUnwindSafe for ApiKeyAuthenticator
impl !UnwindSafe for ApiKeyAuthenticator
impl Freeze for ApiKeyAuthenticator
impl Send for ApiKeyAuthenticator
impl Sync for ApiKeyAuthenticator
impl Unpin for ApiKeyAuthenticator
impl UnsafeUnpin for ApiKeyAuthenticator
Blanket Implementations§
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