@ConditionalOnMissingBean(name = "defaultCasEventListener")
        @Bean
        @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
        @Lazy(false)
        public CasAuthenticationEventListener defaultCasEventListener(
            @Qualifier(GeoLocationService.BEAN_NAME)
            final ObjectProvider<GeoLocationService> geoLocationService,
            @Qualifier(MessageSanitizer.BEAN_NAME)
            final MessageSanitizer messageSanitizer,
            final ConfigurableApplicationContext applicationContext,
            @Qualifier(CasEventRepository.BEAN_NAME)
            final CasEventRepository casEventRepository,
            @Qualifier(LogoutManager.DEFAULT_BEAN_NAME)
            final LogoutManager logoutManager) {
            return BeanSupplier.of(CasAuthenticationEventListener.class)
                .when(CONDITION.given(applicationContext.getEnvironment()))
                .supply(() -> new CasAuthenticationAuthenticationEventListener(casEventRepository,
                    messageSanitizer, geoLocationService.getIfAvailable(), logoutManager))
                .otherwiseProxy()
                .get();
        }
This is {@link CasCoreEventsAutoConfiguration}.

@author Misagh Moayyed
@since 5.0.0
core/cas-server-core-events/src/main/java/org/apereo/cas/config/CasCoreEventsAutoConfiguration.java