@Override
    public List<Credential> fromRequest(final HttpServletRequest request,
                                        final MultiValueMap<String, String> requestBody) {
        return this.chain
            .stream()
            .sorted(Comparator.comparing(RestHttpRequestCredentialFactory::getOrder))
            .map(Unchecked.function(f -> f.fromRequest(request, requestBody)))
            .flatMap(List::stream)
            .collect(Collectors.toList());
    }
Add credential factory.

@param factory the factory
core/cas-server-core-rest-api/src/main/java/org/apereo/cas/rest/factory/ChainingRestHttpRequestCredentialFactory.java