Struct asap_deps_jsonwebtoken::Header[][src]

pub struct Header {
    pub typ: Option<String>,
    pub alg: Algorithm,
    pub cty: Option<String>,
    pub jku: Option<String>,
    pub kid: Option<String>,
    pub x5u: Option<String>,
    pub x5t: Option<String>,
}

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

Fields

The type of JWS: it can only be "JWT" here

Defined in RFC7515#4.1.9.

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. Read more

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 the default Algorithm, HS256

Auto Trait Implementations

impl Send for Header

impl Sync for Header