@Override
    protected Credential constructCredentialsFromRequest(final RequestContext requestContext) {
        val request = WebUtils.getHttpServletRequestFromExternalWebflowContext(requestContext);
        val converter = new BasicAuthenticationConverter();
        val token = converter.convert(request);
        return FunctionUtils.doIfNotNull(token, () -> {
            LOGGER.debug("Received basic authentication request from credentials [{}]", token.getPrincipal());
            return new UsernamePasswordCredential(token.getPrincipal().toString(), token.getCredentials().toString());
        });
    }
This is {@link BasicAuthenticationAction} that extracts basic authN credentials from the request.

@author Misagh Moayyed
@since 4.2.0
support/cas-server-support-basic/src/main/java/org/apereo/cas/web/flow/BasicAuthenticationAction.java