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
issued_at_required: bool
Whether the iat
or Issued At
field is required
not_before_required: bool
Whether the nbf
or Not Before
field is required
expiry_required: bool
Whether the exp
or Expiry
field is required
epsilon: Option<Duration>
Allow for some clock drifts, limited to this duration during temporal validation
now: Option<DateTime<UTC>>
Specify a time to use in temporal validation instead of Now
.
Trait Implementations
impl Debug for TemporalValidationOptions
[src]
impl Eq for TemporalValidationOptions
[src]
impl PartialEq for TemporalValidationOptions
[src]
fn eq(&self, __arg_0: &TemporalValidationOptions) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &TemporalValidationOptions) -> bool
This method tests for !=
.
impl Clone for TemporalValidationOptions
[src]
fn clone(&self) -> TemporalValidationOptions
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Copy for TemporalValidationOptions
[src]
impl Default for TemporalValidationOptions
[src]
fn default() -> TemporalValidationOptions
Returns the "default value" for a type. Read more