[−][src]Struct biscuit::RegisteredClaims
Registered claims defined by RFC7519#4.1
Fields
issuer: Option<String>
Token issuer. Serialized to iss
.
subject: Option<String>
Subject where the JWT is referring to. Serialized to sub
audience: Option<SingleOrMultiple<String>>
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
Implementations
impl RegisteredClaims
[src]
pub fn validate_claim_presence(
&self,
options: ClaimPresenceOptions
) -> Result<(), ValidationError>
[src]
&self,
options: ClaimPresenceOptions
) -> Result<(), ValidationError>
Validates that the token contains the claims defined as required
pub fn validate_exp(
&self,
validation: Validation<TemporalOptions>
) -> Result<(), ValidationError>
[src]
&self,
validation: Validation<TemporalOptions>
) -> Result<(), ValidationError>
Validates that if the token has an exp
claim, it has not passed.
pub fn validate_nbf(
&self,
validation: Validation<TemporalOptions>
) -> Result<(), ValidationError>
[src]
&self,
validation: Validation<TemporalOptions>
) -> Result<(), ValidationError>
Validates that if the token has an nbf
claim, it has passed.
pub fn validate_iat(
&self,
validation: Validation<(Duration, TemporalOptions)>
) -> Result<(), ValidationError>
[src]
&self,
validation: Validation<(Duration, TemporalOptions)>
) -> Result<(), ValidationError>
Validates that if the token has an iat
claim, it is not in the future and not older than the Duration
pub fn validate_aud(
&self,
validation: Validation<String>
) -> Result<(), ValidationError>
[src]
&self,
validation: Validation<String>
) -> Result<(), ValidationError>
Validates that if the token has an aud
claim, it contains an entry which matches the expected audience
pub fn validate_iss(
&self,
validation: Validation<String>
) -> Result<(), ValidationError>
[src]
&self,
validation: Validation<String>
) -> Result<(), ValidationError>
Validates that if the token has an iss
claim, it matches the expected issuer
pub fn validate(
&self,
options: ValidationOptions
) -> Result<(), ValidationError>
[src]
&self,
options: ValidationOptions
) -> Result<(), ValidationError>
Performs full validation of the token according to the ValidationOptions
supplied
First it validates that all claims marked as required are present Then it validates each claim marked to be validated if they are present in the token (even those that are not marked as required, but are present).
Trait Implementations
impl Clone for RegisteredClaims
[src]
fn clone(&self) -> RegisteredClaims
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for RegisteredClaims
[src]
impl Default for RegisteredClaims
[src]
fn default() -> RegisteredClaims
[src]
impl<'de> Deserialize<'de> for RegisteredClaims
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Eq for RegisteredClaims
[src]
impl PartialEq<RegisteredClaims> for RegisteredClaims
[src]
fn eq(&self, other: &RegisteredClaims) -> bool
[src]
fn ne(&self, other: &RegisteredClaims) -> bool
[src]
impl Serialize for RegisteredClaims
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralEq for RegisteredClaims
[src]
impl StructuralPartialEq for RegisteredClaims
[src]
Auto Trait Implementations
impl RefUnwindSafe for RegisteredClaims
impl Send for RegisteredClaims
impl Sync for RegisteredClaims
impl Unpin for RegisteredClaims
impl UnwindSafe for RegisteredClaims
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> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
pub fn equivalent(&self, key: &K) -> bool
[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>,