public void registerCredentialFactory(final RestHttpRequestCredentialFactory factory) {
        if (BeanSupplier.isNotProxy(factory)) {
            this.chain.add(factory);
            AnnotationAwareOrderComparator.sort(this.chain);
        }
    }
Add credential factory.

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