@Override
    public ConsentDecision findConsentDecision(final Service service,
                                               final RegisteredService registeredService,
                                               final Authentication authentication) {
        val query = new Query(Criteria.where("service").is(service.getId())
            .and("principal").is(authentication.getPrincipal().getId()));
        return this.mongoTemplate.findOne(query, ConsentDecision.class, this.collectionName);
    }
This is {@link MongoDbConsentRepository}.

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