- All Superinterfaces:
JWK
A symmetric JSON Web Key based on a symmetric key.
- Since:
- 1.5
- Author:
- Jeremy Kuhn
-
Field Summary
Fields inherited from interface io.inverno.mod.security.jose.jwk.JWK
DEFAULT_THUMBPRINT_DIGEST, KEY_OP_DECRYPT, KEY_OP_DERIVE_BITS, KEY_OP_DERIVE_KEY, KEY_OP_ENCRYPT, KEY_OP_SIGN, KEY_OP_UNWRAP_KEY, KEY_OP_VERIFY, KEY_OP_WRAP_KEY, USE_ENC, USE_SIG
-
Method Summary
Modifier and TypeMethodDescriptionReturns a public and safe to share representation of the key.Converts the JWK to its corresponding secret key.trust()
Trusts the key explicitly.Methods inherited from interface io.inverno.mod.security.jose.jwk.JWK
cipher, cipher, equals, getAlgorithm, getKeyId, getKeyOperations, getKeyType, getPublicKeyUse, hashCode, isTrusted, keyManager, keyManager, minify, signer, signer, supportsAlgorithm, toJWKThumbprint, toJWKThumbprint
-
Method Details
-
toSecretKey
Converts the JWK to its corresponding secret key.
- Returns:
- an optional containing the secret key or an empty optional if the key does not contain secret information
- Throws:
JWKProcessingException
- if there was an error converting the JWK to a secret key
-
toPublicJWK
SymmetricJWK toPublicJWK()Description copied from interface:JWK
Returns a public and safe to share representation of the key.
- Specified by:
toPublicJWK
in interfaceJWK
- Returns:
- a public representation of this JWK
-
trust
SymmetricJWK trust()Description copied from interface:JWK
Trusts the key explicitly.
This should be used with care when the authenticity of an untrusted key has been established through external means.
-