protected Principal getPrincipalFromAuthentication(final Collection<Authentication> authentications) {
        val principals = authentications.stream().map(Authentication::getPrincipal).collect(Collectors.toList());
        return principalElectionConflictResolver.resolve(principals);
    }
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