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" property or the key content set with the "smallrye.jwt.encrypt.key" property.
|
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' 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 or
'smallrye.jwt.new-token.key-encryption-algorithm' property.
'A256GCM' content encryption algorithm will be used unless a different one has been set with
JwtEncryptionBuilder or 'smallrye.jwt.new-token.content-encryption-algorithm' property.
A key of size 2048 bits or larger MUST be used with the 'RSA-OAEP' and 'RSA-OAEP-256' algorithms.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 encryption algorithm will be used unless a different one has been set with JwtEncryptionBuilder or
'smallrye.jwt.new-token.key-encryption-algorithm' property.
'A256GCM' content encryption algorithm will be used unless a different one has been set with
JwtEncryptionBuilder or 'smallrye.jwt.new-token.content-encryption-algorithm' property.keyEncryptionKey - the key which encrypts the content encryption keyJwtEncryptionException - the exception if the encryption operation has failedString encrypt(String keyLocation) throws JwtEncryptionException
JwtEncryptionBuilder or
'smallrye.jwt.new-token.key-encryption-algorithm' property.
'A256GCM' content encryption algorithm will be used unless a different one has been set with
JwtEncryptionBuilder or 'smallrye.jwt.new-token.content-encryption-algorithm' property.
A key of size 2048 bits or larger MUST be used with the 'RSA-OAEP' and 'RSA-OAEP-256' algorithms.keyLocation - the location of the keyEncryptionKey which encrypts the content encryption keyJwtEncryptionException - the exception if the encryption operation has failedString encrypt() throws JwtEncryptionException
JwtEncryptionBuilder or
'smallrye.jwt.new-token.key-encryption-algorithm' property.
'A256GCM' content encryption algorithm will be used unless a different one have been set with
JwtEncryptionBuilder or 'smallrye.jwt.new-token.content-encryption-algorithm' property.
A key of size 2048 bits or larger MUST be used with the 'RSA-OAEP' and 'RSA-OAEP-256' algorithms.JwtEncryptionException - the exception if the encryption operation has failedString encryptWithSecret(String secret) throws JwtEncryptionException
JwtEncryptionBuilder or 'smallrye.jwt.new-token.key-encryption-algorithm' property.
'A256GCM' content encryption algorithm will be used unless a different one has been set with
JwtEncryptionBuilder or 'smallrye.jwt.new-token.content-encryption-algorithm' property.secret - the secretJwtEncryptionException - the exception if the encryption operation has failedCopyright © 2018–2022. All rights reserved.