pub struct BearerAuthenticator { /* private fields */ }Expand description
Trivial in-memory bearer-token store mapping token -> principal.
Suitable for tests, examples, and small deployments. Real deployments
should plug their own Authenticator in front of an external trust
store.
Implementations§
Trait Implementations§
Source§impl Authenticator for BearerAuthenticator
impl Authenticator for BearerAuthenticator
Source§fn scheme(&self) -> AuthScheme
fn scheme(&self) -> AuthScheme
Scheme this authenticator handles.
Source§fn authenticate<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
creds: &'life1 Credentials,
_client: &'life2 ClientIdentity,
_negotiated: &'life3 Capabilities,
) -> Pin<Box<dyn Future<Output = Result<AuthOutcome, ARCPError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn authenticate<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
creds: &'life1 Credentials,
_client: &'life2 ClientIdentity,
_negotiated: &'life3 Capabilities,
) -> Pin<Box<dyn Future<Output = Result<AuthOutcome, ARCPError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Validate
creds against the runtime trust store. Read moreSource§fn verify_challenge_response<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_challenge: &'life1 str,
_response: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<AuthOutcome, ARCPError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn verify_challenge_response<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_challenge: &'life1 str,
_response: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<AuthOutcome, ARCPError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Verify the response to a previously issued challenge. Default
implementation rejects everything (single-shot schemes don’t need
to override). Read more
Source§impl Debug for BearerAuthenticator
impl Debug for BearerAuthenticator
Source§impl Default for BearerAuthenticator
impl Default for BearerAuthenticator
Source§fn default() -> BearerAuthenticator
fn default() -> BearerAuthenticator
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BearerAuthenticator
impl RefUnwindSafe for BearerAuthenticator
impl Send for BearerAuthenticator
impl Sync for BearerAuthenticator
impl Unpin for BearerAuthenticator
impl UnsafeUnpin for BearerAuthenticator
impl UnwindSafe for BearerAuthenticator
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