org.apereo.cas.consent.ConsentDecisionBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cas-server-support-consent-api Show documentation
Show all versions of cas-server-support-consent-api Show documentation
cas-server-support-consent-api
package org.apereo.cas.consent;
import org.apereo.cas.authentication.principal.Service;
import org.apereo.cas.services.RegisteredService;
import java.io.Serializable;
import java.util.List;
import java.util.Map;
/**
* This is {@link ConsentDecisionBuilder}.
*
* @author Misagh Moayyed
* @since 5.2.0
*/
public interface ConsentDecisionBuilder extends Serializable {
/**
* Update consent decision.
*
* @param consent the consent
* @param attributes the attributes
* @return the consent decision
*/
ConsentDecision update(ConsentDecision consent, Map> attributes);
/**
* Build consent decision consent decision.
*
* @param service the service
* @param registeredService the registered service
* @param principalId the principal id
* @param attributes the attributes
* @return the consent decision
*/
ConsentDecision build(Service service,
RegisteredService registeredService,
String principalId,
Map> attributes);
/**
* Is consent decision valid for attributes?
*
* @param decision the decision
* @param attributes the attributes
* @return true /false
*/
boolean doesAttributeReleaseRequireConsent(ConsentDecision decision,
Map> attributes);
/**
* Gets consentable attributes from the consent decision.
* The operation is allowed to change attributes and/or unpack
* attributes from encoded strings, etc.
*
* @param decision the decision
* @return the consentable attributes
*/
Map> getConsentableAttributesFrom(ConsentDecision decision);
}