T
- header typepublic interface JwsHeader<T extends JwsHeader<T>> extends Header<T>
限定符和类型 | 字段和说明 |
---|---|
static java.lang.String |
ALGORITHM
JWS
Algorithm header parameter name: "alg" |
static java.lang.String |
CRITICAL
JWS
Critical header parameter name: "crit" |
static java.lang.String |
JSON_WEB_KEY
JWS
JSON Web Key header parameter name: "jwk" |
static java.lang.String |
JWK_SET_URL
JWS
JWT Set URL header parameter name: "jku" |
static java.lang.String |
KEY_ID
JWS
Key ID header parameter name: "kid" |
static java.lang.String |
X509_CERT_CHAIN
JWS
X.509 Certificate Chain header parameter name: "x5c" |
static java.lang.String |
X509_CERT_SHA1_THUMBPRINT
JWS
X.509 Certificate SHA-1 Thumbprint header parameter name: "x5t" |
static java.lang.String |
X509_CERT_SHA256_THUMBPRINT
JWS
X.509 Certificate SHA-256 Thumbprint header parameter name: "x5t#S256" |
static java.lang.String |
X509_URL
JWS
X.509 URL header parameter name: "x5u" |
COMPRESSION_ALGORITHM, CONTENT_TYPE, DEPRECATED_COMPRESSION_ALGORITHM, JWT_TYPE, TYPE
限定符和类型 | 方法和说明 |
---|---|
java.lang.String |
getAlgorithm()
Returns the JWS
alg (algorithm) header value or null if not present. |
java.lang.String |
getKeyId()
Returns the JWS
kid (Key ID) header value or null if not present. |
T |
setAlgorithm(java.lang.String alg)
Sets the JWT
alg (Algorithm) header value. |
T |
setKeyId(java.lang.String kid)
Sets the JWT
kid (Key ID) header value. |
getCompressionAlgorithm, getContentType, getType, setCompressionAlgorithm, setContentType, setType
static final java.lang.String ALGORITHM
Algorithm
header parameter name: "alg"
static final java.lang.String JWK_SET_URL
JWT Set URL
header parameter name: "jku"
static final java.lang.String JSON_WEB_KEY
JSON Web Key
header parameter name: "jwk"
static final java.lang.String KEY_ID
Key ID
header parameter name: "kid"
static final java.lang.String X509_URL
X.509 URL
header parameter name: "x5u"
static final java.lang.String X509_CERT_CHAIN
X.509 Certificate Chain
header parameter name: "x5c"
static final java.lang.String X509_CERT_SHA1_THUMBPRINT
X.509 Certificate SHA-1 Thumbprint
header parameter name: "x5t"
static final java.lang.String X509_CERT_SHA256_THUMBPRINT
X.509 Certificate SHA-256 Thumbprint
header parameter name: "x5t#S256"
static final java.lang.String CRITICAL
Critical
header parameter name: "crit"
java.lang.String getAlgorithm()
alg
(algorithm) header value or null
if not present.
The algorithm header parameter identifies the cryptographic algorithm used to secure the JWS. Consider
using SignatureAlgorithm.forName
to convert this
string value to a type-safe enum instance.
alg
header value or null
if not present. This will always be
non-null
on validly constructed JWS instances, but could be null
during construction.T setAlgorithm(java.lang.String alg)
alg
(Algorithm) header value. A null
value will remove the property from the JSON map.
The algorithm header parameter identifies the cryptographic algorithm used to secure the JWS. Consider
using a type-safe SignatureAlgorithm
instance and using its
value
as the argument to this method.
alg
- the JWS alg
header value or null
to remove the property from the JSON map.Header
instance for method chaining.java.lang.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 the JWS. This parameter allows originators to explicitly signal a change of key to recipients. The structure of the keyId value is unspecified.
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.T setKeyId(java.lang.String kid)
kid
(Key ID) header value. A null
value will remove the property from the JSON map.
The keyId header parameter is a hint indicating which key was used to secure the JWS. This parameter allows originators to explicitly signal a change of key to recipients. The structure of the keyId value is unspecified.
When used with a JWK, the keyId value is used to match a JWK keyId
parameter value.
kid
- the JWS kid
header value or null
to remove the property from the JSON map.Header
instance for method chaining.