public class DefaultJWTEncryptionAndDecryptionService extends Object implements JWTEncryptionAndDecryptionService
| Constructor and Description |
|---|
DefaultJWTEncryptionAndDecryptionService(JWKSetKeyStore keyStore)
Build this service based on the given keystore.
|
DefaultJWTEncryptionAndDecryptionService(Map<String,com.nimbusds.jose.jwk.JWK> keys)
Build this service based on the keys given.
|
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
void |
decryptJwt(com.nimbusds.jose.JWEObject jwt)
Decrypts the JWT in place with the default decrypter.
|
void |
encryptJwt(com.nimbusds.jose.JWEObject jwt)
Encrypts the JWT in place with the default encrypter.
|
Collection<com.nimbusds.jose.JWEAlgorithm> |
getAllEncryptionAlgsSupported()
Get the list of all encryption algorithms supported by this service.
|
Collection<com.nimbusds.jose.EncryptionMethod> |
getAllEncryptionEncsSupported()
Get the list of all encryption methods supported by this service.
|
Map<String,com.nimbusds.jose.jwk.JWK> |
getAllPublicKeys()
Get all public keys for this service, mapped by their Key ID
|
com.nimbusds.jose.JWEAlgorithm |
getDefaultAlgorithm() |
String |
getDefaultDecryptionKeyId() |
String |
getDefaultEncryptionKeyId() |
void |
setDefaultAlgorithm(com.nimbusds.jose.JWEAlgorithm defaultAlgorithm) |
void |
setDefaultDecryptionKeyId(String defaultDecryptionKeyId) |
void |
setDefaultEncryptionKeyId(String defaultEncryptionKeyId) |
public DefaultJWTEncryptionAndDecryptionService(Map<String,com.nimbusds.jose.jwk.JWK> keys) throws NoSuchAlgorithmException, InvalidKeySpecException, com.nimbusds.jose.JOSEException
keys - NoSuchAlgorithmExceptionInvalidKeySpecExceptioncom.nimbusds.jose.JOSEExceptionpublic DefaultJWTEncryptionAndDecryptionService(JWKSetKeyStore keyStore) throws NoSuchAlgorithmException, InvalidKeySpecException, com.nimbusds.jose.JOSEException
kid) field in order to be used.keyStore - NoSuchAlgorithmExceptionInvalidKeySpecExceptioncom.nimbusds.jose.JOSEException@PostConstruct public void afterPropertiesSet()
public String getDefaultEncryptionKeyId()
public void setDefaultEncryptionKeyId(String defaultEncryptionKeyId)
public String getDefaultDecryptionKeyId()
public void setDefaultDecryptionKeyId(String defaultDecryptionKeyId)
public com.nimbusds.jose.JWEAlgorithm getDefaultAlgorithm()
public void setDefaultAlgorithm(com.nimbusds.jose.JWEAlgorithm defaultAlgorithm)
public void encryptJwt(com.nimbusds.jose.JWEObject jwt)
JWTEncryptionAndDecryptionServiceencryptJwt in interface JWTEncryptionAndDecryptionServicepublic void decryptJwt(com.nimbusds.jose.JWEObject jwt)
JWTEncryptionAndDecryptionServicedecryptJwt in interface JWTEncryptionAndDecryptionServicepublic Map<String,com.nimbusds.jose.jwk.JWK> getAllPublicKeys()
JWTEncryptionAndDecryptionServicegetAllPublicKeys in interface JWTEncryptionAndDecryptionServicepublic Collection<com.nimbusds.jose.JWEAlgorithm> getAllEncryptionAlgsSupported()
JWTEncryptionAndDecryptionServicegetAllEncryptionAlgsSupported in interface JWTEncryptionAndDecryptionServicepublic Collection<com.nimbusds.jose.EncryptionMethod> getAllEncryptionEncsSupported()
JWTEncryptionAndDecryptionServicegetAllEncryptionEncsSupported in interface JWTEncryptionAndDecryptionServiceCopyright © 2022. All rights reserved.