-#include "iconloader.h"
-
-CoreConfigWizard::CoreConfigWizard(CoreConnection *connection, const QList<QVariant> &backends, QWidget *parent)
- : QWizard(parent),
- _connection(connection)
-{
- setModal(true);
- setAttribute(Qt::WA_DeleteOnClose);
-
- foreach(const QVariant &v, backends)
- _backends[v.toMap()["DisplayName"].toString()] = v;
-
- setPage(IntroPage, new CoreConfigWizardPages::IntroPage(this));
- setPage(AdminUserPage, new CoreConfigWizardPages::AdminUserPage(this));
- setPage(StorageSelectionPage, new CoreConfigWizardPages::StorageSelectionPage(_backends, this));
- syncPage = new CoreConfigWizardPages::SyncPage(this);
- connect(syncPage, SIGNAL(setupCore(const QString &, const QVariantMap &)), SLOT(prepareCoreSetup(const QString &, const QVariantMap &)));
- setPage(SyncPage, syncPage);
- syncRelayPage = new CoreConfigWizardPages::SyncRelayPage(this);
- connect(syncRelayPage, SIGNAL(startOver()), this, SLOT(startOver()));
- setPage(SyncRelayPage, syncRelayPage);
- //setPage(Page_StorageDetails, new StorageDetailsPage());
- //setPage(Page_Conclusion, new ConclusionPage(storageProviders));
-
- setStartId(IntroPage);
- //setStartId(StorageSelectionPage);
-
-#ifndef Q_WS_MAC
- setWizardStyle(ModernStyle);
+
+#include "client.h"
+
+CoreConfigWizard::CoreConfigWizard(CoreConnection *connection, const QList<QVariant> &backends, const QList<QVariant> &authenticators, QWidget *parent)
+ : QWizard(parent),
+ _connection(connection)
+{
+ setModal(true);
+ setAttribute(Qt::WA_DeleteOnClose);
+
+ foreach(const QVariant &v, backends)
+ _backends[v.toMap()["DisplayName"].toString()] = v;
+
+ foreach(const QVariant &v, authenticators)
+ _authenticators[v.toMap()["DisplayName"].toString()] = v;
+
+ setPage(IntroPage, new CoreConfigWizardPages::IntroPage(this));
+ setPage(AdminUserPage, new CoreConfigWizardPages::AdminUserPage(this));
+ setPage(AuthenticationSelectionPage, new CoreConfigWizardPages::AuthenticationSelectionPage(_authenticators, this));
+ setPage(StorageSelectionPage, new CoreConfigWizardPages::StorageSelectionPage(_backends, this));
+ syncPage = new CoreConfigWizardPages::SyncPage(this);
+ connect(syncPage, SIGNAL(setupCore(const QString &, const QVariantMap &, const QString &, const QVariantMap &)),
+ SLOT(prepareCoreSetup(const QString &, const QVariantMap &, const QString &, const QVariantMap &)));
+ setPage(SyncPage, syncPage);
+ syncRelayPage = new CoreConfigWizardPages::SyncRelayPage(this);
+ connect(syncRelayPage, SIGNAL(startOver()), this, SLOT(startOver()));
+ setPage(SyncRelayPage, syncRelayPage);
+ //setPage(Page_StorageDetails, new StorageDetailsPage());
+ //setPage(Page_Conclusion, new ConclusionPage(storageProviders));
+
+ setStartId(IntroPage);
+ //setStartId(StorageSelectionPage);
+
+#ifndef Q_OS_MAC
+ setWizardStyle(ModernStyle);