@Override
    public Principal nominate(final Collection<Authentication> authentications,
                              final Map<String, List<Object>> principalAttributes) throws Throwable {
        val principal = getPrincipalFromAuthentication(authentications);
        val attributes = getPrincipalAttributesForPrincipal(authentications, principal, principalAttributes);
        val finalPrincipal = principalFactory.createPrincipal(principal.getId(), attributes);
        LOGGER.debug("Nominated [{}] as the primary principal", 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