Package org.forgerock.json.jose.jwk
Class RsaJWK.Builder
- java.lang.Object
-
- org.forgerock.json.jose.jwk.JWK.Builder<RsaJWK.Builder>
-
- org.forgerock.json.jose.jwk.RsaJWK.Builder
-
- Enclosing class:
- RsaJWK
public static final class RsaJWK.Builder extends JWK.Builder<RsaJWK.Builder>
The RSA JWK builder.
-
-
Field Summary
-
Fields inherited from class org.forgerock.json.jose.jwk.JWK.Builder
algorithm, keyId, keyOperations, keyType, use, x509Chain, x509Thumbnail, x509url
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RsaJWK
build()
Build the RSA JWK.RsaJWK.Builder
crtCoefficient(String crtCoefficient)
Set the RSA First CRT Coefficient value.RsaJWK.Builder
otherPrimesInfo(List<RsaJWK.PrimesInfo> otherPrimesInfo)
Set the RSA other factors value.RsaJWK.Builder
primeP(String primeP)
Set the RSA First Prime Factor value.RsaJWK.Builder
primePExponent(String primePExponent)
Set the RSA First Factor CRT Exponent value.RsaJWK.Builder
primeQ(String primeQ)
Set the RSA Second Prime Factor value.RsaJWK.Builder
primeQExponent(String primeQExponent)
Set the RSA Second factor CRT Exponent value.RsaJWK.Builder
privateExponent(String privateExponent)
Set the RSA Private Exponent value.RsaJWK.Builder
rsaPrivateCrtKey(RSAPrivateCrtKey privCert)
Sets the RSA private certificate key.RsaJWK.Builder
rsaPrivateKey(RSAPrivateKey privateKey)
Sets the RSA private key.-
Methods inherited from class org.forgerock.json.jose.jwk.JWK.Builder
algorithm, algorithm, keyId, keyOperations, keyUse, withX509Thumbprint, withX509ThumbprintS256, x509Chain, x509Thumbnail, x509Thumbprint, x509ThumbprintS256, x509Url
-
-
-
-
Method Detail
-
rsaPrivateCrtKey
public RsaJWK.Builder rsaPrivateCrtKey(RSAPrivateCrtKey privCert)
Sets the RSA private certificate key. The following attributes would be deduce from the key: - Private exponent - Prime P - Prime Q - Prime P exponent - Prime Q exponent - First CRT Coefficient.- Parameters:
privCert
- the RSA private certificate- Returns:
- the current builder
-
rsaPrivateKey
public RsaJWK.Builder rsaPrivateKey(RSAPrivateKey privateKey)
Sets the RSA private key. The private exponent will be deduce from it.- Parameters:
privateKey
- the rsa private key- Returns:
- the current builder
-
privateExponent
public RsaJWK.Builder privateExponent(String privateExponent)
Set the RSA Private Exponent value.- Parameters:
privateExponent
- the private exponent JWK- Returns:
- the current builder
-
primeP
public RsaJWK.Builder primeP(String primeP)
Set the RSA First Prime Factor value.- Parameters:
primeP
- the first prime factor of the JWK- Returns:
- the current builder
-
primeQ
public RsaJWK.Builder primeQ(String primeQ)
Set the RSA Second Prime Factor value.- Parameters:
primeQ
- the second prime factor of the JWK- Returns:
- the current builder
-
primePExponent
public RsaJWK.Builder primePExponent(String primePExponent)
Set the RSA First Factor CRT Exponent value.- Parameters:
primePExponent
- the first factor exponent of the JWK- Returns:
- the current builder
-
primeQExponent
public RsaJWK.Builder primeQExponent(String primeQExponent)
Set the RSA Second factor CRT Exponent value.- Parameters:
primeQExponent
- the second factor exponent of the JWK- Returns:
- the current builder
-
crtCoefficient
public RsaJWK.Builder crtCoefficient(String crtCoefficient)
Set the RSA First CRT Coefficient value.- Parameters:
crtCoefficient
- the first CRT Coefficient of the JWK- Returns:
- the current builder
-
otherPrimesInfo
public RsaJWK.Builder otherPrimesInfo(List<RsaJWK.PrimesInfo> otherPrimesInfo)
Set the RSA other factors value.- Parameters:
otherPrimesInfo
- the extra factors of the JWK- Returns:
- the current builder
-
build
public RsaJWK build()
Build the RSA JWK.- Specified by:
build
in classJWK.Builder<RsaJWK.Builder>
- Returns:
- a RSA JWK
-
-