pub struct AuthConfig {
pub password_salt: String,
pub auth_token_issuer: String,
pub auth_token_secret: String,
pub auth_token_lifetime: Duration,
pub database_connection: Arc<Mutex<dyn UserDatabase>>,
}Fields§
§password_salt: StringThe secret used to salt passwords stored in the database. If the salt changes, all previously-stored passwords can no longer be authenticated.
auth_token_issuer: StringThe issuer for auth tokens. We will validate that all auth tokens match the given issuer.
auth_token_secret: StringThe secret used to encrypt JWT authorization tokens. If the secret changes, all currently authenticated sessions will be terminated.
auth_token_lifetime: DurationHow long auth tokens should remain valid for. After this interval, the client will have to re-login.
database_connection: Arc<Mutex<dyn UserDatabase>>Trait Implementations§
Source§impl Clone for AuthConfig
impl Clone for AuthConfig
Source§fn clone(&self) -> AuthConfig
fn clone(&self) -> AuthConfig
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 AuthConfig
impl !RefUnwindSafe for AuthConfig
impl Send for AuthConfig
impl Sync for AuthConfig
impl Unpin for AuthConfig
impl !UnwindSafe for AuthConfig
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