Package org.pac4j.jwt.config.encryption
Class ECEncryptionConfiguration
java.lang.Object
org.pac4j.core.util.InitializableObject
org.pac4j.jwt.config.encryption.AbstractEncryptionConfiguration
org.pac4j.jwt.config.encryption.ECEncryptionConfiguration
- All Implemented Interfaces:
EncryptionConfiguration
Elliptic curve encryption configuration.
- Since:
- 1.9.2
- Author:
- Jerome Leleu
-
Field Summary
Fields inherited from class org.pac4j.jwt.config.encryption.AbstractEncryptionConfiguration
algorithm, method -
Constructor Summary
ConstructorsConstructorDescriptionConstructor for ECEncryptionConfiguration.ECEncryptionConfiguration(KeyPair keyPair) Constructor for ECEncryptionConfiguration.ECEncryptionConfiguration(KeyPair keyPair, com.nimbusds.jose.JWEAlgorithm algorithm, com.nimbusds.jose.EncryptionMethod method) Constructor for ECEncryptionConfiguration. -
Method Summary
Modifier and TypeMethodDescriptionprotected com.nimbusds.jose.JWEDecrypterBuild the appropriate decrypter.protected com.nimbusds.jose.JWEEncrypterBuild the appropriate encrypter.protected voidinternalInit(boolean forceReinit) voidsetKeyPair(KeyPair keyPair) setKeyPair.voidsetKeysFromJwk(String json) setKeysFromJwk.booleansupports(com.nimbusds.jose.JWEAlgorithm algorithm, com.nimbusds.jose.EncryptionMethod method) Whether this encryption configuration supports this algorithm and encryption method.Methods inherited from class org.pac4j.jwt.config.encryption.AbstractEncryptionConfiguration
decrypt, encryptMethods inherited from class org.pac4j.core.util.InitializableObject
afterInternalInit, beforeInternalInit, getInitialized, getLastAttempt, getMaxAttempts, getMinTimeIntervalBetweenAttemptsInMilliseconds, getNbAttempts, init, init, isInitialized, reinit, setMaxAttempts, setMinTimeIntervalBetweenAttemptsInMilliseconds, shouldInitialize, toString
-
Constructor Details
-
ECEncryptionConfiguration
public ECEncryptionConfiguration()Constructor for ECEncryptionConfiguration.
-
ECEncryptionConfiguration
Constructor for ECEncryptionConfiguration.
- Parameters:
keyPair- aKeyPairobject
-
ECEncryptionConfiguration
public ECEncryptionConfiguration(KeyPair keyPair, com.nimbusds.jose.JWEAlgorithm algorithm, com.nimbusds.jose.EncryptionMethod method) Constructor for ECEncryptionConfiguration.
- Parameters:
keyPair- aKeyPairobjectalgorithm- aJWEAlgorithmobjectmethod- aEncryptionMethodobject
-
-
Method Details
-
supports
public boolean supports(com.nimbusds.jose.JWEAlgorithm algorithm, com.nimbusds.jose.EncryptionMethod method) Whether this encryption configuration supports this algorithm and encryption method.- Parameters:
algorithm- the encryption algorithmmethod- the encryption method- Returns:
- whether this encryption configuration supports this algorithm and encryption method
-
internalInit
protected void internalInit(boolean forceReinit) - Specified by:
internalInitin classInitializableObject
-
buildEncrypter
protected com.nimbusds.jose.JWEEncrypter buildEncrypter()Build the appropriate encrypter.- Specified by:
buildEncrypterin classAbstractEncryptionConfiguration- Returns:
- the appropriate encrypter
-
buildDecrypter
protected com.nimbusds.jose.JWEDecrypter buildDecrypter()Build the appropriate decrypter.- Specified by:
buildDecrypterin classAbstractEncryptionConfiguration- Returns:
- the appropriate decrypter
-
setKeyPair
setKeyPair.
- Parameters:
keyPair- aKeyPairobject
-
setKeysFromJwk
setKeysFromJwk.
- Parameters:
json- aStringobject
-