pub struct DynInternalAuthenticator(/* private fields */);Expand description
Injectable, object-safe platform-plane authenticator.
Wraps a concrete InternalAuthenticator (e.g. the K8s TokenReview
validator) 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 — the platform-plane
mirror of DynBearerAuthenticator.
Implementations§
Source§impl DynInternalAuthenticator
impl DynInternalAuthenticator
Sourcepub fn new<A: InternalAuthenticator + 'static>(authenticator: A) -> Self
pub fn new<A: InternalAuthenticator + 'static>(authenticator: A) -> Self
Wrap a concrete InternalAuthenticator in the object-safe adapter.
Sourcepub fn from_arc<A: InternalAuthenticator + 'static>(
authenticator: Arc<A>,
) -> Self
pub fn from_arc<A: InternalAuthenticator + 'static>( authenticator: Arc<A>, ) -> Self
Wrap an already-Arc’d InternalAuthenticator in the object-safe adapter.
Trait Implementations§
Source§impl Clone for DynInternalAuthenticator
impl Clone for DynInternalAuthenticator
Source§fn clone(&self) -> DynInternalAuthenticator
fn clone(&self) -> DynInternalAuthenticator
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 moreSource§impl Debug for DynInternalAuthenticator
impl Debug for DynInternalAuthenticator
Source§impl InternalAuthenticator for DynInternalAuthenticator
impl InternalAuthenticator for DynInternalAuthenticator
Source§async fn authenticate(
&self,
token: &str,
) -> Result<PlatformIdentity, InternalAuthNError>
async fn authenticate( &self, token: &str, ) -> Result<PlatformIdentity, InternalAuthNError>
Authenticate the raw
X-ToolKit-Internal-Token value and resolve the
caller’s PlatformIdentity. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for DynInternalAuthenticator
impl !UnwindSafe for DynInternalAuthenticator
impl Freeze for DynInternalAuthenticator
impl Send for DynInternalAuthenticator
impl Sync for DynInternalAuthenticator
impl Unpin for DynInternalAuthenticator
impl UnsafeUnpin for DynInternalAuthenticator
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