pub struct AuthenticatedRequestContext { /* private fields */ }Expand description
Request context that can only be created with authentication proof
Implementations§
Source§impl AuthenticatedRequestContext
impl AuthenticatedRequestContext
Sourcepub fn from_witness(witness: AuthenticationWitness) -> Self
pub fn from_witness(witness: AuthenticationWitness) -> Self
Create authenticated context from witness (consuming it)
Sourcepub fn with_request_id(
witness: AuthenticationWitness,
request_id: String,
) -> Self
pub fn with_request_id( witness: AuthenticationWitness, request_id: String, ) -> Self
Create authenticated context with specific request ID
Sourcepub fn request_context(&self) -> &RequestContext
pub fn request_context(&self) -> &RequestContext
Get the underlying request context
Get tenant authority proof
Sourcepub fn request_id(&self) -> &str
pub fn request_id(&self) -> &str
Get request ID
Trait Implementations§
Source§impl Clone for AuthenticatedRequestContext
impl Clone for AuthenticatedRequestContext
Source§fn clone(&self) -> AuthenticatedRequestContext
fn clone(&self) -> AuthenticatedRequestContext
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 AuthenticatedRequestContext
impl RefUnwindSafe for AuthenticatedRequestContext
impl Send for AuthenticatedRequestContext
impl Sync for AuthenticatedRequestContext
impl Unpin for AuthenticatedRequestContext
impl UnwindSafe for AuthenticatedRequestContext
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.