From 7b1fa60cc6c74a53de0af636fa8f4f06caf87fa0 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Sat, 9 May 2020 23:31:00 +0200 Subject: Add SSO closes #94 --- src/LoginPage.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/LoginPage.h') 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; }; -- cgit 1.5.1