pub struct TokenValidatorConfig {
pub issuer: String,
pub audience: String,
pub secret: Vec<u8>,
}Expand description
Configuration for the JWT token validator.
§Examples
use secure_identity::token::TokenValidatorConfig;
let config = TokenValidatorConfig {
issuer: "https://auth.example.com".to_string(),
audience: "my-api".to_string(),
secret: b"my-hmac-secret".to_vec(),
};Fields§
§issuer: StringThe expected issuer claim (iss).
audience: StringThe expected audience claim (aud).
secret: Vec<u8>The HMAC-SHA256 secret used to verify token signatures.
Auto Trait Implementations§
impl Freeze for TokenValidatorConfig
impl RefUnwindSafe for TokenValidatorConfig
impl Send for TokenValidatorConfig
impl Sync for TokenValidatorConfig
impl Unpin for TokenValidatorConfig
impl UnsafeUnpin for TokenValidatorConfig
impl UnwindSafe for TokenValidatorConfig
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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