Interface JOSEHeaderConfigurator<A extends JOSEHeaderConfigurator<A>>
- Type Parameters:
A
- the JOSE header configurator type
- All Known Subinterfaces:
JWEHeaderConfigurator<A>
,JWSHeaderConfigurator<A>
A JOSE header configurator is used in JOSEObjectBuilder
or JsonJOSEObjectBuilder
to configure JOSE headers when building JOSE objects.
- Since:
- 1.5
- Author:
- Jeremy Kuhn
-
Method Summary
Modifier and TypeMethodDescriptionaddCustomParameter
(String key, Object value) Specifies a custom parameter to add to the header.specifies the cryptographic algorithm to use to secure the JOSE object.contentType
(String cty) Specifies the media type of the JOSE object payload.Specifies the set of custom parameters that must be understood and processed.Specifies the JWK to use to secure the JOSE object.Specifies the JWK Set URL that contains the key to use to secure the JOSE object.Specifies the id of the key to use to secure the JOSE object.Specifies the media type of the complete JOSE object.x509CertificateChain
(String[] x5c) Specifies the X.509 certificates chain that corresponds to the key to use to secure the JOSE object.Specifies the X.509 SHA1 thumbprint of the certificate that corresponds to the key to use to secure the JOSE object.x509CertificateSHA256Thumbprint
(String x5t_S256) Specifies the X.509 SHA256 thumbprint of the certificate that corresponds to the key to use to secure the JOSE object.x509CertificateURL
(URI x5u) Specifies the URL of the X.509 certificate or certificates chain that corresponds to the key to use to secure the JOSE object.
-
Method Details
-
algorithm
specifies the cryptographic algorithm to use to secure the JOSE object.
Depending on the type of JOSE object to build, it might designate a signature or a key management algorithm.
- Parameters:
alg
- a JWA algorithm- Returns:
- this builder
-
jwkSetURL
Specifies the JWK Set URL that contains the key to use to secure the JOSE object.
The URL must points to a set of JSON-encoded public keys.
- Parameters:
jku
- the JWK Set URL- Returns:
- this builder
-
jwk
Specifies the JWK to use to secure the JOSE object.
It is represented as a map to comply with the JOSE object definition, the builder eventually tries to resolve an actual JWK based on these parameters.
- Parameters:
jwk
- a JWK as a map- Returns:
- this builder
-
keyId
Specifies the id of the key to use to secure the JOSE object.
- Parameters:
kid
- a key id- Returns:
- this builder
-
x509CertificateURL
Specifies the URL of the X.509 certificate or certificates chain that corresponds to the key to use to secure the JOSE object.
The certificates chain located at the URL must be in PEM format. The first certificate in the chain must correspond to the key to use to secure the JOSE object.
- Parameters:
x5u
- a URL- Returns:
- this builder
-
x509CertificateChain
Specifies the X.509 certificates chain that corresponds to the key to use to secure the JOSE object.
The certificates chain must be represented as an array of Base64URL encoded DER PKIX certificates. The first certificate in the chain must correspond to the key to use to secure the JOSE object.
- Parameters:
x5c
- a certificates chain- Returns:
- this builder
-
x509CertificateSHA1Thumbprint
Specifies the X.509 SHA1 thumbprint of the certificate that corresponds to the key to use to secure the JOSE object.
- Parameters:
x5t
- an X.509 SHA1 thumbprint- Returns:
- this builder
-
x509CertificateSHA256Thumbprint
Specifies the X.509 SHA256 thumbprint of the certificate that corresponds to the key to use to secure the JOSE object.
- Parameters:
x5t_S256
- an X.509 SHA256 thumbprint- Returns:
- this builder
-
type
Specifies the media type of the complete JOSE object.
To keep messages compact in common situations, the
application/
prefix of a media type can be omitted when no other/
appears in the value.- Parameters:
typ
- a media type- Returns:
- this builder
-
contentType
Specifies the media type of the JOSE object payload.
To keep messages compact in common situations, the
application/
prefix of a media type can be omitted when no other/
appears in the value.The builder might use this media type to determine how to serialize/deserialize a JOSE object payload.
- Parameters:
cty
- a media type- Returns:
- this builder
-
critical
Specifies the set of custom parameters that must be understood and processed.
Critical parameters can not be registered JOSE header parameters and they must be present in header's custom parameters.
- Parameters:
crit
- a set of custom parameters- Returns:
- this builder
-
addCustomParameter
Specifies a custom parameter to add to the header.
- Parameters:
key
- the custom parameter namevalue
- the custom parameter value- Returns:
- this builder
-