@Override
    public void execute(final Principal principal, final UserProfile profile,
                        final BaseClient client, final Credential credential) {
        HttpResponse response = null;
        try {
            val body = new HashMap<String, Object>();
            body.put("principalId", principal.getId());
            body.put("principalAttributes", principal.getAttributes());
            body.put("profileId", profile.getId());
            body.put("profileTypedId", profile.getTypedId());
            body.put("profileAttributes", profile.getAttributes());
            body.put("clientName", client.getName());
            body.putAll(restProperties.getHeaders());

            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()
                .body(body);

            response = HttpUtils.execute(exec);
            if (response != null) {
                val status = HttpStatus.valueOf(response.getCode());
                LOGGER.debug("Provisioned principal [{}] with status result [{}]", principal.getId(), status);
            }
        } catch (final Exception e) {
            LoggingUtils.error(LOGGER, e);
        } finally {
            HttpUtils.close(response);
        }
    }
This is {@link RestfulDelegatedClientUserProfileProvisioner}.

@author Misagh Moayyed
@since 6.1.0
support/cas-server-support-pac4j-core/src/main/java/org/apereo/cas/authentication/principal/provision/RestfulDelegatedClientUserProfileProvisioner.java