Search in sources :

Example 1 with ConsentServiceRegistry

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));
}
Also used : DefaultRegisteredServiceConsentPolicy(org.apereo.cas.services.consent.DefaultRegisteredServiceConsentPolicy) ReturnAllowedAttributeReleasePolicy(org.apereo.cas.services.ReturnAllowedAttributeReleasePolicy) RegexRegisteredService(org.apereo.cas.services.RegexRegisteredService) ConsentServiceRegistry(org.apereo.cas.consent.services.ConsentServiceRegistry)

Aggregations

ConsentServiceRegistry (org.apereo.cas.consent.services.ConsentServiceRegistry)1 RegexRegisteredService (org.apereo.cas.services.RegexRegisteredService)1 ReturnAllowedAttributeReleasePolicy (org.apereo.cas.services.ReturnAllowedAttributeReleasePolicy)1 DefaultRegisteredServiceConsentPolicy (org.apereo.cas.services.consent.DefaultRegisteredServiceConsentPolicy)1