| Modifier and Type | Method and Description |
|---|---|
T |
addCertificateChain(X509Certificate cert)
Add a certificate to certificate chain of the JWK to be built.
|
T |
addOperation(String operation)
Add intended operation of this JWK.
|
T |
algorithm(String algorithm)
Algorithm of the key being built.
|
JwkEC |
build()
Build a new
JwkEC instance from this builder. |
T |
certificateChain(List<X509Certificate> chain)
Set certificate chain of the JWK to be built.
|
JwkEC.Builder |
fromJson(JsonObject json)
Update this builder from JWK in json format.
|
T |
keyId(String keyId)
Key id of the key being built.
|
T |
keyType(String keyType)
Key type of the key being built.
|
T |
operations(List<String> operations)
Intended operations of this JWK.
|
JwkEC.Builder |
privateKey(ECPrivateKey privateKey)
Set the private key to be used for performing security operations requiring private key,
such as signing data, encrypting/decrypting data etc.
|
JwkEC.Builder |
publicKey(ECPublicKey publicKey)
Set the public key to be used for performing security operations requiring public key,
such as signature verification, encrypting/decrypting data etc.
|
T |
sha1Thumbprint(byte[] thumbprint)
Thumbprint (X.509 Certificate SHA-1 Thumbprint)
of the DER encoding of the certificate.
|
T |
sha256Thumbprint(byte[] thumbprint)
Thumbprint (X.509 Certificate SHA-256 Thumbprint)
of the DER encoding of the certificate.
|
T |
usage(String usage)
Intended usage of this JWK.
|
public JwkEC.Builder privateKey(ECPrivateKey privateKey)
privateKey - EC private key instancepublic JwkEC.Builder publicKey(ECPublicKey publicKey)
publicKey - EC public key instancepublic JwkEC.Builder fromJson(JsonObject json)
json - JsonObject with the JWKbuild() to build the JwkEC instanceas a shortcut if no additional configuration is to be donepublic T certificateChain(List<X509Certificate> chain)
chain - certificate chain, where the certificate of this JWK's public must be the first in the listpublic T addCertificateChain(X509Certificate cert)
cert - certificate to add to the chainpublic T sha1Thumbprint(byte[] thumbprint)
thumbprint - thumbprint bytes (raw bytes)public T sha256Thumbprint(byte[] thumbprint)
thumbprint - thumbprint bytes (raw bytes)public T keyType(String keyType)
keyType - one of supported key typesJwk.KEY_TYPE_EC,
Jwk.KEY_TYPE_RSA,
Jwk.KEY_TYPE_OCTpublic T keyId(String keyId)
JwkKeys this must be unique.keyId - key id to map from a signed entity (such as JWT) to JWK definitionpublic T algorithm(String algorithm)
public T usage(String usage)
operations or neither (never both).usage - usage of this JWKJwk.USE_ENCRYPTION,
Jwk.USE_SIGNATUREpublic T operations(List<String> operations)
usage or neither (never both).operations - operations to use, replaces existing operationsCopyright © 2018–2019 Oracle and/or its affiliates. All rights reserved. Use is subject to license terms.