pub struct AuthUser {
pub sub: String,
pub email: Option<String>,
pub name: Option<String>,
pub roles: Vec<String>,
pub claims: Map<String, Value>,
}Expand description
The authenticated user of a verified access token.
Fields§
§sub: Stringsub claim.
email: Option<String>email claim when present.
name: Option<String>name claim, else preferred_username, when present.
roles: Vec<String>Role names from the roles claim (strings, or Casdoor-style {name} objects).
claims: Map<String, Value>Every claim of the token.
Implementations§
Trait Implementations§
impl StructuralPartialEq for AuthUser
Auto Trait Implementations§
impl Forget for AuthUser
impl Freeze for AuthUser
impl Move for AuthUser
impl RefUnwindSafe for AuthUser
impl Send for AuthUser
impl Sync for AuthUser
impl Unpin for AuthUser
impl UnsafeUnpin for AuthUser
impl UnwindSafe for AuthUser
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