Struct bonsaidb_core::admin::AuthenticationToken
source · pub struct AuthenticationToken { /* private fields */ }
Implementations§
source§impl AuthenticationToken
impl AuthenticationToken
pub fn create<C: Connection>( identity: &IdentityReference<'_>, database: &C ) -> Result<CollectionDocument<Self>, Error>
pub async fn create_async<C: AsyncConnection>( identity: IdentityReference<'_>, database: &C ) -> Result<CollectionDocument<Self>, Error>
pub fn validate_challenge( &self, algorithm: TokenChallengeAlgorithm, server_timestamp: TimestampAsNanoseconds, nonce: &[u8], hash: &[u8] ) -> Result<(), Error>
pub fn compute_challenge_response_blake3( token: &SensitiveString, nonce: &[u8], timestamp: TimestampAsNanoseconds ) -> Hash
pub fn check_request_time( request_time: TimestampAsNanoseconds, request_time_check: &[u8], algorithm: TokenChallengeAlgorithm, token: &SensitiveString ) -> Result<(), Error>
Trait Implementations§
source§impl Clone for AuthenticationToken
impl Clone for AuthenticationToken
source§fn clone(&self) -> AuthenticationToken
fn clone(&self) -> AuthenticationToken
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 Collection for AuthenticationToken
impl Collection for AuthenticationToken
§type PrimaryKey = u64
type PrimaryKey = u64
The unique id type. Each document stored in a collection will be
uniquely identified by this type. Read more
source§fn collection_name() -> CollectionName
fn collection_name() -> CollectionName
The unique name of this collection. Each collection must be uniquely
named within the
Schema
it is registered
within.source§impl Debug for AuthenticationToken
impl Debug for AuthenticationToken
source§impl DefaultSerialization for AuthenticationToken
impl DefaultSerialization for AuthenticationToken
source§fn natural_id(&self) -> Option<Self::PrimaryKey>
fn natural_id(&self) -> Option<Self::PrimaryKey>
Returns the natural identifier of
contents
. This is called when
pushing values into a collection, before attempting to automatically
assign a unique id.source§impl<'de> Deserialize<'de> for AuthenticationToken
impl<'de> Deserialize<'de> for AuthenticationToken
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 RefUnwindSafe for AuthenticationToken
impl Send for AuthenticationToken
impl Sync for AuthenticationToken
impl Unpin for AuthenticationToken
impl UnwindSafe for AuthenticationToken
Blanket Implementations§
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> Schema for Twhere
T: Collection + 'static,
impl<T> Schema for Twhere T: Collection + 'static,
source§fn schema_name() -> SchemaName
fn schema_name() -> SchemaName
Returns the unique
SchemaName
for this schema.