summary refs log tree commit diff
path: root/src/LoginPage.h
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2020-05-09 23:31:00 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2020-05-09 23:33:03 +0200
commit7b1fa60cc6c74a53de0af636fa8f4f06caf87fa0 (patch)
tree30a2b6247c7b7be8c03995d0474f87df7019bb29 /src/LoginPage.h
parentImprove Login and Register page hinting (diff)
downloadnheko-7b1fa60cc6c74a53de0af636fa8f4f06caf87fa0.tar.xz
Add SSO
closes #94
Diffstat (limited to 'src/LoginPage.h')
-rw-r--r--src/LoginPage.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/LoginPage.h b/src/LoginPage.h
index 4b84abfc..8a402aea 100644
--- a/src/LoginPage.h
+++ b/src/LoginPage.h
@@ -38,6 +38,12 @@ class LoginPage : public QWidget
         Q_OBJECT
 
 public:
+        enum class LoginMethod
+        {
+                Password,
+                SSO,
+        };
+
         LoginPage(QWidget *parent = nullptr);
 
         void reset();
@@ -50,7 +56,7 @@ signals:
         //! Used to trigger the corresponding slot outside of the main thread.
         void versionErrorCb(const QString &err);
         void loginErrorCb(const QString &err);
-        void versionOkCb();
+        void versionOkCb(LoginPage::LoginMethod method);
 
         void loginOk(const mtx::responses::Login &res);
 
@@ -77,7 +83,7 @@ private slots:
         // Callback for errors produced during server probing
         void versionError(const QString &error_message);
         // Callback for successful server probing
-        void versionOk();
+        void versionOk(LoginPage::LoginMethod method);
 
 private:
         bool isMatrixIdValid();
@@ -123,4 +129,5 @@ private:
         TextField *password_input_;
         TextField *deviceName_;
         TextField *serverInput_;
+        LoginMethod loginMethod = LoginMethod::Password;
 };