Package org.forgerock.json.jose.jwk
Class OkpJWK.Builder
- Enclosing class:
 - OkpJWK
 
Builder object for Octet Key-Pair (OKP) JWKs.
- 
Field Summary
Fields inherited from class org.forgerock.json.jose.jwk.JWK.Builder
algorithm, keyId, keyOperations, keyType, use, x509Chain, x509Thumbnail, x509url - 
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the JWK.curve(SupportedEllipticCurve curve) Sets the elliptic curve that this key uses.Sets the private key d-value of the key.Sets the public and private values from the given key pair.privateKey(PrivateKey privateKey) Sets the private key d-value from the given private key.Sets the public x-coordinate from the given public key.Sets the public key x-coordinate of the key.xecPrivateKey(PrivateKey xecPrivateKey) Sets the private scalar value from the given XECPrivateKey (Java 11+).xecPublicKey(PublicKey xecPublicKey) Sets the public x-coordinate from the given XECPublicKey (Java 11+).Methods inherited from class org.forgerock.json.jose.jwk.JWK.Builder
algorithm, algorithm, keyId, keyOperations, keyUse, withX509Thumbprint, withX509ThumbprintS256, x509Chain, x509Thumbnail, x509Thumbprint, x509ThumbprintS256, x509Url 
- 
Method Details
- 
curve
Sets the elliptic curve that this key uses. Must be one of the supported EdDSA or X25519/X448 curves defined in RFC 8037.- Parameters:
 curve- the supported elliptic curve.- Returns:
 - this builder object.
 
 - 
x
Sets the public key x-coordinate of the key.- Parameters:
 x- the x-coordinate of the key.- Returns:
 - this builder object.
 
 - 
d
Sets the private key d-value of the key.- Parameters:
 d- the private key value.- Returns:
 - this builder object.
 
 - 
privateKey
Sets the private key d-value from the given private key.- Parameters:
 privateKey- the private key.- Returns:
 - this builder object.
 
 - 
publicKey
Sets the public x-coordinate from the given public key.- Parameters:
 publicKey- the public key. Must either be a XECPublicKey or OctetECPublicKey- Returns:
 - this builder object.
 
 - 
xecPublicKey
Sets the public x-coordinate from the given XECPublicKey (Java 11+).- Parameters:
 xecPublicKey- the XECPublicKey.- Returns:
 - this builder object.
 
 - 
xecPrivateKey
Sets the private scalar value from the given XECPrivateKey (Java 11+).- Parameters:
 xecPrivateKey- the XECPrivateKey.- Returns:
 - this builder object.
 
 - 
keyPair
Sets the public and private values from the given key pair.- Parameters:
 keyPair- the key pair- Returns:
 - this builder object.
 
 - 
build
Description copied from class:JWK.BuilderBuilds the JWK.- Specified by:
 buildin classJWK.Builder<OkpJWK.Builder>- Returns:
 - the JWK.
 
 
 -