public static class OkpJWK.Builder extends JWK.Builder<OkpJWK.Builder>
algorithm, keyId, keyOperations, keyType, use, x509Chain, x509Thumbnail, x509url
Modifier and Type | Method and Description |
---|---|
OkpJWK |
build()
Builds the JWK.
|
OkpJWK.Builder |
curve(SupportedEllipticCurve curve)
Sets the elliptic curve that this key uses.
|
OkpJWK.Builder |
d(String d)
Sets the private key d-value of the key.
|
OkpJWK.Builder |
keyPair(KeyPair keyPair)
Sets the public and private values from the given key pair, which must consist of an
OkpJWK.OctetECPublicKey and OkpJWK.OctetECPrivateKey . |
OkpJWK.Builder |
privateKey(OkpJWK.OctetECPrivateKey privateKey)
Sets the private key d-value from the given private key.
|
OkpJWK.Builder |
publicKey(ECPublicKey publicKey)
Sets the public x-coordinate from the given public key.
|
OkpJWK.Builder |
publicKey(PublicKey publicKey)
Sets the public x-coordinate from the given public key.
|
OkpJWK.Builder |
x(String x)
Sets the public key x-coordinate of the key.
|
OkpJWK.Builder |
xecPrivateKey(PrivateKey xecPrivateKey)
Sets the private scalar value from the given XECPrivateKey (Java 11+).
|
OkpJWK.Builder |
xecPublicKey(PublicKey xecPublicKey)
Sets the public x-coordinate from the given XECPublicKey (Java 11+).
|
algorithm, algorithm, keyId, keyOperations, keyUse, x509Chain, x509Thumbnail, x509Url
public OkpJWK.Builder curve(SupportedEllipticCurve curve)
curve
- the supported elliptic curve.public OkpJWK.Builder x(String x)
x
- the x-coordinate of the key.public OkpJWK.Builder d(String d)
d
- the private key value.public OkpJWK.Builder privateKey(OkpJWK.OctetECPrivateKey privateKey)
privateKey
- the private key.public OkpJWK.Builder publicKey(PublicKey publicKey)
publicKey
- the public key. Must either be a XECPublicKey or OctetECPublicKeypublic OkpJWK.Builder publicKey(ECPublicKey publicKey)
publicKey
- the public key.public OkpJWK.Builder xecPublicKey(PublicKey xecPublicKey)
xecPublicKey
- the XECPublicKey.public OkpJWK.Builder xecPrivateKey(PrivateKey xecPrivateKey)
xecPrivateKey
- the XECPrivateKey.public OkpJWK.Builder keyPair(KeyPair keyPair)
OkpJWK.OctetECPublicKey
and OkpJWK.OctetECPrivateKey
.keyPair
- the key pairpublic OkpJWK build()
JWK.Builder
build
in class JWK.Builder<OkpJWK.Builder>
Copyright © 2010-2018, ForgeRock All Rights Reserved.