diff --git a/GPClient/gpclient.cpp b/GPClient/gpclient.cpp index 0b29ed9..b71a8b3 100644 --- a/GPClient/gpclient.cpp +++ b/GPClient/gpclient.cpp @@ -307,7 +307,7 @@ void GPClient::onPortalSuccess(const PortalConfigResponse portalConfig, const QS { PLOGI << "Portal authentication succeeded."; - // No gateway found in protal configuration + // No gateway found in portal configuration if (portalConfig.allGateways().size() == 0) { PLOGI << "No gateway found in portal configuration, treat the portal address as a gateway."; tryGatewayLogin(); diff --git a/GPClient/gphelper.cpp b/GPClient/gphelper.cpp index 6dd31b8..dedb34a 100644 --- a/GPClient/gphelper.cpp +++ b/GPClient/gphelper.cpp @@ -33,7 +33,7 @@ QNetworkReply* gpclient::helper::createRequest(QString url, QByteArray params) GPGateway gpclient::helper::filterPreferredGateway(QList gateways, const QString ruleName) { - PLOGI << gateways.size() << " gateway(s) avaiable, filter the gateways with rule: " << ruleName; + PLOGI << gateways.size() << " gateway(s) available, filter the gateways with rule: " << ruleName; GPGateway gateway = gateways.first(); diff --git a/GPClient/portalauthenticator.cpp b/GPClient/portalauthenticator.cpp index 30ed6b1..644777a 100644 --- a/GPClient/portalauthenticator.cpp +++ b/GPClient/portalauthenticator.cpp @@ -122,9 +122,18 @@ void PortalAuthenticator::samlAuth() SAMLLoginWindow *loginWindow = new SAMLLoginWindow; - connect(loginWindow, &SAMLLoginWindow::success, this, &PortalAuthenticator::onSAMLLoginSuccess); - connect(loginWindow, &SAMLLoginWindow::fail, this, &PortalAuthenticator::onSAMLLoginFail); - connect(loginWindow, &SAMLLoginWindow::rejected, this, &PortalAuthenticator::onLoginWindowRejected); + connect(loginWindow, &SAMLLoginWindow::success, [this, loginWindow](const QMap samlResult) { + onSAMLLoginSuccess(samlResult); + loginWindow->deleteLater(); + }); + connect(loginWindow, &SAMLLoginWindow::fail, [this, loginWindow](const QString msg) { + onSAMLLoginFail(msg); + loginWindow->deleteLater(); + }); + connect(loginWindow, &SAMLLoginWindow::rejected, [this, loginWindow]() { + onLoginWindowRejected(); + loginWindow->deleteLater(); + }); loginWindow->login(preloginResponse.samlMethod(), preloginResponse.samlRequest(), preloginUrl); }