pub struct JwtConfig {
pub algorithm: String,
pub private_key: String,
pub public_key: String,
pub issuer: String,
pub audience: String,
pub access_token_ttl: Duration,
pub refresh_token_ttl: Duration,
pub auto_rotate_keys: bool,
pub rotation_interval: Duration,
}Fields§
§algorithm: StringJWT signing algorithm (RS256, RS384, RS512, ES256, ES384, HS256, HS512)
private_key: StringPrivate key for signing (PEM format)
public_key: StringPublic key for verification (PEM format)
issuer: StringToken issuer
audience: StringToken audience
access_token_ttl: DurationAccess token expiration (seconds)
refresh_token_ttl: DurationRefresh token expiration (seconds)
auto_rotate_keys: boolEnable automatic key rotation
rotation_interval: DurationKey rotation interval (days)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for JwtConfig
impl<'de> Deserialize<'de> for JwtConfig
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 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