Skip to content

Structure

JWTHeader

The header (details) used for signing and processing the JWT.
@dynamicMemberLookup struct JWTHeader

Topics

Initializers

Instance Properties

  • alg
    The alg (Algorithm) Header Parameter identifies the cryptographic algorithm used to secure the JWT. Common values include HS256, RS256, etc.
  • crit
    The crit (Critical) Header Parameter indicates that extensions to standard JWT specifications are being used and must be understood and processed.
  • cty
    The cty (Content Type) Header Parameter is used to declare the media type of the payload when the JWT is nested (e.g., encrypted JWT inside a JWT).
  • fields
  • jku
    The jku (JWK Set URL) Header Parameter is a URI that refers to a resource for a set of JSON-encoded public keys, one of which corresponds to the key used to digitally sign the JWT.
  • jwk
    The jwk (JSON Web Key) Header Parameter is a JSON object that represents a cryptographic key. This parameter is used to transmit a key to be used in securing the JWT.
  • kid
    The kid (Key ID) Header Parameter is a hint indicating which key was used to secure the JWT. This parameter allows originators to explicitly signal a change of key to recipients.
  • typ
    The typ (Type) Header Parameter is used to declare the media type of the JWT. While optional, it’s typically set to JWT.
  • x5c
    The x5c (X.509 Certificate Chain) Header Parameter contains a chain of one or more PKIX certificates. Each string in the array is a base64-encoded (Section 4 of [RFC4648] - not base64url-encoded) DER [ITU.X690.1994] PKIX certificate value.
  • x5t
    The x5t (X.509 Certificate SHA-1 Thumbprint) Header Parameter is a base64url-encoded SHA-1 thumbprint (a.k.a. digest) of the DER encoding of the X.509 certificate [RFC5280].
  • x5tS256
    The x5t#S256 (X.509 Certificate SHA-256 Thumbprint) Header Parameter is a base64url-encoded SHA-256 thumbprint of the DER encoding of the X.509 certificate [RFC5280].
  • x5u
    The x5u (X.509 URL) Header Parameter is a URI that refers to a resource for the X.509 public key certificate or certificate chain corresponding to the key used to digitally sign the JWT.

Instance Methods

Subscripts

Default Implementations

Relationships

Conforms To

  • Swift.Copyable
  • Swift.Decodable
  • Swift.Encodable
  • Swift.Escapable
  • Swift.ExpressibleByDictionaryLiteral
  • Swift.Sendable
  • Swift.SendableMetatype