public final class JoseHeader extends Object
Jwt
, JWT JOSE Header, JWS JOSE Header, JWE JOSE HeaderModifier and Type | Class and Description |
---|---|
static class | JoseHeader.Builder A builder for JoseHeader . |
Modifier and Type | Method and Description |
---|---|
static JoseHeader.Builder | from(JoseHeader headers) Returns a new JoseHeader.Builder , initialized with the provided headers . |
String | getContentType() Returns the content type header that declares the media type of the secured content (the payload). |
Set<String> | getCritical() Returns the critical headers that indicates which extensions to the JWS/JWE/JWA specifications are being used that MUST be understood and processed. |
<T> T | getHeader(String name) Returns the header value. |
Map<String,Object> | getHeaders() Returns the headers. |
Map<String,Object> | getJwk() Returns the JSON Web Key which is the public key that corresponds to the key used to digitally sign the JWS or encrypt the JWE. |
String | getJwkSetUri() Returns the JWK Set URL that refers to the resource of a set of JSON-encoded public keys, one of which corresponds to the key used to digitally sign the JWS or encrypt the JWE. |
JwsAlgorithm | getJwsAlgorithm() Returns the JWS algorithm used to digitally sign the JWS. |
String | getKeyId() Returns the key ID that is a hint indicating which key was used to secure the JWS or JWE. |
String | getType() Returns the type header that declares the media type of the JWS/JWE. |
List<String> | getX509CertificateChain() Returns the X.509 certificate chain that contains the X.509 public key certificate or certificate chain corresponding to the key used to digitally sign the JWS or encrypt the JWE. |
String | getX509SHA1Thumbprint() Returns the X.509 certificate SHA-1 thumbprint that is a base64url-encoded SHA-1 thumbprint (a.k.a. |
String | getX509SHA256Thumbprint() Returns the X.509 certificate SHA-256 thumbprint that is a base64url-encoded SHA-256 thumbprint (a.k.a. |
String | getX509Uri() Returns the X.509 URL that refers to the resource for the X.509 public key certificate or certificate chain corresponding to the key used to digitally sign the JWS or encrypt the JWE. |
static JoseHeader.Builder | withAlgorithm(JwsAlgorithm jwsAlgorithm) Returns a new JoseHeader.Builder , initialized with the provided JwsAlgorithm . |
public JwsAlgorithm getJwsAlgorithm()
public String getJwkSetUri()
public Map<String,Object> getJwk()
public String getKeyId()
public String getX509Uri()
public List<String> getX509CertificateChain()
public String getX509SHA1Thumbprint()
public String getX509SHA256Thumbprint()
public Set<String> getCritical()
public String getType()
public String getContentType()
public <T> T getHeader(String name)
T
- the type of the header valuename
- the header namepublic static JoseHeader.Builder withAlgorithm(JwsAlgorithm jwsAlgorithm)
JoseHeader.Builder
, initialized with the provided JwsAlgorithm
.jwsAlgorithm
- the JwsAlgorithm
JoseHeader.Builder
public static JoseHeader.Builder from(JoseHeader headers)
JoseHeader.Builder
, initialized with the provided headers
.headers
- the headersJoseHeader.Builder