@Override
    public boolean authorizeRequest(final RegisteredServiceAccessStrategyRequest request) throws Throwable {
        val expressionResolver = SpringExpressionLanguageValueResolver.getInstance();
        val permifyRequest = buildPermifyRequest(request);
        
        val url = StringUtils.removeEnd(expressionResolver.resolve(this.apiUrl), "/");
        val tenant = StringUtils.removeEnd(expressionResolver.resolve(this.tenantId), "/");
        val permifyUrl = String.format("%s/v1/tenants/%s/permissions/check", url, tenant);

        val headers = new HashMap<String, String>();
        headers.put(HttpHeaders.AUTHORIZATION, "Bearer " + expressionResolver.resolve(this.token));
        headers.put(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE);

        val exec = HttpExecutionRequest.builder()
            .method(HttpMethod.POST)
            .url(permifyUrl)
            .headers(headers)
            .entity(permifyRequest.toJson())
            .build();

        HttpResponse response = null;
        try {
            LOGGER.debug("Submitting authorization request to [{}] for [{}]", permifyUrl, permifyRequest);
            response = HttpUtils.execute(exec);
            try (val content = ((HttpEntityContainer) response).getEntity().getContent()) {
                val results = IOUtils.toString(content, StandardCharsets.UTF_8);
                LOGGER.debug("Received response from endpoint [{}] as [{}]", url, results);
                val payload = MAPPER.readValue(results, Map.class);
                val result = (String) payload.get("can");
                return "CHECK_RESULT_ALLOWED".equalsIgnoreCase(result);
            }
        } catch (final Exception e) {
            LoggingUtils.error(LOGGER, e);
        } finally {
            HttpUtils.close(response);
        }
        return false;
    }
This is {@link PermifyRegisteredServiceAccessStrategy}.

@author Misagh Moayyed
@since 7.2.0
core/cas-server-core-services-api/src/main/java/org/apereo/cas/services/PermifyRegisteredServiceAccessStrategy.java