protected Optional<? extends PasswordlessUserAccount> findPasswordlessUserAccount(
        final RequestContext requestContext) throws Throwable {
        val username = requestContext.getRequestParameters().get(PasswordlessRequestParser.PARAMETER_USERNAME);
        if (StringUtils.isNotBlank(username)) {
            val passwordlessRequest = passwordlessRequestParser.parse(username);
            PasswordlessWebflowUtils.putPasswordlessAuthenticationRequest(requestContext, passwordlessRequest);
            return passwordlessUserAccountStore.findUser(passwordlessRequest);
        }
        val account = PasswordlessWebflowUtils.getPasswordlessAuthenticationAccount(requestContext, PasswordlessUserAccount.class);
        if (account != null) {
            val passwordlessRequest = passwordlessRequestParser.parse(account.getUsername());
            PasswordlessWebflowUtils.putPasswordlessAuthenticationRequest(requestContext, passwordlessRequest);
            return Optional.of(account);
        }
        throw UnauthorizedServiceException.denied("Denied");
    }
This is {@link DisplayBeforePasswordlessAuthenticationAction}.

@author Misagh Moayyed
@since 5.3.0
support/cas-server-support-passwordless-webflow/src/main/java/org/apereo/cas/web/flow/DisplayBeforePasswordlessAuthenticationAction.java