pub struct SecureJwtConfigBuilder { /* private fields */ }Expand description
A builder for SecureJwtConfig
Implementations§
Source§impl SecureJwtConfigBuilder
impl SecureJwtConfigBuilder
Sourcepub fn with_algorithm(self, algo: Algorithm) -> Self
pub fn with_algorithm(self, algo: Algorithm) -> Self
Allow a specific JSON Web Signature algorithm
Sourcepub fn with_algorithms(self, algos: Vec<Algorithm>) -> Self
pub fn with_algorithms(self, algos: Vec<Algorithm>) -> Self
Set the allowed algorithms, replacing any existing
Sourcepub fn require_issuer(self, issuer: impl Into<String>) -> Self
pub fn require_issuer(self, issuer: impl Into<String>) -> Self
Require a specific issuer string
Sourcepub fn require_audience(self, audience: impl Into<String>) -> Self
pub fn require_audience(self, audience: impl Into<String>) -> Self
Require a specific audience string
Sourcepub fn with_max_lifetime(self, lifetime: Duration) -> Self
pub fn with_max_lifetime(self, lifetime: Duration) -> Self
Set the maximum allowed lifetime of a token before it is rejected
Sourcepub fn with_clock_skew(self, skew: Duration) -> Self
pub fn with_clock_skew(self, skew: Duration) -> Self
Set the allowed clock skew when evaluating timestamps
Sourcepub fn require_jti(self, require: bool) -> Self
pub fn require_jti(self, require: bool) -> Self
Set whether a JWT ID (jti) claim is required
Sourcepub fn with_secret(self, secret: impl Into<String>) -> Self
pub fn with_secret(self, secret: impl Into<String>) -> Self
Set the HMAC signing secret (required for symmetric signing operations)
Sourcepub fn build(self) -> SecureJwtConfig
pub fn build(self) -> SecureJwtConfig
Build the SecureJwtConfig
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SecureJwtConfigBuilder
impl RefUnwindSafe for SecureJwtConfigBuilder
impl Send for SecureJwtConfigBuilder
impl Sync for SecureJwtConfigBuilder
impl Unpin for SecureJwtConfigBuilder
impl UnsafeUnpin for SecureJwtConfigBuilder
impl UnwindSafe for SecureJwtConfigBuilder
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more