pub struct AuthResult {
pub identity: String,
pub method: AuthMethod,
pub client_cert_der: Option<Vec<u8>>,
pub subject_dn: Option<String>,
pub subject_alt_names: Vec<String>,
pub extended_key_usage: Vec<String>,
}Expand description
Result of a successful authentication.
Contains the authenticated identity, the method used, and any attributes extracted from the credential (e.g., certificate subject, SANs, EKU extensions).
Fields§
§identity: StringThe authenticated identity string.
For mTLS: the certificate subject DN or SAN. For OTP: the entity-id from HTTP Basic username. For GSSAPI: the Kerberos principal name.
method: AuthMethodHow the client authenticated.
client_cert_der: Option<Vec<u8>>DER-encoded client certificate (mTLS only).
Available for POP linking validation in /simpleenroll and
/simplereenroll handlers.
subject_dn: Option<String>Subject DN from the client certificate (mTLS only).
subject_alt_names: Vec<String>Subject Alternative Names from the client certificate (mTLS only).
extended_key_usage: Vec<String>Extended Key Usage OIDs from the client certificate (mTLS only).
Used by /fullcmc to verify the signer holds id-kp-cmcRA
(OID 1.3.6.1.5.5.7.3.28) per RHELBU-3536 R15.
Implementations§
Source§impl AuthResult
impl AuthResult
Sourcepub fn anonymous() -> Self
pub fn anonymous() -> Self
Create an unauthenticated result for endpoints that do not require auth.
Sourcepub fn has_cmc_ra_eku(&self) -> bool
pub fn has_cmc_ra_eku(&self) -> bool
Returns true if the client certificate carries the id-kp-cmcRA EKU.
OID: 1.3.6.1.5.5.7.3.28 (RFC 6402 §2.10).
Trait Implementations§
Source§impl Clone for AuthResult
impl Clone for AuthResult
Source§fn clone(&self) -> AuthResult
fn clone(&self) -> AuthResult
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for AuthResult
impl RefUnwindSafe for AuthResult
impl Send for AuthResult
impl Sync for AuthResult
impl Unpin for AuthResult
impl UnsafeUnpin for AuthResult
impl UnwindSafe for AuthResult
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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>
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>
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