pub struct AuthContext {
pub tenant_id: TenantId,
pub role: ApiKeyRole,
pub key_id: Option<Uuid>,
}Expand description
Authenticated context injected by the auth middleware.
Fields§
§tenant_id: TenantIdTenant the caller is authenticated as.
role: ApiKeyRoleRole granted by the API key (or admin bootstrap key).
key_id: Option<Uuid>ID of the API key used (None for bootstrap admin key).
Trait Implementations§
Source§impl Clone for AuthContext
impl Clone for AuthContext
Source§fn clone(&self) -> AuthContext
fn clone(&self) -> AuthContext
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 AuthContext
impl RefUnwindSafe for AuthContext
impl Send for AuthContext
impl Sync for AuthContext
impl Unpin for AuthContext
impl UnsafeUnpin for AuthContext
impl UnwindSafe for AuthContext
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