protected Principal electPrincipal(final List<Principal> principals, final Map<String, List<Object>> attributes) throws Throwable {
        val principal = principalElectionConflictResolver.resolve(principals);
        val finalPrincipal = principalFactory.createPrincipal(principal.getId(), attributes);
        LOGGER.debug("Final principal constructed by the chain of resolvers is [{}]", finalPrincipal);
        return finalPrincipal;
    }
This is {@link DefaultPrincipalElectionStrategy} that selects the primary principal
to be the first principal in the chain of authentication history.

@author Misagh Moayyed
@since 4.2.0
core/cas-server-core-authentication-api/src/main/java/org/apereo/cas/authentication/principal/DefaultPrincipalElectionStrategy.java