public class JWKSet extends JWObject
Constructor and Description |
---|
JWKSet()
Constructs an empty JWKSet.
|
JWKSet(JsonValue jwks)
Construct a JWKSet from a single JWK.
|
JWKSet(JWK jwk)
Construct a JWKSet from a single JWK.
|
JWKSet(List<JWK> jwkList)
Construct a JWKSet from a List of JWKs.
|
Modifier and Type | Method and Description |
---|---|
JWK |
findJwk(Algorithm algorithm,
KeyUse keyUse)
Search for a JWK that matches the algorithm and the key usage.
|
JWK |
findJwk(String kid)
Search for a JWK that matches the kid.
|
JsonValue |
getJWKsAsJsonValue()
Get the JWKs in the set.
|
List<JWK> |
getJWKsAsList()
Get the JWKs in the set.
|
static JWKSet |
parse(JsonValue json)
Parses a JWKSet object from a jsonValue object.
|
static JWKSet |
parse(String json)
Parses a JWKSet object from a string json object.
|
String |
toJsonString()
Prints the JWK Set as a json string.
|
protected static JsonValue |
toJsonValue(String json)
Converts a json string to a jsonValue.
|
checkListValuesAreOfType, checkValueIsOfType, get, isDefined, isValueOfType, keys, put, toJsonValue, toString
public JWKSet()
public JWKSet(JWK jwk)
jwk
- the jwk to construct the set frompublic JWKSet(JsonValue jwks)
jwks
- contains a list of json web keyspublic JsonValue getJWKsAsJsonValue()
protected static JsonValue toJsonValue(String json)
json
- a json jwk set object stringJsonException
- if unable to parsepublic static JWKSet parse(String json)
json
- string json objectpublic static JWKSet parse(JsonValue json)
json
- an JsonValue objectpublic String toJsonString()
public JWK findJwk(Algorithm algorithm, KeyUse keyUse)
algorithm
- the algorithm neededkeyUse
- the key usage. If null, only the algorithm will be used as a search criteria.Copyright © 2010-2018, ForgeRock All Rights Reserved.