pub struct JwtConfig {
pub secret: Option<String>,
pub rsa_public_key: Option<String>,
pub ecdsa_public_key: Option<String>,
pub issuer: Option<String>,
pub audience: Option<String>,
pub algorithms: Vec<String>,
}
Expand description
JWT authentication configuration
Fields§
§secret: Option<String>
JWT secret key for HMAC algorithms
rsa_public_key: Option<String>
RSA public key PEM for RSA algorithms
ecdsa_public_key: Option<String>
ECDSA public key PEM for ECDSA algorithms
issuer: Option<String>
Expected issuer
audience: Option<String>
Expected audience
algorithms: Vec<String>
Supported algorithms (defaults to HS256, RS256, ES256)
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