pub struct CompositeProvider { /* private fields */ }Expand description
Tries a list of providers in order, so one shared system can accept several
issuers at once (static tokens for internal tools, OIDC for humans, mTLS for
services). The first provider to accept wins; the first to reject stops the
chain. If every provider abstains, the composite abstains too — whether that
becomes anonymous access or a rejection is the Guard’s policy.
Implementations§
Source§impl CompositeProvider
impl CompositeProvider
Sourcepub fn new(providers: Vec<Arc<dyn IdentityProvider>>) -> Self
pub fn new(providers: Vec<Arc<dyn IdentityProvider>>) -> Self
Builds a chain of providers, tried in order.
Trait Implementations§
Source§impl Clone for CompositeProvider
impl Clone for CompositeProvider
Source§fn clone(&self) -> CompositeProvider
fn clone(&self) -> CompositeProvider
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 IdentityProvider for CompositeProvider
impl IdentityProvider for CompositeProvider
Source§fn name(&self) -> &str
fn name(&self) -> &str
A short name recorded in
Principal::provider and logs.Source§fn authenticate(
&self,
credentials: &Credentials,
) -> Result<Option<Principal>, AuthError>
fn authenticate( &self, credentials: &Credentials, ) -> Result<Option<Principal>, AuthError>
Authenticates
credentials. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for CompositeProvider
impl !UnwindSafe for CompositeProvider
impl Freeze for CompositeProvider
impl Send for CompositeProvider
impl Sync for CompositeProvider
impl Unpin for CompositeProvider
impl UnsafeUnpin for CompositeProvider
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request