JwtHeader Class

Definition

Initializes a new instance of JwtHeader which contains JSON objects representing the cryptographic operations applied to the JWT and optionally any additional properties of the JWT. The member names within the JWT Header are referred to as Header Parameter Names.

These names MUST be unique and the values must be String(s). The corresponding values are referred to as Header Parameter Values.

public class JwtHeader : System.Collections.Generic.Dictionary<string,object>
type JwtHeader = class
    inherit Dictionary<string, obj>
Public Class JwtHeader
Inherits Dictionary(Of String, Object)
Inheritance
JwtHeader

Constructors

JwtHeader()

Initializes a new instance of the JwtHeader class. Default string comparer Ordinal.

JwtHeader(EncryptingCredentials)

Initializes a new instance of JwtHeader. With the Header Parameters:

{ { typ, JWT }, { alg, EncryptingCredentials.Alg }, { enc, EncryptingCredentials.Enc } }

JwtHeader(EncryptingCredentials, IDictionary<String,String>)

Initializes a new instance of JwtHeader. With the Header Parameters:

{ { typ, JWT }, { alg, EncryptingCredentials.Algorithm } }

JwtHeader(EncryptingCredentials, IDictionary<String,String>, String)

Initializes a new instance of JwtHeader. With the Header Parameters:

{ { typ, JWT }, { alg, EncryptingCredentials.Algorithm } }

JwtHeader(EncryptingCredentials, IDictionary<String,String>, String, IDictionary<String,Object>)

Initializes a new instance of JwtHeader. With the Header Parameters:

{ { typ, JWT }, { alg, EncryptingCredentials.Algorithm } }

JwtHeader(SigningCredentials)

Initializes a new instance of JwtHeader. With the Header Parameters:

{ { typ, JWT }, { alg, SigningCredentials.Algorithm } }

JwtHeader(SigningCredentials, IDictionary<String,String>)

Initializes a new instance of JwtHeader. With the Header Parameters:

{ { typ, JWT }, { alg, SigningCredentials.Algorithm } }

JwtHeader(SigningCredentials, IDictionary<String,String>, String)

Initializes a new instance of JwtHeader. With the Header Parameters:

{ { typ, JWT }, { alg, SigningCredentials.Algorithm } }

JwtHeader(SigningCredentials, IDictionary<String,String>, String, IDictionary<String,Object>)

Initializes a new instance of JwtHeader. With the Header Parameters:

{ { typ, JWT }, { alg, SigningCredentials.Algorithm } }

Properties

Alg

Gets the signature algorithm that was used to create the signature.

Cty

Gets the content mime type (Cty) of the token.

Enc

Gets the encryption algorithm (Enc) of the token.

EncryptingCredentials

Gets the EncryptingCredentials passed in the constructor.

IV

Gets the iv of symmetric key wrap.

Kid

Gets the key identifier for the security key used to sign the token

SigningCredentials

Gets the SigningCredentials passed in the constructor.

Typ

Gets the mime type (Typ) of the token.

X5c

Gets the certificate used to sign the token

X5t

Gets the thumbprint of the certificate used to sign the token

Zip

Gets the 'value' of the 'zip' claim { zip, 'value' }.

Methods

Base64UrlDeserialize(String)

Deserializes Base64UrlEncoded JSON into a JwtHeader instance.

Base64UrlEncode()

Encodes this instance as Base64UrlEncoded JSON.

SerializeToJson()

Serializes this instance to JSON.

Applies to