@RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
        @Bean
        @ConditionalOnMissingBean(name = "oidcWebFingerDiscoveryService")
        public OidcWebFingerDiscoveryService oidcWebFingerDiscoveryService(
            final CasConfigurationProperties casProperties,
            final ConfigurableApplicationContext applicationContext,
            @Qualifier(OidcWebFingerUserInfoRepository.BEAN_NAME)
            final OidcWebFingerUserInfoRepository oidcWebFingerUserInfoRepository,
            @Qualifier(OidcServerDiscoverySettings.BEAN_NAME_FACTORY)
            final FactoryBean<OidcServerDiscoverySettings> oidcServerDiscoverySettingsFactory) {

            return BeanSupplier.of(OidcWebFingerDiscoveryService.class)
                .when(CONDITION_WEBFINGER.given(applicationContext.getEnvironment()))
                .supply(Unchecked.supplier(() -> new OidcDefaultWebFingerDiscoveryService(
                    oidcWebFingerUserInfoRepository,
                    oidcServerDiscoverySettingsFactory.getObject(),
                    casProperties.getAuthn().getOidc().getWebfinger())))
                .otherwiseProxy()
                .get();
        }
This is {@link OidcConfiguration}.

@author Misagh Moayyed
@since 5.0.0
support/cas-server-support-oidc/src/main/java/org/apereo/cas/config/OidcConfiguration.java