@ConditionalOnMissingBean(name = "oktaPrincipalFactory")
        @Bean
        @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
        public PrincipalFactory oktaPrincipalFactory(final ConfigurableApplicationContext applicationContext) {
            return BeanSupplier.of(PrincipalFactory.class)
                .when(CONDITION.given(applicationContext.getEnvironment()))
                .supply(PrincipalFactoryUtils::newPrincipalFactory)
                .otherwiseProxy()
                .get();
        }
This is {@link OktaAuthenticationConfiguration}.

@author Misagh Moayyed
@since 6.2.0
support/cas-server-support-okta-authentication/src/main/java/org/apereo/cas/config/OktaAuthenticationConfiguration.java