public interface ProtectedHeader extends Header, X509Accessor
ALGORITHM, COMPRESSION_ALGORITHM, CONTENT_TYPE, DEPRECATED_COMPRESSION_ALGORITHM, JWT_TYPE, TYPE
Modifier and Type | Method and Description |
---|---|
Set<String> |
getCritical()
Returns the header parameter names that use extensions to the JWT or JWA specification(s) that MUST
be understood and supported by the JWT recipient, or
null if not present. |
PublicJwk<?> |
getJwk()
Returns the
jwk (JSON Web Key) associated with the JWT. |
URI |
getJwkSetUrl()
Returns the
jku (JWK Set URL) value that refers to a
JWK Set
resource containing JSON-encoded Public Keys, or null if not present. |
String |
getKeyId()
Returns the JWT case-sensitive
kid (Key ID) header value or null if not present. |
getAlgorithm, getCompressionAlgorithm, getContentType, getType
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
getX509Chain, getX509Sha1Thumbprint, getX509Sha256Thumbprint, getX509Url
URI getJwkSetUrl()
jku
(JWK Set URL) value that refers to a
JWK Set
resource containing JSON-encoded Public Keys, or null
if not present. When present in a
JwsHeader
, the first public key in the JWK Set must be the public key complement of the private
key used to sign the JWS. When present in a JweHeader
, the first public key in the JWK Set must
be the public key used during encryption.null
if not present.PublicJwk<?> getJwk()
jwk
(JSON Web Key) associated with the JWT. When present in a JwsHeader
, the
jwk
is the public key complement of the private key used to digitally sign the JWS. When present in a
JweHeader
, the jwk
is the public key to which the JWE was encrypted, and may be used to
determine the private key needed to decrypt the JWE.jwk
(JSON Web Key) associated with the header.String getKeyId()
kid
(Key ID) header value or null
if not present.
The keyId header parameter is a hint indicating which key was used to secure a JWS or JWE. This parameter allows originators to explicitly signal a change of key to recipients. The structure of the keyId value is unspecified. Its value is a CaSe-SeNsItIvE string.
When used with a JWK, the keyId value is used to match a JWK keyId
parameter value.
kid
header value or null
if not present.Set<String> getCritical()
null
if not present.null
if not present.Copyright © 2014–2025 jsonwebtoken.io. All rights reserved.