mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2025-05-20 07:26:58 -04:00
Fix saml login for portal-userauthcookie (#12)
This commit is contained in:
@@ -151,11 +151,16 @@ void GatewayAuthenticator::samlAuth(QString samlMethod, QString samlRequest, QSt
|
||||
|
||||
void GatewayAuthenticator::onSAMLLoginSuccess(const QMap<QString, QString> &samlResult)
|
||||
{
|
||||
PLOGI << "SAML login succeeded, got the prelogin cookie " << samlResult.value("preloginCookie");
|
||||
if (samlResult.contains("preloginCookie")) {
|
||||
PLOGI << "SAML login succeeded, got the prelogin-cookie " << samlResult.value("preloginCookie");
|
||||
} else {
|
||||
PLOGI << "SAML login succeeded, got the portal-userauthcookie " << samlResult.value("userAuthCookie");
|
||||
}
|
||||
|
||||
LoginParams params;
|
||||
params.setUser(samlResult.value("username"));
|
||||
params.setPreloginCookie(samlResult.value("preloginCookie"));
|
||||
params.setUserAuthCookie(samlResult.value("userAuthCookie"));
|
||||
|
||||
login(params);
|
||||
}
|
||||
|
Reference in New Issue
Block a user