pub struct AuthenticationResult<User, Token> {
pub user: User,
pub token: Token,
pub refresh_token: Option<Token>,
pub requires_mfa: bool,
pub mfa_setup: Option<MfaSetup>,
pub expires_at: Option<DateTime<Utc>>,
pub metadata: HashMap<String, Value>,
}Expand description
Result of authentication attempt
Fields§
§user: UserThe authenticated user
token: TokenThe authentication token
refresh_token: Option<Token>Optional refresh token
requires_mfa: boolWhether MFA is required
mfa_setup: Option<MfaSetup>MFA setup information if required
expires_at: Option<DateTime<Utc>>Token expiration time
metadata: HashMap<String, Value>Additional metadata
Trait Implementations§
Source§impl<User: Clone, Token: Clone> Clone for AuthenticationResult<User, Token>
impl<User: Clone, Token: Clone> Clone for AuthenticationResult<User, Token>
Source§fn clone(&self) -> AuthenticationResult<User, Token>
fn clone(&self) -> AuthenticationResult<User, Token>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'de, User, Token> Deserialize<'de> for AuthenticationResult<User, Token>where
User: Deserialize<'de>,
Token: Deserialize<'de>,
impl<'de, User, Token> Deserialize<'de> for AuthenticationResult<User, Token>where
User: Deserialize<'de>,
Token: Deserialize<'de>,
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<User, Token> Freeze for AuthenticationResult<User, Token>
impl<User, Token> RefUnwindSafe for AuthenticationResult<User, Token>where
User: RefUnwindSafe,
Token: RefUnwindSafe,
impl<User, Token> Send for AuthenticationResult<User, Token>
impl<User, Token> Sync for AuthenticationResult<User, Token>
impl<User, Token> Unpin for AuthenticationResult<User, Token>
impl<User, Token> UnwindSafe for AuthenticationResult<User, Token>where
User: UnwindSafe,
Token: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more