Skip to content

Commit

Permalink
Refs #95. Added support for password change on login
Browse files Browse the repository at this point in the history
  • Loading branch information
SBriere committed Oct 4, 2024
1 parent 93e261e commit b40389c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
6 changes: 6 additions & 0 deletions client/src/dialogs/WebLoginDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ WebLoginDialog::WebLoginDialog(ConfigManagerClient *config, QWidget *parent)
connect(myObject, &WebLoginSharedObject::loginFailure, this, &WebLoginDialog::onLoginFailed);
connect(myObject, &WebLoginSharedObject::mfaCheckInProgress, this, &WebLoginDialog::onMfaCheckInProgress);
connect(myObject, &WebLoginSharedObject::mfaSetupInProgress, this, &WebLoginDialog::onMfaSetupInProgress);
connect(myObject, &WebLoginSharedObject::passwordChangeInProgress, this, &WebLoginDialog::onPasswordChangeInProgress);
connect(myObject, &WebLoginSharedObject::redirectToLogin, this, &WebLoginDialog::onRedirectToLoginRequest);

m_webPage->setBackgroundColor(QColor(0x2c3338));
Expand Down Expand Up @@ -154,6 +155,11 @@ void WebLoginDialog::onMfaCheckInProgress()
ui->btnCancel->setVisible(true);
}

void WebLoginDialog::onPasswordChangeInProgress()
{
showLargeView(true);
}

void WebLoginDialog::onLoginFailed(const QString &message)
{
showLargeView(false);
Expand Down
8 changes: 8 additions & 0 deletions client/src/dialogs/WebLoginDialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ class WebLoginSharedObject : public QObject {
emit mfaCheckInProgress();
}

Q_INVOKABLE void sendPasswordChangeInProgress(){
emit passwordChangeInProgress();
}

Q_INVOKABLE void sendRedirectToLogin(){
emit redirectToLogin();
}
Expand All @@ -51,6 +55,8 @@ class WebLoginSharedObject : public QObject {
void mfaSetupInProgress();
void mfaCheckInProgress();

void passwordChangeInProgress();

};

namespace Ui {
Expand Down Expand Up @@ -97,6 +103,8 @@ private slots:

void onMfaSetupInProgress();
void onMfaCheckInProgress();
void onPasswordChangeInProgress();

void onLoginFailed(const QString &message);
void onRedirectToLoginRequest();

Expand Down

0 comments on commit b40389c

Please sign in to comment.