pub struct AuthCtx {
pub tn_id: TnId,
pub id_tag: Box<str>,
pub roles: Box<[Box<str>]>,
pub scope: Option<Box<str>>,
pub anonymous: bool,
}Expand description
Context struct for an authenticated user
Fields§
§tn_id: TnId§id_tag: Box<str>§roles: Box<[Box<str>]>§scope: Option<Box<str>>§anonymous: boolTrue when the credential carries no sub claim, so id_tag came from
iss and names the tenant, not a person — an anonymous share-link
token. Anything that asserts an identity on the holder’s behalf (CRDT
awareness stamping, activity attribution) must treat this as “no
identity to assert”. Authorization must NOT read this: a share link’s
authority comes from scope, and that is unchanged.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AuthCtx
impl RefUnwindSafe for AuthCtx
impl Send for AuthCtx
impl Sync for AuthCtx
impl Unpin for AuthCtx
impl UnsafeUnpin for AuthCtx
impl UnwindSafe for AuthCtx
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