Enum bonsaidb::core::connection::SessionAuthentication
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§
§impl Clone for SessionAuthentication
impl Clone for SessionAuthentication
§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 more§impl Debug for SessionAuthentication
impl Debug for SessionAuthentication
§impl Default for SessionAuthentication
impl Default for SessionAuthentication
§fn default() -> SessionAuthentication
fn default() -> SessionAuthentication
Returns the “default value” for a type. Read more
§impl<'de> Deserialize<'de> for SessionAuthentication
impl<'de> Deserialize<'de> for SessionAuthentication
§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
§impl Hash for SessionAuthentication
impl Hash for SessionAuthentication
§impl PartialEq<SessionAuthentication> for SessionAuthentication
impl PartialEq<SessionAuthentication> for SessionAuthentication
§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 ==
.§impl Serialize for SessionAuthentication
impl Serialize for SessionAuthentication
§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
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§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 Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.