public static class OctetSequenceKey.Builder extends Object
Example use:
OctetSequenceKey key = new OctetSequenceKey.Builder(k).
setAlgorithm(JWSAlgorithm.HS512).
setKeyID("123").
build();
| Constructor and Description |
|---|
OctetSequenceKey.Builder(Base64URL k)
Creates a new octet sequence JWK builder.
|
| Modifier and Type | Method and Description |
|---|---|
OctetSequenceKey |
build()
Builds a new octet sequence JWK.
|
OctetSequenceKey.Builder |
setAlgorithm(Algorithm alg)
Sets the intended JOSE algorithm (
alg) for the JWK. |
OctetSequenceKey.Builder |
setKeyID(String kid)
Sets the ID (
kid) of the JWK. |
OctetSequenceKey.Builder |
setKeyUse(Use use)
Sets the use (
use) of the JWK. |
OctetSequenceKey.Builder |
setX509CertChain(List<Base64> x5c)
Sets the X.509 certificate chain (
x5c) of the JWK. |
OctetSequenceKey.Builder |
setX509CertThumbprint(Base64URL x5t)
Sets the X.509 certificate thumbprint (
x5t) of the
JWK. |
OctetSequenceKey.Builder |
setX509CertURL(URL x5u)
Sets the X.509 certificate URL (
x5u) of the JWK. |
public OctetSequenceKey.Builder(Base64URL k)
k - The key value. It is represented as the Base64URL
encoding of value's big endian representation. Must
not be null.public OctetSequenceKey.Builder setKeyUse(Use use)
use) of the JWK.use - The key use, null if not specified or if
the key is intended for signing as well as
encryption.public OctetSequenceKey.Builder setAlgorithm(Algorithm alg)
alg) for the JWK.alg - The intended JOSE algorithm, null if not
specified.public OctetSequenceKey.Builder setKeyID(String kid)
kid) of the JWK. The key ID can be used
to match a specific key. This can be used, for instance, to
choose a key within a JWKSet during key rollover.
The key ID may also correspond to a JWS/JWE kid
header parameter value.kid - The key ID, null if not specified.public OctetSequenceKey.Builder setX509CertURL(URL x5u)
x5u) of the JWK.x5u - The X.509 certificate URL, null if not
specified.public OctetSequenceKey.Builder setX509CertThumbprint(Base64URL x5t)
x5t) of the
JWK.x5t - The X.509 certificate thumbprint, null if
not specified.public OctetSequenceKey.Builder setX509CertChain(List<Base64> x5c)
x5c) of the JWK.x5c - The X.509 certificate chain as a unmodifiable
list, null if not specified.public OctetSequenceKey build()
Copyright © 2013 NimbusDS. All Rights Reserved.