@Override
    public void decorate(final RequestContext requestContext) {
        FunctionUtils.doUnchecked(__ -> {
            HttpResponse response = null;
            try {
                val exec = HttpExecutionRequest.builder()
                    .basicAuthPassword(restProperties.getBasicAuthPassword())
                    .basicAuthUsername(restProperties.getBasicAuthUsername())
                    .method(HttpMethod.valueOf(restProperties.getMethod().toUpperCase(Locale.ENGLISH).trim()))
                    .url(restProperties.getUrl())
                    .headers(restProperties.getHeaders())
                    .build();
                response = HttpUtils.execute(exec);
                val statusCode = response.getCode();
                if (HttpStatus.valueOf(statusCode).is2xxSuccessful()) {
                    try (val content = ((HttpEntityContainer) response).getEntity().getContent()) {
                        val result = IOUtils.toString(content, StandardCharsets.UTF_8);
                        val jsonObject = MAPPER.readValue(JsonValue.readHjson(result).toString(), Map.class);
                        requestContext.getFlowScope().put("decoration", jsonObject);
                    }
                }
            } finally {
                HttpUtils.close(response);
            }
        });
    }
This is {@link RestfulLoginWebflowDecorator}.

@author Misagh Moayyed
@since 6.0.0
core/cas-server-core-webflow-api/src/main/java/org/apereo/cas/web/flow/decorator/RestfulLoginWebflowDecorator.java