pub struct JwtConfig {
pub issuer: String,
pub audience: Vec<String>,
pub algorithm: Algorithm,
pub signing_secret: Vec<u8>,
pub access_token_lifetime: Duration,
pub refresh_token_lifetime: Duration,
pub enable_blacklist: bool,
}
Expand description
JWT configuration
Fields§
§issuer: String
Issuer name
audience: Vec<String>
Default audience
algorithm: Algorithm
Signing algorithm
signing_secret: Vec<u8>
Signing secret (HMAC) or private key (RSA/ECDSA)
access_token_lifetime: Duration
Access token lifetime
refresh_token_lifetime: Duration
Refresh token lifetime
enable_blacklist: bool
Enable token blacklisting
Trait Implementations§
Auto Trait Implementations§
impl Freeze for JwtConfig
impl RefUnwindSafe for JwtConfig
impl Send for JwtConfig
impl Sync for JwtConfig
impl Unpin for JwtConfig
impl UnwindSafe for JwtConfig
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