Struct medallion::Token[][src]

pub struct Token<H = (), C = ()> {
    pub header: Header<H>,
    pub payload: Payload<C>,
    // some fields omitted
}

Main struct representing a JSON Web Token, composed of a header and a set of claims.

Fields

Methods

impl<H, C> Token<H, C> where
    H: Serialize + DeserializeOwned,
    C: Serialize + DeserializeOwned
[src]

Provide the ability to parse a token, verify it and sign/serialize it.

Parse a token from a string.

Verify a token with a key and the token's specific algorithm.

Generate the signed token from a key with the specific algorithm as a url-safe, base64 string.

Trait Implementations

impl<H: Debug, C: Debug> Debug for Token<H, C>
[src]

Formats the value using the given formatter. Read more

impl<H: Default, C: Default> Default for Token<H, C>
[src]

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

impl<H, C> PartialEq for Token<H, C> where
    H: PartialEq,
    C: PartialEq
[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<H, C> Send for Token<H, C> where
    C: Send,
    H: Send

impl<H, C> Sync for Token<H, C> where
    C: Sync,
    H: Sync