pub struct UserInfo {
pub sub: String,
pub name: Option<String>,
pub preferred_username: Option<String>,
pub role: Option<i32>,
pub updated_at: Option<i64>,
pub email: Option<String>,
pub email_verified: Option<bool>,
}Expand description
OIDC userinfo claims returned by GET /v1/client/oauth/userinfo.
Only sub is always present; every other claim is gated by the scopes the
access token carries (profile → name/preferred_username/role/updated_at,
email → email/email_verified), so each is optional. role is the AuthUser
role as its integer enum value; updated_at is a Unix timestamp (seconds).
Fields§
§sub: String§name: Option<String>§preferred_username: Option<String>§role: Option<i32>§updated_at: Option<i64>§email: Option<String>§email_verified: Option<bool>Trait Implementations§
Source§impl<'de> Deserialize<'de> for UserInfo
impl<'de> Deserialize<'de> for UserInfo
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for UserInfo
impl RefUnwindSafe for UserInfo
impl Send for UserInfo
impl Sync for UserInfo
impl Unpin for UserInfo
impl UnsafeUnpin for UserInfo
impl UnwindSafe for UserInfo
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