[][src]Struct jwt_simple::common::VerificationOptions

pub struct VerificationOptions {
    pub reject_before: Option<UnixTimeStamp>,
    pub accept_future: bool,
    pub required_issuer: Option<String>,
    pub required_subject: Option<String>,
    pub required_key_id: Option<String>,
    pub required_public_key: Option<String>,
    pub required_nonce: Option<String>,
    pub required_audience: Option<String>,
    pub time_tolerance: Option<Duration>,
    pub max_validity: Option<Duration>,
}

Additional features to enable during verification

Fields

reject_before: Option<UnixTimeStamp>

Reject tokens created before the given date

For a given user, the time of the last successful authentication can be kept in a database, and reject_before can then be used to reject older (replayed) tokens.

accept_future: bool

Accept tokens created with a date in the future

required_issuer: Option<String>

Require a specific issuer to be present

required_subject: Option<String>

Require a specific subject to be present

required_key_id: Option<String>

Require a specific key identifierto be present

required_public_key: Option<String>

Require a specific public key to be present

required_nonce: Option<String>

Require a specific nonce to be present

required_audience: Option<String>

Require a specific audience to be present

time_tolerance: Option<Duration>

Time tolerance for validating expiration dates

max_validity: Option<Duration>

Reject tokens created more than max_validity ago

Trait Implementations

impl Clone for VerificationOptions[src]

impl Debug for VerificationOptions[src]

impl Default for VerificationOptions[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Conv for T

impl<T> FmtForward for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> TryConv for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,