pub struct DynBearerAuthenticator(/* private fields */);Expand description
Injectable, object-safe tenant-plane authenticator.
Wraps a concrete BearerAuthenticator (e.g. an AuthNResolverClient
adapter) so it can be stored behind an Arc and registered in a
ClientHub / handed to the OoP HTTP runtime. Lives in toolkit-security
(a leaf crate, always available) so any gear can register the bridge without
depending on the bootstrap-gated toolkit runtime.
Implementations§
Source§impl DynBearerAuthenticator
impl DynBearerAuthenticator
Sourcepub fn new<A: BearerAuthenticator + 'static>(authenticator: A) -> Self
pub fn new<A: BearerAuthenticator + 'static>(authenticator: A) -> Self
Wrap a concrete BearerAuthenticator in the object-safe adapter.
Sourcepub fn from_arc<A: BearerAuthenticator + 'static>(authenticator: Arc<A>) -> Self
pub fn from_arc<A: BearerAuthenticator + 'static>(authenticator: Arc<A>) -> Self
Wrap an already-Arc’d BearerAuthenticator in the object-safe adapter.
Trait Implementations§
Source§impl BearerAuthenticator for DynBearerAuthenticator
impl BearerAuthenticator for DynBearerAuthenticator
Source§async fn authenticate(&self, token: &str) -> Result<SecurityContext, AuthNError>
async fn authenticate(&self, token: &str) -> Result<SecurityContext, AuthNError>
Source§impl Clone for DynBearerAuthenticator
impl Clone for DynBearerAuthenticator
Source§fn clone(&self) -> DynBearerAuthenticator
fn clone(&self) -> DynBearerAuthenticator
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for DynBearerAuthenticator
impl !UnwindSafe for DynBearerAuthenticator
impl Freeze for DynBearerAuthenticator
impl Send for DynBearerAuthenticator
impl Sync for DynBearerAuthenticator
impl Unpin for DynBearerAuthenticator
impl UnsafeUnpin for DynBearerAuthenticator
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