@ConditionalOnMissingBean(name = "oktaPersonAttributeDaos")
    @Bean
    @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
    public BeanContainer<PersonAttributeDao> oktaPersonAttributeDaos(
        final ConfigurableApplicationContext applicationContext,
        @Qualifier("oktaPersonDirectoryClient")
        final Client oktaPersonDirectoryClient,
        final CasConfigurationProperties casProperties) {
        return BeanSupplier.of(BeanContainer.class)
            .when(CONDITION.given(applicationContext.getEnvironment()))
            .supply(() -> {
                val properties = casProperties.getAuthn().getAttributeRepository().getOkta();
                val dao = new OktaPersonAttributeDao(oktaPersonDirectoryClient);
                dao.setUsernameAttributeProvider(new SimpleUsernameAttributeProvider(properties.getUsernameAttribute()));
                dao.setOrder(properties.getOrder());
                FunctionUtils.doIfNotNull(properties.getId(), id -> dao.setId(id));
                return BeanContainer.of(CollectionUtils.wrapList(dao));
            })
            .otherwise(BeanContainer::empty)
            .get();
    }
This is {@link OktaPersonDirectoryConfiguration}.

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