pub struct ProviderRegistry { /* private fields */ }Expand description
Named registry of authentication providers.
Entries are stored as Arc<ProviderEntry>; ProviderRegistry::resolve
clones the Arc out of the DashMap so callers hold their own strong
reference independent of the map guard’s lifetime.
Implementations§
Source§impl ProviderRegistry
impl ProviderRegistry
pub fn new() -> Self
Sourcepub fn with_authn_cache(self, cache: Arc<AuthnCache>) -> Self
pub fn with_authn_cache(self, cache: Arc<AuthnCache>) -> Self
Attach the authn result cache (Task 3.2). kernel_authenticate
consults it via Self::authn_cache before calling a provider.
Sourcepub fn authn_cache(&self) -> Option<&Arc<AuthnCache>>
pub fn authn_cache(&self) -> Option<&Arc<AuthnCache>>
The attached authn result cache, when present.
pub fn register(&self, name: impl Into<String>, entry: ProviderEntry)
pub fn resolve(&self, name: &str) -> Option<Arc<ProviderEntry>>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn names(&self) -> Vec<String>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ProviderRegistry
impl !UnwindSafe for ProviderRegistry
impl Freeze for ProviderRegistry
impl Send for ProviderRegistry
impl Sync for ProviderRegistry
impl Unpin for ProviderRegistry
impl UnsafeUnpin for ProviderRegistry
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