public abstract class AbstractEncryptionConfiguration extends Object implements EncryptionConfiguration
Modifier and Type | Field and Description |
---|---|
protected com.nimbusds.jose.JWEAlgorithm |
algorithm |
protected com.nimbusds.jose.EncryptionMethod |
method |
Constructor and Description |
---|
AbstractEncryptionConfiguration() |
Modifier and Type | Method and Description |
---|---|
protected abstract com.nimbusds.jose.JWEDecrypter |
buildDecrypter()
Build the appropriate decrypter.
|
protected abstract com.nimbusds.jose.JWEEncrypter |
buildEncrypter()
Build the appropriate encrypter.
|
void |
decrypt(com.nimbusds.jwt.EncryptedJWT encryptedJWT)
Decrypt an encrypted JWT.
|
String |
encrypt(com.nimbusds.jwt.JWT jwt)
Encrypt a JWT.
|
com.nimbusds.jose.JWEAlgorithm |
getAlgorithm()
algorithm Getter.
|
com.nimbusds.jose.EncryptionMethod |
getMethod()
method Getter.
|
void |
setAlgorithm(com.nimbusds.jose.JWEAlgorithm algorithm)
algorithm Setter.
|
void |
setMethod(com.nimbusds.jose.EncryptionMethod method)
method Setter.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
supportedAlgorithmsMessage, supports
protected com.nimbusds.jose.JWEAlgorithm algorithm
protected com.nimbusds.jose.EncryptionMethod method
public String encrypt(com.nimbusds.jwt.JWT jwt) throws com.nimbusds.jose.JOSEException, ParseException
EncryptionConfiguration
encrypt
in interface EncryptionConfiguration
jwt
- the JWTcom.nimbusds.jose.JOSEException
- exception when encrypting JWTParseException
- exception when encrypting JWTprotected abstract com.nimbusds.jose.JWEEncrypter buildEncrypter() throws com.nimbusds.jose.JOSEException
com.nimbusds.jose.JOSEException
- could be thrown while building encrypter if configuration is invalidpublic void decrypt(com.nimbusds.jwt.EncryptedJWT encryptedJWT) throws com.nimbusds.jose.JOSEException
EncryptionConfiguration
decrypt
in interface EncryptionConfiguration
encryptedJWT
- the encrypted JWTcom.nimbusds.jose.JOSEException
- exception when decrypting the JWTprotected abstract com.nimbusds.jose.JWEDecrypter buildDecrypter() throws com.nimbusds.jose.JOSEException
com.nimbusds.jose.JOSEException
- could be thrown while building decrypter if configuration is invalidpublic com.nimbusds.jose.JWEAlgorithm getAlgorithm()
JWEAlgorithm
public void setAlgorithm(com.nimbusds.jose.JWEAlgorithm algorithm)
algorithm
- Instance of JWEAlgorithm
public com.nimbusds.jose.EncryptionMethod getMethod()
EncryptionMethod
public void setMethod(com.nimbusds.jose.EncryptionMethod method)
method
- Instance of EncryptionMethod