pub struct TokenConfig {
pub name: String,
}Expand description
Configuration for URI query parameters to implement token-based authentication.
The token value is not stored here. Instead, tokens are self-expiring, signed values minted with AuthConfig::generate_token and validated against AuthConfig::persistent_secret, so the server keeps no per-token state. A token is accepted as long as its signature verifies and it has not yet expired.
Fields§
§name: StringThe key of the token in the URI query parameters.
Implementations§
Source§impl TokenConfig
impl TokenConfig
Sourcepub fn new(name: &str) -> Self
pub fn new(name: &str) -> Self
Create a TokenConfig for the given query parameter name.
Trait Implementations§
Source§impl Clone for TokenConfig
impl Clone for TokenConfig
Source§fn clone(&self) -> TokenConfig
fn clone(&self) -> TokenConfig
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 moreAuto Trait Implementations§
impl Freeze for TokenConfig
impl RefUnwindSafe for TokenConfig
impl Send for TokenConfig
impl Sync for TokenConfig
impl Unpin for TokenConfig
impl UnsafeUnpin for TokenConfig
impl UnwindSafe for TokenConfig
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