@Override
    public ConsentDecision findConsentDecision(final Service service, final RegisteredService registeredService,
                                               final Authentication authentication) {
        return this.consentDecisions.stream()
            .filter(d -> d.getPrincipal().equals(authentication.getPrincipal().getId())
                && d.getService().equals(service.getId()))
            .findFirst()
            .orElse(null);
    }
This is {@link BaseConsentRepository}.

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