public class RsaJWK extends JWK
Modifier and Type | Class and Description |
---|---|
static class |
RsaJWK.Builder
The RSA JWK builder.
|
static class |
RsaJWK.PrimesInfo
Holds the other prime factors.
|
JSON_KEY_ALG, JSON_KEY_KID, JSON_KEY_KTY, JSON_KEY_OPERATIONS, JSON_KEY_USE, JSON_KEY_X5C, JSON_KEY_X5T, JSON_KEY_X5U
Constructor and Description |
---|
RsaJWK(KeyUse use,
String alg,
String kid,
String modulus,
String publicExponent,
String x5u,
String x5t,
List<String> x5c)
Deprecated.
Use the builder instead.
|
RsaJWK(KeyUse use,
String alg,
String kid,
String modulus,
String publicExponent,
String privateExponent,
String x5u,
String x5t,
List<String> x5c)
Deprecated.
Use the builder instead.
|
RsaJWK(KeyUse use,
String alg,
String kid,
String modulus,
String publicExponent,
String privateExponent,
String primeP,
String primeQ,
String primePExponent,
String primeQExponent,
String crtCoefficient,
List<RsaJWK.PrimesInfo> otherPrimesInfo,
String x5u,
String x5t,
List<String> x5c)
Deprecated.
Use the builder instead.
|
RsaJWK(KeyUse use,
String alg,
String kid,
String modulus,
String publicExponent,
String primeP,
String primeQ,
String primePExponent,
String primeQExponent,
String crtCoefficient,
String x5u,
String x5t,
List<String> x5c)
Deprecated.
Use the builder instead.
|
RsaJWK(RSAPublicKey key,
KeyUse use,
String alg,
String kid,
String x5u,
String x5t,
List<String> x5c)
Deprecated.
Use the builder instead.
|
RsaJWK(RSAPublicKey pubKey,
RSAPrivateCrtKey privCert,
KeyUse use,
String alg,
String kid,
String x5u,
String x5t,
List<String> x5c)
Deprecated.
Use the builder instead.
|
RsaJWK(RSAPublicKey pubKey,
RSAPrivateKey privKey,
KeyUse use,
String alg,
String kid,
String x5u,
String x5t,
List<String> x5c)
Deprecated.
Use the builder instead.
|
Modifier and Type | Method and Description |
---|---|
static RsaJWK.Builder |
builder(RSAPublicKey publicKey)
Get the builder.
|
static RsaJWK.Builder |
builder(String modulus,
String publicExponent)
Get the builder.
|
String |
getCRTCoefficient()
Get the RSA First CRT Coefficient value.
|
String |
getModulus()
Get the RSA modulus value.
|
List<RsaJWK.PrimesInfo> |
getOtherPrimesInfo()
Get the RSA other factors value.
|
String |
getPrimeP()
Get the RSA First Prime Factor value.
|
String |
getPrimePExponent()
Get the RSA First Factor CRT Exponent value.
|
String |
getPrimeQ()
Get the RSA Second Prime Factor value.
|
String |
getPrimeQExponent()
Get the RSA Second factor CRT Exponent value.
|
String |
getPrivateExponent()
Get the RSA Private Exponent value.
|
String |
getPublicExponent()
Get the RSA Public Exponent.
|
protected Optional<JWK.Builder<?>> |
getPublicJwkBuilder()
Return a builder with all the values set for representing the public components of the JWK.
|
boolean |
isPrivate()
Indicates if any private key attributes are present in the JWK.
|
static RsaJWK |
parse(JsonValue json)
Parses a RsaJWK from a jsonValue Object.
|
static RsaJWK |
parse(String json)
Parses a RsaJWK from a json string.
|
String |
toJsonString()
Prints the RsaJWK object as a json string.
|
JsonValue |
toJsonValue()
Returns a json representation of the JWK.
|
KeyPair |
toKeyPair()
Create a KeyPair using the JWK.
|
RSAPrivateKey |
toRSAPrivateKey()
Creates a RSAPrivateKey from the JWK.
|
RSAPublicKey |
toRSAPublicKey()
Creates a RSAPublicKey from the JWK.
|
getAlgorithm, getAlgorithm, getJwaAlgorithm, getKeyId, getKeyOperations, getKeyType, getUse, getX509Chain, getX509Thumbnail, getX509URL, loadJWKFromJson, putField, toJsonValue, toPublicJwk
@Deprecated public RsaJWK(KeyUse use, String alg, String kid, String modulus, String publicExponent, String x5u, String x5t, List<String> x5c)
use
- the use of the JWKalg
- the alg of the JWKkid
- the key id of the JWKmodulus
- the modulus of the JWKpublicExponent
- the public exponent JWKx5u
- the x509 url for the keyx5t
- the x509 thumbnail for the keyx5c
- the x509 chain as a list of Base64 encoded strings@Deprecated public RsaJWK(KeyUse use, String alg, String kid, String modulus, String publicExponent, String privateExponent, String x5u, String x5t, List<String> x5c)
use
- the use of the JWKalg
- the alg of the JWKkid
- the key id of the JWKmodulus
- the modulus of the JWKpublicExponent
- the public exponent JWKprivateExponent
- the private exponent JWKx5u
- the x509 url for the keyx5t
- the x509 thumbnail for the keyx5c
- the x509 chain as a list of Base64 encoded strings@Deprecated public RsaJWK(KeyUse use, String alg, String kid, String modulus, String publicExponent, String primeP, String primeQ, String primePExponent, String primeQExponent, String crtCoefficient, String x5u, String x5t, List<String> x5c)
use
- the use of the JWKalg
- the alg of the JWKkid
- the key id of the JWKmodulus
- the modulus of the JWKpublicExponent
- the public exponent JWKprimeP
- the first prime factor of the JWKprimeQ
- the second prime factor of the JWKprimePExponent
- the first factor exponent of the JWKprimeQExponent
- the second factor exponent of the JWKcrtCoefficient
- the first CRT Coefficient of the JWKx5u
- the x509 url for the keyx5t
- the x509 thumbnail for the keyx5c
- the x509 chain as a list of Base64 encoded strings@Deprecated public RsaJWK(KeyUse use, String alg, String kid, String modulus, String publicExponent, String privateExponent, String primeP, String primeQ, String primePExponent, String primeQExponent, String crtCoefficient, List<RsaJWK.PrimesInfo> otherPrimesInfo, String x5u, String x5t, List<String> x5c)
use
- the use of the JWKalg
- the alg of the JWKkid
- the key id of the JWKmodulus
- the modulus of the JWKpublicExponent
- the public exponent JWKprivateExponent
- the private exponent JWKprimeP
- the first prime factor of the JWKprimeQ
- the second prime factor of the JWKprimePExponent
- the first factor exponent of the JWKprimeQExponent
- the second factor exponent of the JWKcrtCoefficient
- the first CRT Coefficient of the JWKotherPrimesInfo
- the extra factors of the JWKx5u
- the x509 url for the keyx5t
- the x509 thumbnail for the keyx5c
- the x509 chain as a list of Base64 encoded strings@Deprecated public RsaJWK(RSAPublicKey key, KeyUse use, String alg, String kid, String x5u, String x5t, List<String> x5c)
key
- the RSAPublicKey to useuse
- the use of the JWKalg
- the alg of the JWKkid
- the key id of the JWKx5u
- the x509 url for the keyx5t
- the x509 thumbnail for the keyx5c
- the x509 chain as a list of Base64 encoded strings@Deprecated public RsaJWK(RSAPublicKey pubKey, RSAPrivateKey privKey, KeyUse use, String alg, String kid, String x5u, String x5t, List<String> x5c)
pubKey
- the RSAPublicKey to useprivKey
- the RSAPrivateKey to useuse
- the use of the JWKalg
- the alg of the JWKkid
- the key id of the JWKx5u
- the x509 url for the keyx5t
- the x509 thumbnail for the keyx5c
- the x509 chain as a list of Base64 encoded strings@Deprecated public RsaJWK(RSAPublicKey pubKey, RSAPrivateCrtKey privCert, KeyUse use, String alg, String kid, String x5u, String x5t, List<String> x5c)
pubKey
- the RSAPublicKey to useprivCert
- the RSAPrivateCrtKey to useuse
- the use of the JWKalg
- the alg of the JWKkid
- the key id of the JWKx5u
- the x509 url for the keyx5t
- the x509 thumbnail for the keyx5c
- the x509 chain as a list of Base64 encoded stringspublic static RsaJWK.Builder builder(String modulus, String publicExponent)
modulus
- the modulus of the JWKpublicExponent
- the public exponent JWKpublic static RsaJWK.Builder builder(RSAPublicKey publicKey)
publicKey
- the RSAPublicKey to usepublic String getModulus()
public String getPublicExponent()
public String getPrivateExponent()
public String getPrimeP()
public String getPrimeQ()
public String getPrimePExponent()
public String getPrimeQExponent()
public String getCRTCoefficient()
public List<RsaJWK.PrimesInfo> getOtherPrimesInfo()
public RSAPublicKey toRSAPublicKey()
public RSAPrivateKey toRSAPrivateKey()
public boolean isPrivate()
JWK
protected Optional<JWK.Builder<?>> getPublicJwkBuilder()
JWK
JWK.toPublicJwk()
.getPublicJwkBuilder
in class JWK
public KeyPair toKeyPair()
public static RsaJWK parse(String json)
json
- a string json objectpublic static RsaJWK parse(JsonValue json)
json
- a jsonValue objectpublic String toJsonString()
toJsonString
in class JWK
public JsonValue toJsonValue()
JWK
toJsonValue
in class JWK
Copyright © 2010-2018, ForgeRock All Rights Reserved.