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.
var x5u: String? { get set }
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.
var x5u: String? { get set }
import JWTKit
🔑 JSON Web Token signing and verification (HMAC, RSA, PSS, ECDSA, EdDSA) using SwiftCrypto.
@dynamicMemberLookup struct JWTHeader
The header (details) used for signing and processing the JWT.
@frozen struct String
A Unicode string value that is a collection of characters.
init(dictionaryLiteral elements: (String, JWTHeaderField)...)
init(fields: [String : JWTHeaderField] = [:])
init(from decoder: Decoder) throws
var alg: String? { get set }
The alg
(Algorithm) Header Parameter identifies the cryptographic algorithm used to secure the JWT. Common values include HS256
, RS256
, etc.
var crit: [String]? { get set }
The crit
(Critical) Header Parameter indicates that extensions to standard JWT specifications are being used and must be understood and processed.
var cty: String? { get set }
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).
var fields: [String : JWTHeaderField]
var jku: String? { get set }
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.
var jwk: [String : JWTHeaderField]? { get set }
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.
var kid: String? { get set }
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.
var typ: String? { get set }
The typ
(Type) Header Parameter is used to declare the media type of the JWT. While optional, it’s typically set to JWT
.
var x5c: [String]? { get set }
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.
var x5t: String? { get set }
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].
var x5tS256: String? { get set }
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].
subscript(dynamicMember member: String) -> JWTHeaderField? { get set }
func encode(to encoder: Encoder) throws
mutating func remove(_ field: String)