@ConditionalOnMissingBean(name = PrincipalElectionStrategy.BEAN_NAME)
        @Bean
        @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
        public PrincipalElectionStrategy principalElectionStrategy(
            final List<PrincipalElectionStrategyConfigurer> configurers,
            @Qualifier("principalElectionAttributeMerger")
            final AttributeMerger attributeMerger) {
            LOGGER.trace("Building principal election strategies from [{}]", configurers);
            val chain = new ChainingPrincipalElectionStrategy();
            chain.setAttributeMerger(attributeMerger);
            AnnotationAwareOrderComparator.sortIfNecessary(configurers);

            configurers.forEach(c -> {
                LOGGER.trace("Configuring principal selection strategy: [{}]", c);
                c.configurePrincipalElectionStrategy(chain);
            });
            return chain;
        }
This is {@link CasCoreAuthenticationPrincipalConfiguration}.

@author Misagh Moayyed
@since 5.1.0
core/cas-server-core-authentication/src/main/java/org/apereo/cas/config/CasCoreAuthenticationPrincipalConfiguration.java