Struct jsonwebtoken::Header [] [src]

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

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

Fields

The algorithm used

Defined in RFC7515#4.1.1.

Content type

Defined in RFC7519#5.2.

JSON Key URL

Defined in RFC7515#4.1.2.

Key ID

Defined in RFC7515#4.1.4.

X.509 URL

Defined in RFC7515#4.1.5.

X.509 certificate thumbprint

Defined in RFC7515#4.1.7.

Methods

impl Header
[src]

Returns a JWT header with the algorithm given

Trait Implementations

impl Debug for Header
[src]

Formats the value using the given formatter.

impl Clone for Header
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for Header
[src]

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

This method tests for !=.

impl Default for Header
[src]

Returns a JWT header using HS256