@Override
    public boolean update(final YubiKeyAccount account) {
        HttpResponse response = null;
        try {
            val headers = CollectionUtils.<String, String>wrap(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE);
            headers.putAll(restProperties.getHeaders());
            val exec = HttpExecutionRequest.builder()
                .basicAuthPassword(restProperties.getBasicAuthPassword())
                .basicAuthUsername(restProperties.getBasicAuthUsername())
                .method(HttpMethod.POST)
                .url(restProperties.getUrl())
                .headers(headers)
                .entity(MAPPER.writeValueAsString(account))
                .build();
            response = HttpUtils.execute(exec);
            return response != null && HttpStatus.valueOf(response.getCode()).is2xxSuccessful();
        } catch (final Exception e) {
            LOGGER.error(e.getMessage(), e);
        } finally {
            HttpUtils.close(response);
        }
        return false;
    }
This is {@link RestfulYubiKeyAccountRegistry}.

@author Misagh Moayyed
@since 5.2.0
support/cas-server-support-yubikey-core/src/main/java/org/apereo/cas/adaptors/yubikey/registry/RestfulYubiKeyAccountRegistry.java