use of org.apereo.cas.consent.services.ConsentServiceRegistry in project cas by apereo.
the class CasConsentReviewConfiguration method configureServiceRegistry.
@Override
public void configureServiceRegistry(final ServiceRegistryExecutionPlan plan) {
final RegexRegisteredService service = new RegexRegisteredService();
service.setEvaluationOrder(0);
service.setName("CAS Consent Review");
service.setDescription("Review consent decisions for attribute release");
service.setServiceId(consentCallbackService().getId());
final ReturnAllowedAttributeReleasePolicy policy = new ReturnAllowedAttributeReleasePolicy();
final DefaultRegisteredServiceConsentPolicy consentPolicy = new DefaultRegisteredServiceConsentPolicy();
consentPolicy.setEnabled(false);
policy.setConsentPolicy(consentPolicy);
service.setAttributeReleasePolicy(policy);
LOGGER.debug("Saving consent service [{}] into the registry", service);
plan.registerServiceRegistry(new ConsentServiceRegistry(service));
}
Aggregations