@Override
    public Principal nominate(final List<Principal> principals, final Map<String, List<Object>> attributes) {
        val principal = this.chain
            .stream()
            .sorted(Comparator.comparing(PrincipalElectionStrategy::getOrder))
            .map(Unchecked.function(strategy -> strategy.nominate(principals, attributes)))
            .findFirst()
            .orElseThrow();
        LOGGER.trace("Nominated principal [{}] from principal chain [{}]", principal, principals);
        return principal;
    }
Register election strategy.

@param factory the factory
core/cas-server-core-authentication-api/src/main/java/org/apereo/cas/authentication/principal/ChainingPrincipalElectionStrategy.java