private void synchronize(final AuthenticationTransaction transaction) {
        HttpResponse response = null;
        try {
            val primaryCredential = (UsernamePasswordCredential) transaction.getPrimaryCredential().get();
            val entity = MAPPER.writeValueAsString(Map.of("username", primaryCredential.getId(), "password", primaryCredential.toPassword()));
            val headers = CollectionUtils.<String, String>wrap(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE);
            headers.putAll(properties.getHeaders());
            val exec = HttpExecutionRequest.builder()
                .url(properties.getUrl())
                .basicAuthPassword(properties.getBasicAuthUsername())
                .basicAuthUsername(properties.getBasicAuthPassword())
                .method(HttpMethod.POST)
                .entity(entity)
                .headers(headers)
                .build();
            response = HttpUtils.execute(exec);
        } catch (final Exception e) {
            LoggingUtils.error(LOGGER, e);
        } finally {
            HttpUtils.close(response);
        }
    }
This is {@link RestfulPasswordSynchronizationAuthenticationPostProcessor}.

@author Misagh Moayyed
@since 7.2.0
support/cas-server-support-pm-core/src/main/java/org/apereo/cas/pm/impl/RestfulPasswordSynchronizationAuthenticationPostProcessor.java