@Override
    public Collection<? extends ConsentDecision> findConsentDecisions(final String principal) {
        return FunctionUtils.doUnchecked(() -> {
            HttpResponse response = null;
            try {
                val headers = new HashMap<String, String>();
                headers.put(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE);
                headers.put(HttpHeaders.ACCEPT, MediaType.APPLICATION_JSON_VALUE);
                headers.putAll(properties.getHeaders());
                val url = UriComponentsBuilder.fromUriString(resolveUrl())
                    .queryParam("principal", principal)
                    .build()
                    .toUriString();
                val exec = HttpExecutionRequest.builder()
                    .basicAuthPassword(properties.getBasicAuthPassword())
                    .basicAuthUsername(properties.getBasicAuthUsername())
                    .method(HttpMethod.GET)
                    .url(url)
                    .headers(headers)
                    .build();
                response = HttpUtils.execute(exec);
                if (response != null && HttpStatus.valueOf(response.getCode()).is2xxSuccessful()) {
                    try (val content = ((HttpEntityContainer) response).getEntity().getContent()) {
                        val result = IOUtils.toString(content, StandardCharsets.UTF_8);
                        val expectedType = MAPPER.getTypeFactory().constructParametricType(List.class, ConsentDecision.class);
                        return MAPPER.readValue(JsonValue.readHjson(result).toString(), expectedType);
                    }
                }
            } finally {
                HttpUtils.close(response);
            }
            return new ArrayList<>();
        });
    }
This is {@link RestfulConsentRepository}.

@author Misagh Moayyed
@since 5.1.0
support/cas-server-support-consent-rest/src/main/java/org/apereo/cas/consent/RestfulConsentRepository.java