Enum bonsaidb::core::connection::SessionAuthentication
source · pub enum SessionAuthentication {
None,
Identity(Arc<Identity>),
TokenChallenge {
id: u64,
algorithm: TokenChallengeAlgorithm,
nonce: [u8; 32],
server_timestamp: LimitedResolutionTimestamp<Nanoseconds, BonsaiEpoch>,
},
}
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: LimitedResolutionTimestamp<Nanoseconds, BonsaiEpoch>
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§fn default() -> SessionAuthentication
fn default() -> SessionAuthentication
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for SessionAuthentication
impl<'de> Deserialize<'de> for SessionAuthentication
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<SessionAuthentication, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<SessionAuthentication, <__D as Deserializer<'de>>::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
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
§impl<T> CallHasher for T
impl<T> CallHasher for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.