Struct PeercredAuthProvider
pub struct PeercredAuthProvider { /* private fields */ }Implementations§
Source§impl PeercredAuthProvider
impl PeercredAuthProvider
pub fn new( daemon_uid: u32, trust_daemon_uid: Arc<AtomicBool>, roster: Arc<UidRoster>, ) -> Self
Sourcepub fn current_process_uid() -> u32
pub fn current_process_uid() -> u32
The daemon’s own uid (Unix). On non-Unix targets the transport
never produces a Peercred credential, so the provider is inert
there; u32::MAX guarantees no accidental match.
Trait Implementations§
Source§impl AuthProvider for PeercredAuthProvider
impl AuthProvider for PeercredAuthProvider
Source§fn name(&self) -> &str
fn name(&self) -> &str
Stable provider name = its config selection key (e.g.
"native",
"peercred", "oidc.corp" for [oidc.corp]). Unique within a
registry; the handshake selects a provider by this name.Source§fn method(&self) -> AuthMethod
fn method(&self) -> AuthMethod
The
AuthMethod this provider attests on success (also what it
advertises in the handshake).Source§fn accepts(&self, credential: &Credential) -> bool
fn accepts(&self, credential: &Credential) -> bool
Whether this provider can attempt the given credential kind. Used to
reject a mis-kinded credential before
verify, and to route
transport-intrinsic credentials — never to try one credential across
providers.Source§fn verify<'life0, 'life1, 'async_trait>(
&'life0 self,
credential: &'life1 Credential,
) -> Pin<Box<dyn Future<Output = AuthOutcome> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn verify<'life0, 'life1, 'async_trait>(
&'life0 self,
credential: &'life1 Credential,
) -> Pin<Box<dyn Future<Output = AuthOutcome> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Verify the credential into an identity. Fail-closed.
Auto Trait Implementations§
impl !RefUnwindSafe for PeercredAuthProvider
impl !UnwindSafe for PeercredAuthProvider
impl Freeze for PeercredAuthProvider
impl Send for PeercredAuthProvider
impl Sync for PeercredAuthProvider
impl Unpin for PeercredAuthProvider
impl UnsafeUnpin for PeercredAuthProvider
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more