Struct biscuit::TemporalValidationOptions [] [src]

pub struct TemporalValidationOptions {
    pub issued_at_required: bool,
    pub not_before_required: bool,
    pub expiry_required: bool,
    pub epsilon: Option<Duration>,
    pub now: Option<DateTime<UTC>>,
}

Options for claims time validation By default, no temporal claims (namely iat, exp, nbf) are required, and they will pass validation if they are missing. Should any temporal claims be needed, set the appropriate fields. To deal with clock drifts, you might want to provide an epsilon error margin in the form of a std::time::Duration to allow time comparisons to fall within the margin.

Fields

Whether the iat or Issued At field is required

Whether the nbf or Not Before field is required

Whether the exp or Expiry field is required

Allow for some clock drifts, limited to this duration during temporal validation

Specify a time to use in temporal validation instead of Now.

Trait Implementations

impl Debug for TemporalValidationOptions
[src]

Formats the value using the given formatter.

impl Eq for TemporalValidationOptions
[src]

impl PartialEq for TemporalValidationOptions
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Clone for TemporalValidationOptions
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Copy for TemporalValidationOptions
[src]

impl Default for TemporalValidationOptions
[src]

Returns the "default value" for a type. Read more