[−][src]Struct aliri_jose::jwt::CoreValidator
A core validator for JWTs
A default validator configured with common expected validations.
Implementations
impl CoreValidator
[src]
pub fn with_leeway(self, leeway: Duration) -> Self
[src]
Allows a grace period for token validation
Applies on either side of the "not before" and "expires" claims.
pub fn with_leeway_secs(self, leeway: u64) -> Self
[src]
Allows a grace period (in seconds) for token validation
Applies on either side of the "not before" and "expires" claims.
pub fn check_expiration(self) -> Self
[src]
Enforces expiration checks
pub fn check_not_before(self) -> Self
[src]
Enforces "not valid before" checks
pub fn ignore_expiration(self) -> Self
[src]
Skips expiration checks
pub fn ignore_not_before(self) -> Self
[src]
Skips "not valid before" checks
pub fn add_allowed_audience(self, audience: Audience) -> Self
[src]
Adds a single audience to the set of allowed audiences
pub fn extend_allowed_audiences<I: IntoIterator<Item = Audience>>(
self,
alg: I
) -> Self
[src]
self,
alg: I
) -> Self
Adds mutliple audiences to the set of allowed audiences
pub fn add_approved_algorithm(self, alg: Algorithm) -> Self
[src]
Approves a single algorithm
pub fn extend_approved_algorithms<I: IntoIterator<Item = Algorithm>>(
self,
alg: I
) -> Self
[src]
self,
alg: I
) -> Self
Approves multiple algorithms
pub fn require_issuer(self, issuer: Issuer) -> Self
[src]
Require that tokens specify a particular issuer
pub fn check_subject(self, sub_regex: Regex) -> Self
[src]
Require that the sub
claim exists and matches a particular
regular expression
Trait Implementations
impl Clone for CoreValidator
[src]
fn clone(&self) -> CoreValidator
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for CoreValidator
[src]
impl Default for CoreValidator
[src]
Auto Trait Implementations
impl !RefUnwindSafe for CoreValidator
impl Send for CoreValidator
impl Sync for CoreValidator
impl Unpin for CoreValidator
impl UnwindSafe for CoreValidator
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,