Enum AuthOutcome
pub enum AuthOutcome {
Verified(AuthenticatedIdentity),
Denied {
reason: DenyReason,
},
}Expand description
The single result every credential verification returns. Misroute,
timeout, or malformed input ⇒ AuthOutcome::Denied, NEVER a silent
allow. Once a provider was selected for a credential, its denial is
authoritative: there is no fallback to another provider or to broader
authority.
Variants§
Verified(AuthenticatedIdentity)
The selected provider verified the credential into an identity.
Whether that identity is a distinct authenticated principal or the
trusted shared operator is carried by IdentitySubject.
Denied
The credential was rejected.
Fields
§
reason: DenyReasonImplementations§
Source§impl AuthOutcome
impl AuthOutcome
Sourcepub fn identity(&self) -> Option<&AuthenticatedIdentity>
pub fn identity(&self) -> Option<&AuthenticatedIdentity>
The verified identity if the outcome allows the connection, else
None.
Sourcepub fn is_allowed(&self) -> bool
pub fn is_allowed(&self) -> bool
Whether the connection may proceed at all (still subject to grant resolution and per-method checks downstream).
Trait Implementations§
Source§impl Clone for AuthOutcome
impl Clone for AuthOutcome
Source§fn clone(&self) -> AuthOutcome
fn clone(&self) -> AuthOutcome
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · §fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AuthOutcome
impl RefUnwindSafe for AuthOutcome
impl Send for AuthOutcome
impl Sync for AuthOutcome
impl Unpin for AuthOutcome
impl UnsafeUnpin for AuthOutcome
impl UnwindSafe for AuthOutcome
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