Add more logs to debug the portal login (#16)

This commit is contained in:
Kevin Yue
2020-05-30 22:58:58 +08:00
committed by GitHub
parent e12613d9a4
commit 73925fd1e2
10 changed files with 96 additions and 45 deletions

View File

@@ -46,6 +46,9 @@ void PortalAuthenticator::onPreloginFinished()
PLOGI << "Portal prelogin succeeded.";
preloginResponse = PreloginResponse::parse(reply->readAll());
PLOGI << "Finished parsing the prelogin response. The region field is: " << preloginResponse.region();
if (preloginResponse.hasSamlAuthFields()) {
// Do SAML authentication
samlAuth();
@@ -178,14 +181,16 @@ void PortalAuthenticator::onFetchConfigFinished()
}
PLOGI << "Fetch the portal config succeeded.";
PortalConfigResponse response = PortalConfigResponse::parse(reply->readAll());
// Add the username & password to the response object
response.setUsername(username);
response.setPassword(password);
// Close the login window
if (normalLoginWindow) {
PLOGI << "Closing the NormalLoginWindow...";
// Save the credentials for reuse
settings::save("username", username);
settings::save("password", password);