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
- NoSuchAlgorithmException
InvalidKeySpecException
com.nimbusds.jose.JOSEException
public DefaultJWTEncryptionAndDecryptionService(JWKSetKeyStore keyStore) throws NoSuchAlgorithmException, InvalidKeySpecException, com.nimbusds.jose.JOSEException
kid
) field in order to be used.keyStore
- NoSuchAlgorithmException
InvalidKeySpecException
com.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)
JWTEncryptionAndDecryptionService
encryptJwt
in interface JWTEncryptionAndDecryptionService
public void decryptJwt(com.nimbusds.jose.JWEObject jwt)
JWTEncryptionAndDecryptionService
decryptJwt
in interface JWTEncryptionAndDecryptionService
public Map<String,com.nimbusds.jose.jwk.JWK> getAllPublicKeys()
JWTEncryptionAndDecryptionService
getAllPublicKeys
in interface JWTEncryptionAndDecryptionService
public Collection<com.nimbusds.jose.JWEAlgorithm> getAllEncryptionAlgsSupported()
JWTEncryptionAndDecryptionService
getAllEncryptionAlgsSupported
in interface JWTEncryptionAndDecryptionService
public Collection<com.nimbusds.jose.EncryptionMethod> getAllEncryptionEncsSupported()
JWTEncryptionAndDecryptionService
getAllEncryptionEncsSupported
in interface JWTEncryptionAndDecryptionService
Copyright © 2018. All rights reserved.