@Override
    public String findEmail(final PasswordManagementQuery query) {
        val rest = casProperties.getAuthn().getPm().getRest();
        if (StringUtils.isBlank(rest.getEndpointUrlEmail())) {
            return null;
        }

        val url = UriComponentsBuilder.fromUriString(rest.getEndpointUrlEmail())
            .queryParam("username", query.getUsername()).build().toUriString();
        val request = new RequestEntity<>(HttpMethod.GET, URI.create(url));
        val result = restTemplate.exchange(request, String.class);

        if (result.getStatusCode().value() == HttpStatus.OK.value() && result.hasBody()) {
            return result.getBody();
        }
        return null;
    }
This is {@link RestPasswordManagementService}.

@author Misagh Moayyed
@since 5.1.0
support/cas-server-support-pm-rest/src/main/java/org/apereo/cas/pm/rest/RestPasswordManagementService.java