public interface JwtEncryption
| Modifier and Type | Method and Description |
|---|---|
String |
encrypt()
Encrypt the claims or inner JWT with a key loaded from the location set with the
"smallrye.jwt.encrypt.key-location" or "smallrye.jwt.encrypt.key.location" properties.
|
String |
encrypt(PublicKey keyEncryptionKey)
Encrypt the claims or inner JWT with
PublicKey. |
String |
encrypt(SecretKey keyEncryptionKey)
Encrypt the claims or inner JWT with
SecretKey. |
String |
encrypt(String keyLocation)
Encrypt the claims or inner JWT with a public or secret key loaded from the custom location
which can point to a PEM, JWK or JWK set keys.
|
String |
encryptWithSecret(String secret)
Encrypt the claims or inner JWT with a secret key string.
|
String encrypt(PublicKey keyEncryptionKey) throws JwtEncryptionException
PublicKey.
'RSA-OAEP-256' and 'ECDH-ES+A256KW' key encryption algorithms will be used by default
when public RSA or EC keys are used unless a different one has been set with JwtEncryptionBuilder.
'A256GCM' content encryption algorithms will be used unless a different one have been set with
JwtEncryptionBuilder.
A key of size 2048 bits or larger MUST be used with the 'RSA-OAEP' and 'RSA-OAEP-256' algorithms.
Note: Setting 'RSA-OAEP-256' as a default key encryption algorithm when public RSA keys are used is deprecated.
Future version of this API will set 'RSA-OAEP' by default.keyEncryptionKey - the key which encrypts the content encryption keyJwtEncryptionException - the exception if the encryption operation has failedString encrypt(SecretKey keyEncryptionKey) throws JwtEncryptionException
SecretKey.
'A256KW' key and 'A256GCM' content encryption algorithms will be used
unless different ones have been set with JwtEncryptionBuilder.keyEncryptionKey - the key which encrypts the content encryption keyJwtEncryptionException - the exception if the encryption operation has failedString encrypt(String keyLocation) throws JwtEncryptionException
JwtEncryptionBuilder.
'A256GCM' content encryption algorithms will be used unless a different one have been set with
JwtEncryptionBuilder.
A key of size 2048 bits or larger MUST be used with the 'RSA-OAEP' and 'RSA-OAEP-256' algorithms.
Note: Setting 'RSA-OAEP-256' as a default key encryption algorithm when public RSA keys are used is deprecated.
Future version of this API will set 'RSA-OAEP' by default.keyLocation - the location of the keyEncryptionKey which encrypts the content encryption keyJwtEncryptionException - the exception if the encryption operation has failedString encrypt() throws JwtEncryptionException
JwtEncryptionBuilder.
'A256GCM' content encryption algorithms will be used unless a different one have been set with
JwtEncryptionBuilder.
A key of size 2048 bits or larger MUST be used with the 'RSA-OAEP' and 'RSA-OAEP-256' algorithms.
Note: Setting 'RSA-OAEP-256' as a default key encryption algorithm when public RSA keys are used is deprecated.
Future version of this API will set 'RSA-OAEP' by default.JwtEncryptionException - the exception if the encryption operation has failedString encryptWithSecret(String secret) throws JwtEncryptionException
JwtEncryptionBuilder.
'A256GCM' content encryption algorithms will be used unless a different one have been set with
JwtEncryptionBuilder.secret - the secretJwtEncryptionException - the exception if the encryption operation has failedCopyright © 2018–2021. All rights reserved.