public static PrincipalElectionStrategyConflictResolver newPrincipalElectionStrategyConflictResolver(
        final PersonDirectoryPrincipalResolverProperties properties) {
        if (StringUtils.equalsIgnoreCase(properties.getPrincipalResolutionConflictStrategy(), "first")) {
            return PrincipalElectionStrategyConflictResolver.first();
        }
        return PrincipalElectionStrategyConflictResolver.last();
    }
New principal election strategy conflict resolver.

@param properties the properties
@return the principal election strategy conflict resolver
core/cas-server-core-authentication-api/src/main/java/org/apereo/cas/authentication/CoreAuthenticationUtils.java