jwt-header
JWT header structure.
The alg defaults to HS256 and typ is automatically set to JWT.
All other fields are optional.
Fields
| Name | Type | Description |
|---|---|---|
| typ | option<string> | The type of JWS: it can only be "JWT" here Defined in RFC7515#4.1.9. |
| alg | algorithm | The algorithm used Defined in RFC7515#4.1.1. |
| cty | option<string> | Content type Defined in RFC7519#5.2. |
| jku | option<string> | JSON Key URL |
| jwk | option<jwk> | JSON Web Key Defined in RFC7515#4.1.3. |
| kid | option<string> | Key ID Defined in RFC7515#4.1.4. |
| x5u | option<string> | X.509 URL Defined in RFC7515#4.1.5. |
| x5c | option<list<string>> | X.509 certificate chain. A Vec of base64 encoded ASN.1 DER certificates. Defined in RFC7515#4.1.6. |
| x5t | option<string> | X.509 SHA1 certificate thumbprint Defined in RFC7515#4.1.7. |
| x5t-s256 | option<string> | X.509 SHA256 certificate thumbprint Defined in RFC7515#4.1.8. This will be serialized/deserialized as "x5t#S256", as defined by the RFC. |
| extras | extras | Any additional non-standard headers not defined in RFC7515#4.1. Once serialized, all keys will be converted to fields at the root level of the header payload Ex: Dict("custom" -> "header") will be converted to "{"typ": "JWT", ..., "custom": "header"}" |