protected PasswordManagementQuery buildPasswordManagementQuery(final RequestContext requestContext) {
        val existingQuery = WebUtils.getPasswordManagementQuery(requestContext, PasswordManagementQuery.class);
        return Optional.ofNullable(existingQuery)
            .orElseGet(() -> {
                val request = WebUtils.getHttpServletRequestFromExternalWebflowContext(requestContext);
                val username = request.getParameter(REQUEST_PARAMETER_USERNAME);

                val builder = PasswordManagementQuery.builder();
                if (StringUtils.isBlank(username)) {
                    LOGGER.warn("No username parameter is provided");
                }
                return builder.username(username).build();
            });
    }
Build the reset URL for the user.
support/cas-server-support-pm-webflow/src/main/java/org/apereo/cas/pm/web/flow/actions/SendPasswordResetInstructionsAction.java