public class JWKSet extends Object
JSON Web Keys
(JWKs) as the value
of its "keys" member. Additional (custom) members of the JWK Set JSON object are also supported.
Example JSON Web Key (JWK) set:
{ "keys" : [ { "kty" : "EC", "crv" : "P-256", "x" : "MKBCTNIcKUSDii11ySs3526iDZ8AiTo7Tu6KPAqv7D4", "y" : "4Etl6SRW2YiLUrN5vfvVHuhp7x8PxltmWWlbbM4IFyM", "use" : "enc", "kid" : "1" }, { "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" } ] }
Constructor and Description |
---|
JWKSet()
Instantiates a new JWK set.
|
JWKSet(javax.json.JsonArray keys)
Instantiates a new JWK set using
JsonArray of keys. |
JWKSet(JWK... keys)
Instantiates a new JWK set using JWK Key(s).
|
JWKSet(String jsonKeySet)
Instantiates a new JWK set using string representation of JSON Key Set.
|
Modifier and Type | Method and Description |
---|---|
void |
add(JWK jwk)
Adds the
JWK to the JWKSet. |
JWK |
get(String kid)
Gets the
JWK of specified identifier from JWKSet. |
javax.json.JsonObject |
getJsonObject()
Gets the JSON object of
JWK . |
Map<String,JWK> |
getKeys()
Gets the key map contained in JWKSet.
|
String |
toString() |
public JWKSet()
public JWKSet(JWK... keys)
keys
- the keyspublic JWKSet(javax.json.JsonArray keys)
JsonArray
of keys.keys
- the keyspublic JWKSet(String jsonKeySet)
jsonKeySet
- the JSON key setpublic JWK get(String kid)
JWK
of specified identifier from JWKSet.kid
- the kidpublic javax.json.JsonObject getJsonObject()
JWK
.public String toString()
toString
in class Object
Object.toString()
Copyright © 2015. All rights reserved.