use of org.apereo.cas.consent.AttributeReleaseConsentCipherExecutor in project cas by apereo.
the class CasConsentCoreConfiguration method consentCipherExecutor.
@ConditionalOnMissingBean(name = "consentCipherExecutor")
@Bean
@RefreshScope
public CipherExecutor consentCipherExecutor() {
final ConsentProperties consent = casProperties.getConsent();
final EncryptionJwtSigningJwtCryptographyProperties crypto = consent.getCrypto();
if (crypto.isEnabled()) {
return new AttributeReleaseConsentCipherExecutor(crypto.getEncryption().getKey(), crypto.getSigning().getKey(), crypto.getAlg());
}
LOGGER.debug("Consent attributes stored by CAS are not signed/encrypted.");
return CipherExecutor.noOp();
}
Aggregations