Struct jsonwebtoken::Header [] [src]

pub struct Header {
    pub alg: Algorithm,
    pub jku: Option<String>,
    pub kid: Option<String>,
    pub x5u: Option<String>,
    pub x5t: Option<String>,
    // some fields omitted
}

A basic JWT header part, the alg defaults to HS256 and typ is automatically set to JWT. All the other fields are optional

Fields

alg: Algorithm jku: Option<String> kid: Option<String> x5u: Option<String> x5t: Option<String>

Methods

impl Header
[src]

fn new(algorithm: Algorithm) -> Header

Trait Implementations

impl Decodable for Header
[src]

fn decode<__D: Decoder>(__arg_0: &mut __D) -> Result<Header, __D::Error>

impl PartialEq for Header
[src]

fn eq(&self, __arg_0: &Header) -> bool

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

fn ne(&self, __arg_0: &Header) -> bool

This method tests for !=.

impl Debug for Header
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Default for Header
[src]

fn default() -> Header

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

impl Encodable for Header
[src]

fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error>

impl ToJson for Header
[src]

fn to_json(&self) -> Json

Converts the value of self to an instance of JSON