@Override
    public ConsentDecision build(final Service service,
                                 final RegisteredService registeredService,
                                 final String principalId,
                                 final Map<String, List<Object>> attributes) {
        val consent = new ConsentDecision();
        consent.setPrincipal(principalId);
        consent.setService(service.getId());
        consent.setTenant(service.getTenant());
        return update(consent, attributes);
    }
This is {@link DefaultConsentDecisionBuilder}.

@author Misagh Moayyed
@since 5.2.0
support/cas-server-support-consent-core/src/main/java/org/apereo/cas/consent/DefaultConsentDecisionBuilder.java