Struct NativeAuthProvider
pub struct NativeAuthProvider { /* private fields */ }Implementations§
Source§impl NativeAuthProvider
impl NativeAuthProvider
Sourcepub fn new(guard: Arc<PairingGuard>) -> Self
pub fn new(guard: Arc<PairingGuard>) -> Self
Wrap the daemon’s canonical live pairing authority. Callers must
pass the SAME guard instance the gateway serves /pair and
revocation from — constructing a second guard from a config
snapshot would fork the authority.
Sourcepub fn guard(&self) -> &Arc<PairingGuard> ⓘ
pub fn guard(&self) -> &Arc<PairingGuard> ⓘ
The live authority, for connection-scoped liveness re-checks (an established connection stores only the token’s SHA-256 hash and consults this guard before privileged operations).
Trait Implementations§
Source§impl AuthProvider for NativeAuthProvider
impl AuthProvider for NativeAuthProvider
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 NativeAuthProvider
impl !UnwindSafe for NativeAuthProvider
impl Freeze for NativeAuthProvider
impl Send for NativeAuthProvider
impl Sync for NativeAuthProvider
impl Unpin for NativeAuthProvider
impl UnsafeUnpin for NativeAuthProvider
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