Struct medallion::Payload [] [src]

pub struct Payload<T: Serialize + Deserialize + PartialEq> {
    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 + Deserialize + PartialEq> 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 + Serialize + Deserialize + PartialEq> Debug for Payload<T>
[src]

Formats the value using the given formatter.

impl<T: Default + Serialize + Deserialize + PartialEq> Default for Payload<T>
[src]

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

impl<T: PartialEq + Serialize + Deserialize + 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 !=.