private static Credential extractBasicAuthenticationCredential(final HttpServletRequest request) {
        val converter = new BasicAuthenticationConverter();
        val token = converter.convert(request);
        return FunctionUtils.doIfNotNull(token, () -> {
            LOGGER.debug("Received basic authentication ECP request from credentials [{}]", token.getPrincipal());
            return new UsernamePasswordCredential(token.getPrincipal().toString(), token.getCredentials().toString());
        });
    }
Handle ecp request.

@param response the response
@param request  the request
@throws Exception the exception
support/cas-server-support-saml-idp-web/src/main/java/org/apereo/cas/support/saml/web/idp/profile/ecp/ECPSamlIdPProfileHandlerController.java