pub struct Claims {
pub sub: String,
pub email: String,
pub role: String,
pub roles: Vec<String>,
pub mfa: String,
}Expand description
Authenticated principal, decoded from the auth cookie by auth::build_ctx.
Fields§
§sub: String§email: String§role: String§roles: Vec<String>§mfa: StringMFA step for this session: "ok" (fully authenticated) or "pending"
(password verified, awaiting a second factor). Empty on anonymous ctx.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Claims
impl RefUnwindSafe for Claims
impl Send for Claims
impl Sync for Claims
impl Unpin for Claims
impl UnsafeUnpin for Claims
impl UnwindSafe for Claims
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