Struct medallion::Payload[][src]

pub struct Payload<T = ()> {
    pub iss: Option<String>,
    pub sub: Option<String>,
    pub aud: Option<String>,
    pub exp: Option<u64>,
    pub nbf: Option<u64>,
    pub iat: Option<u64>,
    pub jti: Option<String>,
    pub claims: Option<T>,
}

A default claim set, including the standard, or registered, claims and the ability to specify your own as custom claims.

Fields

Methods

impl<T: Serialize + DeserializeOwned> Payload<T>
[src]

This implementation simply parses the base64 data twice, first parsing out the standard claims then any custom claims, assigning the latter into a copy of the former before returning registered and custom claims.

Renders both the standard and custom claims into a single consolidated JSON representation before encoding.

Trait Implementations

impl<T: Debug> Debug for Payload<T>
[src]

Formats the value using the given formatter. Read more

impl<T: Default> Default for Payload<T>
[src]

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

impl<T: PartialEq> PartialEq for Payload<T>
[src]

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

This method tests for !=.

Auto Trait Implementations

impl<T> Send for Payload<T> where
    T: Send

impl<T> Sync for Payload<T> where
    T: Sync