JWTHeaderKey
public enum JWTHeaderKey : String
The contents of the JOSE Header (Javascript Object Signing and Encryption) describe the cryptographic operations applied to the JWT Claims Set. If the JOSE Header is for a JWS, the JWT is represented as a JWS and the claims are digitally signed or MACed, with the JWT Claims Set being the JWS Payload. If the JOSE Header is for a JWE, the JWT is represented as a JWE and the claims are encrypted, with the JWT Claims Set being the plaintext encrypted by the JWE. A JWT may be enclosed in another JWE or JWS structure to create a Nested JWT, enabling nested signing and encryption to be performed.
-
“alg” values should either be registered in the IANA “JSON Web Signature and Encryption Algorithms” registry established by [JWA#https://tools.ietf.org/html/rfc7515#ref-JWA] or be a value that contains a Collision-Resistant Name.
Declaration
Swift
case algorithm = "alg" -
The “jku” (JWK Set URL) Header Parameter is a URI [RFC3986] 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 JWS.
Declaration
Swift
case jwkSetUrl = "jku" -
The “jwk” (JSON Web Key) Header Parameter is the public key that corresponds to the key used to digitally sign the JWS. This key is represented as a JSON Web Key [JWK#https://tools.ietf.org/html/rfc7515#ref-JWK].
Declaration
Swift
case jsonWebKey = "jwk" -
The “kid” (key ID) Header Parameter is a hint indicating which key was used to secure the JWS. Its value MUST be a case-sensitive string.
Declaration
Swift
case keyId = "kid" -
The “x5u” (X.509 URL) Header Parameter is a URI [RFC3986] that refers to a resource for the X.509 public key certificate or certificate chain [RFC5280] corresponding to the key used to digitally sign the JWS.
Declaration
Swift
case x509Url = "x5u" -
The “x5c” (X.509 certificate chain) Header Parameter contains the X.509 public key certificate or certificate chain [RFC5280] corresponding to the key used to digitally sign the JWS. The certificate or certificate chain is represented as a JSON array of base64-encoded PKIX certificate value strings.
Declaration
Swift
case x509Certificate = "x5c" -
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] corresponding to the key used to digitally sign the JWS.
Declaration
Swift
case x509S1Thumbprint = "x5t" -
The “x5t#S256” (X.509 certificate SHA-256 thumbprint) Header Parameter is a base64url-encoded SHA-256 thumbprint (a.k.a. digest) of the DER encoding of the X.509 certificate [RFC5280] corresponding to the key used to digitally sign the JWS.
Declaration
Swift
case x509S256Thumbprint = "x5t#256" -
The “typ” (type) Header Parameter is used by JWS applications to declare the media type [IANA.MediaTypes#https://tools.ietf.org/html/rfc7515#ref-IANA.MediaTypes] of this complete JWS. The “typ” value “JOSE” can be used by applications to indicate that this object is a JWS or JWE using the JWS Compact Serialization or the JWE Compact Serialization. The “typ” value “JOSE+JSON” can be used by applications to indicate that this object is a JWS or JWE using the JWS JSON Serialization or the JWE JSON Serialization. Other type values can also be used by applications.
Declaration
Swift
case type = "typ" -
The “cty” (content type) Header Parameter is used by JWS applications to declare the media type [IANA.MediaTypes] of the secured content (the payload).
Declaration
Swift
case contentType = "cty" -
The “crit” (critical) Header Parameter indicates that extensions to [JWS#https://tools.ietf.org/html/rfc7515] specification and/or [JWA] are being used that MUST be understood and processed. Its value is an array listing the Header Parameter names present in the JOSE Header that use those extensions.
Declaration
Swift
case critical = "crit"