@Override
    public Optional<String> getCandidateUsername(final RequestContext context) {
        val request = WebUtils.getHttpServletRequestFromExternalWebflowContext(context);
        val service = argumentExtractor.extractService(request);
        val hint = Optional.ofNullable(service)
            .map(svc -> (List) svc.getAttributes().getOrDefault(OidcConstants.LOGIN_HINT, List.of()))
            .orElseGet(List::of);
        return hint.isEmpty() ? Optional.empty() : Optional.ofNullable(hint.getFirst().toString());
    }
This is {@link OidcCasWebflowLoginContextProvider}.

@author Misagh Moayyed
@since 6.4.0
support/cas-server-support-oidc-core-api/src/main/java/org/apereo/cas/oidc/web/flow/OidcCasWebflowLoginContextProvider.java