@ConditionalOnMissingBean(name = "defaultPrincipalElectionStrategyConfigurer")
        @Bean
        @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
        public PrincipalElectionStrategyConfigurer defaultPrincipalElectionStrategyConfigurer(
            @Qualifier(PrincipalElectionStrategyConflictResolver.BEAN_NAME)
            final PrincipalElectionStrategyConflictResolver defaultPrincipalElectionStrategyConflictResolver,
            @Qualifier("principalElectionAttributeMerger")
            final AttributeMerger attributeMerger,
            final CasConfigurationProperties casProperties,
            @Qualifier(PrincipalFactory.BEAN_NAME)
            final PrincipalFactory principalFactory) {
            return chain -> {
                val strategy = new DefaultPrincipalElectionStrategy(principalFactory, defaultPrincipalElectionStrategyConflictResolver);
                strategy.setAttributeMerger(attributeMerger);
                chain.registerElectionStrategy(strategy);
            };
        }
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