Struct biscuit::RegisteredClaims
[−]
[src]
pub struct RegisteredClaims { pub issuer: Option<StringOrUri>, pub subject: Option<StringOrUri>, pub audience: Option<SingleOrMultiple<StringOrUri>>, pub expiry: Option<Timestamp>, pub not_before: Option<Timestamp>, pub issued_at: Option<Timestamp>, pub id: Option<String>, }
Registered claims defined by RFC7519#4.1
Fields
issuer: Option<StringOrUri>
Token issuer. Serialized to iss
.
subject: Option<StringOrUri>
Subject where the JWT is referring to. Serialized to sub
audience: Option<SingleOrMultiple<StringOrUri>>
Audience intended for the JWT. Serialized to aud
expiry: Option<Timestamp>
Expiration time in seconds since Unix Epoch. Serialized to exp
not_before: Option<Timestamp>
Not before time in seconds since Unix Epoch. Serialized to nbf
issued_at: Option<Timestamp>
Issued at Time in seconds since Unix Epoch. Serialized to iat
id: Option<String>
Application specific JWT ID. Serialized to jti
Methods
impl RegisteredClaims
[src]
fn validate_times(
&self,
options: Option<TemporalValidationOptions>
) -> Result<(), ValidationError>
[src]
&self,
options: Option<TemporalValidationOptions>
) -> Result<(), ValidationError>
Validate the temporal claims in the token
If None
is provided for options, the defaults will apply.
By default, no temporal claims (namely iat
, exp
, nbf
)
are required, and they will pass validation if they are missing.
Trait Implementations
impl Clone for RegisteredClaims
[src]
fn clone(&self) -> RegisteredClaims
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for RegisteredClaims
[src]
impl Eq for RegisteredClaims
[src]
impl PartialEq for RegisteredClaims
[src]
fn eq(&self, __arg_0: &RegisteredClaims) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &RegisteredClaims) -> bool
[src]
This method tests for !=
.
impl Default for RegisteredClaims
[src]
fn default() -> RegisteredClaims
[src]
Returns the "default value" for a type. Read more