@Override
    public Optional<PasswordlessUserAccount> findUser(final PasswordlessAuthenticationRequest request) {
        HttpResponse response = null;
        try {
            val parameters = new HashMap<String, String>();
            parameters.put("username", request.getUsername());

            val exec = HttpExecutionRequest.builder()
                .basicAuthPassword(restProperties.getBasicAuthPassword())
                .basicAuthUsername(restProperties.getBasicAuthUsername())
                .method(HttpMethod.valueOf(restProperties.getMethod().toUpperCase(Locale.ENGLISH).trim()))
                .url(StringUtils.appendIfMissing(restProperties.getUrl(), "/").concat(request.getUsername()))
                .parameters(parameters)
                .headers(restProperties.getHeaders())
                .build();
            response = HttpUtils.execute(exec);

            if (response != null && HttpStatus.valueOf(response.getCode()).is2xxSuccessful() && ((HttpEntityContainer) response).getEntity() != null) {
                try (val content = ((HttpEntityContainer) response).getEntity().getContent()) {
                    val result = IOUtils.toString(content, StandardCharsets.UTF_8);
                    val account = MAPPER.readValue(JsonValue.readHjson(result).toString(), PasswordlessUserAccount.class);
                    return Optional.ofNullable(account);
                }
            }
        } catch (final Exception e) {
            LoggingUtils.error(LOGGER, e);
        } finally {
            HttpUtils.close(response);
        }
        return Optional.empty();
    }
This is {@link RestfulPasswordlessUserAccountStore}.

@author Misagh Moayyed
@since 5.3.0
support/cas-server-support-passwordless-api/src/main/java/org/apereo/cas/impl/account/RestfulPasswordlessUserAccountStore.java