public static class JoseHeader.Builder extends Object
JoseHeader
.Modifier and Type | Method and Description |
---|---|
JoseHeader | build() Builds a new JoseHeader . |
JoseHeader.Builder | contentType(String contentType) Sets the content type header that declares the media type of the secured content (the payload). |
JoseHeader.Builder | critical(Set<String> headerNames) Sets the critical headers that indicates which extensions to the JWS/JWE/JWA specifications are being used that MUST be understood and processed. |
JoseHeader.Builder | header(String name, Object value) Sets the header. |
JoseHeader.Builder | headers(Consumer<Map<String,Object>> headersConsumer) A Consumer to be provided access to the headers allowing the ability to add, replace, or remove. |
JoseHeader.Builder | jwk(Map<String,Object> jwk) Sets the JSON Web Key which is the public key that corresponds to the key used to digitally sign the JWS or encrypt the JWE. |
JoseHeader.Builder | jwkSetUri(String jwkSetUri) Sets 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. |
JoseHeader.Builder | keyId(String keyId) Sets the key ID that is a hint indicating which key was used to secure the JWS or JWE. |
JoseHeader.Builder | type(String type) Sets the type header that declares the media type of the JWS/JWE. |
JoseHeader.Builder | x509CertificateChain(List<String> x509CertificateChain) Sets 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. |
JoseHeader.Builder | x509SHA1Thumbprint(String x509SHA1Thumbprint) Sets the X.509 certificate SHA-1 thumbprint that is a base64url-encoded SHA-1 thumbprint (a.k.a. |
JoseHeader.Builder | x509SHA256Thumbprint(String x509SHA256Thumbprint) Sets the X.509 certificate SHA-256 thumbprint that is a base64url-encoded SHA-256 thumbprint (a.k.a. |
JoseHeader.Builder | x509Uri(String x509Uri) Sets 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. |
public JoseHeader.Builder jwkSetUri(String jwkSetUri)
jwkSetUri
- the JWK Set URLJoseHeader.Builder
public JoseHeader.Builder jwk(Map<String,Object> jwk)
jwk
- the JSON Web KeyJoseHeader.Builder
public JoseHeader.Builder keyId(String keyId)
keyId
- the key IDJoseHeader.Builder
public JoseHeader.Builder x509Uri(String x509Uri)
x509Uri
- the X.509 URLJoseHeader.Builder
public JoseHeader.Builder x509CertificateChain(List<String> x509CertificateChain)
x509CertificateChain
- the X.509 certificate chainJoseHeader.Builder
public JoseHeader.Builder x509SHA1Thumbprint(String x509SHA1Thumbprint)
x509SHA1Thumbprint
- the X.509 certificate SHA-1 thumbprintJoseHeader.Builder
public JoseHeader.Builder x509SHA256Thumbprint(String x509SHA256Thumbprint)
x509SHA256Thumbprint
- the X.509 certificate SHA-256 thumbprintJoseHeader.Builder
public JoseHeader.Builder critical(Set<String> headerNames)
headerNames
- the critical header namesJoseHeader.Builder
public JoseHeader.Builder type(String type)
type
- the type headerJoseHeader.Builder
public JoseHeader.Builder contentType(String contentType)
contentType
- the content type headerJoseHeader.Builder
public JoseHeader.Builder header(String name, Object value)
name
- the header namevalue
- the header valueJoseHeader.Builder
public JoseHeader.Builder headers(Consumer<Map<String,Object>> headersConsumer)
Consumer
to be provided access to the headers allowing the ability to add, replace, or remove.headersConsumer
- a Consumer
of the headersJoseHeader.Builder
public JoseHeader build()
JoseHeader
.JoseHeader