pub struct UserProfile {
pub id: Option<u64>,
pub username: String,
pub uuid: String,
pub access_token: Option<SecretString>,
pub xuid: Option<String>,
pub email: Option<String>,
pub email_verified: bool,
pub money: Option<f64>,
pub role: Option<UserRole>,
pub banned: bool,
pub provider: AuthProvider,
}Expand description
User profile returned after successful authentication.
Intentionally not Serialize / Deserialize: dumping a profile in
plain JSON would leak the session token. See AUTH_SECRETS.md.
Fields§
§id: Option<u64>§username: String§uuid: String§access_token: Option<SecretString>Minecraft/Azuriom session token. Wrapped in SecretString so
Debug prints [REDACTED] and serde cannot serialise it.
Read at launch-time via secrecy::ExposeSecret::expose_secret.
xuid: Option<String>§email: Option<String>§email_verified: bool§money: Option<f64>§role: Option<UserRole>§banned: bool§provider: AuthProviderImplementations§
Trait Implementations§
Source§impl Clone for UserProfile
impl Clone for UserProfile
Source§fn clone(&self) -> UserProfile
fn clone(&self) -> UserProfile
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 UserProfile
impl RefUnwindSafe for UserProfile
impl Send for UserProfile
impl Sync for UserProfile
impl Unpin for UserProfile
impl UnsafeUnpin for UserProfile
impl UnwindSafe for UserProfile
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