mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2025-05-20 07:26:58 -04:00
Improve code
This commit is contained in:
@@ -24,7 +24,6 @@ PortalAuthenticator::~PortalAuthenticator()
|
||||
delete normalLoginWindow;
|
||||
}
|
||||
|
||||
|
||||
void PortalAuthenticator::authenticate()
|
||||
{
|
||||
PLOGI << "Preform portal prelogin at " << preloginUrl;
|
||||
@@ -88,10 +87,9 @@ void PortalAuthenticator::normalAuth()
|
||||
// Do login
|
||||
connect(normalLoginWindow, &NormalLoginWindow::performLogin, this, &PortalAuthenticator::onPerformNormalLogin);
|
||||
connect(normalLoginWindow, &NormalLoginWindow::rejected, this, &PortalAuthenticator::onLoginWindowRejected);
|
||||
connect(normalLoginWindow, &NormalLoginWindow::finished, this, &PortalAuthenticator::onLoginWindowFinished);
|
||||
|
||||
normalLoginWindow->exec();
|
||||
delete normalLoginWindow;
|
||||
normalLoginWindow = nullptr;
|
||||
normalLoginWindow->show();
|
||||
}
|
||||
|
||||
void PortalAuthenticator::onPerformNormalLogin(const QString &username, const QString &password)
|
||||
@@ -105,6 +103,12 @@ void PortalAuthenticator::onLoginWindowRejected()
|
||||
emitFail();
|
||||
}
|
||||
|
||||
void PortalAuthenticator::onLoginWindowFinished()
|
||||
{
|
||||
delete normalLoginWindow;
|
||||
normalLoginWindow = nullptr;
|
||||
}
|
||||
|
||||
void PortalAuthenticator::samlAuth()
|
||||
{
|
||||
PLOGI << "Trying to perform SAML login with saml-method " << preloginResponse.samlMethod();
|
||||
|
Reference in New Issue
Block a user