|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.nimbusds.jose.JWK com.nimbusds.jose.RSAKey
@Immutable public final class RSAKey
Public RSA
JSON Web Key (JWK). This class is immutable.
Example JSON:
{ "kty" : "RSA", "n" : "0vx7agoebGcQSuuPiLJXZptN9nndrQmbXEps2aiAFbWhM78LhWx 4cbbfAAtVT86zwu1RK7aPFFxuhDR1L6tSoc_BJECPebWKRXjBZCiFV4n3oknjhMs tn64tZ_2W-5JsGY4Hc5n9yBXArwl93lqt7_RN5w6Cf0h4QyQ5v-65YGjQR0_FDW2 QvzqY368QQMicAtaSqzs8KJZgnYb9c7d0zgdAZHzu6qMQvRL5hajrn1n91CbOpbI SD08qNLyrdkt-bFTWhAI4vMQFh6WeZu0fM4lFd2NcRwr3XPksINHaQ-G_xBniIqb w0Ls1jF44-csFCur-kEgU8awapJzKnqDKgw", "e" : "AQAB", "alg" : "RS256" "kid" : "2011-04-29"} }
See http://en.wikipedia.org/wiki/RSA_%28algorithm%29
Constructor Summary | |
---|---|
RSAKey(Base64URL n,
Base64URL e,
Use use,
Algorithm alg,
String kid)
Creates a new public RSA JSON Web Key (JWK) with the specified parameters. |
Method Summary | |
---|---|
Base64URL |
getExponent()
Returns the exponent value for this RSA public key. |
Base64URL |
getModulus()
Returns the modulus value for this RSA public key. |
static RSAKey |
parse(net.minidev.json.JSONObject jsonObject)
Parses a public RSA JWK from the specified JSON object representation. |
net.minidev.json.JSONObject |
toJSONObject()
Returns a JSON object representation of this JWK. |
Methods inherited from class com.nimbusds.jose.JWK |
---|
getAlgorithm, getKeyID, getKeyType, getKeyUse, parse, parseAlgorithm, parseKeyID, parseKeyUse, toJSONString, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RSAKey(Base64URL n, Base64URL e, Use use, Algorithm alg, String kid)
n
- The the modulus value for the RSA public key. It is
represented as the Base64URL encoding of value's big
endian representation. Must not be null
.e
- The exponent value for the RSA public key. It is
represented as the Base64URL encoding of value's big
endian representation. Must not be null
.use
- The key use. null
if not specified.alg
- The intended JOSE algorithm for the key, null
if
not specified.kid
- The key ID. null
if not specified.Method Detail |
---|
public Base64URL getModulus()
public Base64URL getExponent()
public net.minidev.json.JSONObject toJSONObject()
JWK
Example:
{ "kty" : "RSA", "use" : "sig", "kid" : "fd28e025-8d24-48bc-a51a-e2ffc8bc274b" }
toJSONObject
in class JWK
public static RSAKey parse(net.minidev.json.JSONObject jsonObject) throws ParseException
jsonObject
- The JSON object to parse. Must not be
ParseException
- If the JSON object couldn't be parsed to valid
RSA JWK.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |