Struct medallion::Token [] [src]

pub struct Token<H, C> where H: Serialize + Deserialize + PartialEq,
        C: Serialize + Deserialize + PartialEq
{ 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 + Deserialize + PartialEq,
        C: Serialize + Deserialize + PartialEq
[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> where H: Serialize + Deserialize + PartialEq,
        C: Serialize + Deserialize + PartialEq
[src]

Formats the value using the given formatter.

impl<H: Default, C: Default> Default for Token<H, C> where H: Serialize + Deserialize + PartialEq,
        C: Serialize + Deserialize + PartialEq
[src]

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

impl<H, C> PartialEq for Token<H, C> where H: Serialize + Deserialize + PartialEq,
        C: Serialize + Deserialize + PartialEq
[src]

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

This method tests for !=.