pub struct AuthenticationWitness { /* private fields */ }Expand description
Witness type proving successful authentication
This type can only be constructed by the authentication system and serves as compile-time proof that validation occurred.
Implementations§
Source§impl AuthenticationWitness
impl AuthenticationWitness
Sourcepub fn tenant_context(&self) -> &TenantContext
pub fn tenant_context(&self) -> &TenantContext
Get the tenant context (only available with witness)
Sourcepub fn validated_at(&self) -> DateTime<Utc>
pub fn validated_at(&self) -> DateTime<Utc>
Get validation timestamp
Sourcepub fn credential_hash(&self) -> &str
pub fn credential_hash(&self) -> &str
Get credential hash for audit purposes
Trait Implementations§
Source§impl Clone for AuthenticationWitness
impl Clone for AuthenticationWitness
Source§fn clone(&self) -> AuthenticationWitness
fn clone(&self) -> AuthenticationWitness
Returns a duplicate of the value. Read more
1.0.0 · Source§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 AuthenticationWitness
impl RefUnwindSafe for AuthenticationWitness
impl Send for AuthenticationWitness
impl Sync for AuthenticationWitness
impl Unpin for AuthenticationWitness
impl UnwindSafe for AuthenticationWitness
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> TenantValidator for T
impl<T> TenantValidator for T
Source§fn validate_tenant_context(
&self,
expected_tenant_id: &str,
context: &RequestContext,
) -> Result<(), String>
fn validate_tenant_context( &self, expected_tenant_id: &str, context: &RequestContext, ) -> Result<(), String>
Validate that the context has the expected tenant.
Source§fn validate_single_tenant_context(
&self,
context: &RequestContext,
) -> Result<(), String>
fn validate_single_tenant_context( &self, context: &RequestContext, ) -> Result<(), String>
Validate that the context is for single-tenant operation.
Source§fn require_tenant_context(&self, context: &RequestContext) -> Result<(), String>
fn require_tenant_context(&self, context: &RequestContext) -> Result<(), String>
Extract tenant context or return error for multi-tenant operations.