public class OctJWK extends JWK
Modifier and Type | Class and Description |
---|---|
static class |
OctJWK.Builder
The Octet JWK builder.
|
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 |
---|
OctJWK(KeyUse use,
String alg,
String kid,
String key,
String x5u,
String x5t,
List<String> x5c)
Deprecated.
Use the builder instead.
|
Modifier and Type | Method and Description |
---|---|
static OctJWK.Builder |
builder(String key)
Get the Octet JWK builder.
|
String |
getKey()
Gets the symmetric key.
|
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 OctJWK |
parse(JsonValue json)
Parses a OctJWK object from a jsonValue object.
|
static OctJWK |
parse(String json)
Parses a OctJWK object from a string json object.
|
String |
toJsonString()
Prints the JWK as a json string.
|
JsonValue |
toJsonValue()
Returns a json representation of the JWK.
|
SecretKey |
toSecretKey()
Returns the key as a secret key.
|
getAlgorithm, getAlgorithm, getJwaAlgorithm, getKeyId, getKeyOperations, getKeyType, getUse, getX509Chain, getX509Thumbnail, getX509URL, loadJWKFromJson, putField, toJsonValue, toPublicJwk
@Deprecated public OctJWK(KeyUse use, String alg, String kid, String key, String x5u, String x5t, List<String> x5c)
use
- the JWK usealg
- the JWK algorithmkid
- the JWK key idkey
- the symmetric keyx5u
- the x509 url for the keyx5t
- the x509 thumbnail for the keyx5c
- the x509 chain as a list of Base64 encoded stringspublic static OctJWK.Builder builder(String key)
key
- the symmetric keypublic String getKey()
public SecretKey toSecretKey()
public static OctJWK parse(String json)
json
- string json objectpublic static OctJWK parse(JsonValue json)
json
- an JsonValue objectpublic String toJsonString()
toJsonString
in class JWK
public JsonValue toJsonValue()
JWK
toJsonValue
in class JWK
public boolean isPrivate()
JWK
protected Optional<JWK.Builder<?>> getPublicJwkBuilder()
JWK
JWK.toPublicJwk()
.getPublicJwkBuilder
in class JWK
Copyright © 2010-2018, ForgeRock All Rights Reserved.