pub enum SessionAuthentication {
None,
Identity(Arc<Identity>),
TokenChallenge {
id: u64,
algorithm: TokenChallengeAlgorithm,
nonce: [u8; 32],
server_timestamp: TimestampAsNanoseconds,
},
}
Expand description
The authentication state of a Session
.
Variants§
None
The session is unauthenticated.
Identity(Arc<Identity>)
The session is authenticated as an identity.
TokenChallenge
Fields
§
algorithm: TokenChallengeAlgorithm
The algorithm the server has chosen for the token challenge.
§
server_timestamp: TimestampAsNanoseconds
The server timestamp that is used for authenticated extra data.
The session is pending authentication using a token.
Trait Implementations§
source§impl Clone for SessionAuthentication
impl Clone for SessionAuthentication
source§fn clone(&self) -> SessionAuthentication
fn clone(&self) -> SessionAuthentication
Returns a copy 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 Debug for SessionAuthentication
impl Debug for SessionAuthentication
source§impl Default for SessionAuthentication
impl Default for SessionAuthentication
source§impl<'de> Deserialize<'de> for SessionAuthentication
impl<'de> Deserialize<'de> for SessionAuthentication
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
source§impl Hash for SessionAuthentication
impl Hash for SessionAuthentication
source§impl PartialEq for SessionAuthentication
impl PartialEq for SessionAuthentication
source§fn eq(&self, other: &SessionAuthentication) -> bool
fn eq(&self, other: &SessionAuthentication) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for SessionAuthentication
impl Serialize for SessionAuthentication
impl Eq for SessionAuthentication
impl StructuralEq for SessionAuthentication
impl StructuralPartialEq for SessionAuthentication
Auto Trait Implementations§
impl RefUnwindSafe for SessionAuthentication
impl Send for SessionAuthentication
impl Sync for SessionAuthentication
impl Unpin for SessionAuthentication
impl UnwindSafe for SessionAuthentication
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