| Modifier and Type | Method | Description |
|---|---|---|
T |
addCertificateChain(java.security.cert.X509Certificate cert) |
Add a certificate to certificate chain of the JWK to be built.
|
T |
addOperation(java.lang.String operation) |
Add intended operation of this JWK.
|
T |
algorithm(java.lang.String algorithm) |
Algorithm of the key being built.
|
JwkEC |
build() |
Build a new
JwkEC instance from this builder. |
T |
certificateChain(java.util.List<java.security.cert.X509Certificate> chain) |
Set certificate chain of the JWK to be built.
|
JwkEC.Builder |
fromJson(javax.json.JsonObject json) |
Update this builder from JWK in json format.
|
T |
keyId(java.lang.String keyId) |
Key id of the key being built.
|
T |
keyType(java.lang.String keyType) |
Key type of the key being built.
|
T |
operations(java.util.List<java.lang.String> operations) |
Intended operations of this JWK.
|
JwkEC.Builder |
privateKey(java.security.interfaces.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(java.security.interfaces.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(java.lang.String usage) |
Intended usage of this JWK.
|
public JwkEC.Builder privateKey(java.security.interfaces.ECPrivateKey privateKey)
privateKey - EC private key instancepublic JwkEC.Builder publicKey(java.security.interfaces.ECPublicKey publicKey)
publicKey - EC public key instancepublic JwkEC.Builder fromJson(javax.json.JsonObject json)
json - JsonObject with the JWKbuild() to build the JwkEC instanceas a shortcut if no additional configuration is to be donepublic T certificateChain(java.util.List<java.security.cert.X509Certificate> chain)
chain - certificate chain, where the certificate of this JWK's public must be the first in the listpublic T addCertificateChain(java.security.cert.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(java.lang.String keyType)
keyType - one of supported key typesJwk.KEY_TYPE_EC,
Jwk.KEY_TYPE_RSA,
Jwk.KEY_TYPE_OCTpublic T keyId(java.lang.String keyId)
JwkKeys this must be unique.keyId - key id to map from a signed entity (such as JWT) to JWK definitionpublic T algorithm(java.lang.String algorithm)
public T usage(java.lang.String usage)
operations or neither (never both).usage - usage of this JWKJwk.USE_ENCRYPTION,
Jwk.USE_SIGNATUREpublic T operations(java.util.List<java.lang.String> operations)
usage or neither (never both).operations - operations to use, replaces existing operationspublic T addOperation(java.lang.String operation)
usage or neither (never both).operation - operation to add to list of operationsCopyright © 2018, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.