summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/lllogininstance.cpp2
-rw-r--r--indra/viewer_components/login/lllogin.cpp10
-rw-r--r--indra/viewer_components/login/tests/lllogin_test.cpp5
3 files changed, 10 insertions, 7 deletions
diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp
index 7d3da152c1..2dc9f255d7 100644
--- a/indra/newview/lllogininstance.cpp
+++ b/indra/newview/lllogininstance.cpp
@@ -189,7 +189,7 @@ void LLLoginInstance::constructAuthParams(const LLSD& credentials)
bool LLLoginInstance::handleLoginEvent(const LLSD& event)
{
- LL_DEBUGS("Login") << "LoginListener called!: \n" << event << LL_ENDL;
+ LL_DEBUGS("LLLogin") << "LoginListener called!: \n" << event << LL_ENDL;
if(!(event.has("state") && event.has("change") && event.has("progress")))
{
diff --git a/indra/viewer_components/login/lllogin.cpp b/indra/viewer_components/login/lllogin.cpp
index 02c13716ed..018f691672 100644
--- a/indra/viewer_components/login/lllogin.cpp
+++ b/indra/viewer_components/login/lllogin.cpp
@@ -222,13 +222,15 @@ void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD credential
// Still Downloading -- send progress update.
sendProgressEvent("offline", "downloading");
}
+
+ LL_DEBUGS("LLLogin") << "Auth Response: " << mAuthResponse << LL_ENDL;
status = mAuthResponse["status"].asString();
// Okay, we've received our final status event for this
// request. Unless we got a redirect response, break the retry
// loop for the current rewrittenURIs entry.
- if (! (status == "Complete" &&
- mAuthResponse["responses"]["login"].asString() == "indeterminate"))
+ if (!(status == "Complete" &&
+ mAuthResponse["responses"]["login"].asString() == "indeterminate"))
{
break;
}
@@ -237,8 +239,8 @@ void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD credential
// to some other URI ("indeterminate" -- why not "redirect"?).
// The response should contain another uri to try, with its
// own auth method.
- request["uri"] = mAuthResponse["next_url"];
- request["method"] = mAuthResponse["next_method"];
+ request["uri"] = mAuthResponse["responses"]["next_url"].asString();
+ request["method"] = mAuthResponse["responses"]["next_method"].asString();
} // loop back to try the redirected URI
// Here we're done with redirects for the current rewrittenURIs
diff --git a/indra/viewer_components/login/tests/lllogin_test.cpp b/indra/viewer_components/login/tests/lllogin_test.cpp
index 69a8424e87..7159959a4f 100644
--- a/indra/viewer_components/login/tests/lllogin_test.cpp
+++ b/indra/viewer_components/login/tests/lllogin_test.cpp
@@ -311,14 +311,15 @@ namespace tut
data["error"] = "dummy response";
data["transfer_rate"] = 0;
data["responses"]["login"] = "indeterminate";
- data["next_url"] = "login.indeterminate.com";
- data["next_method"] = "test_login_method";
+ data["responses"]["next_url"] = "login.indeterminate.com";
+ data["responses"]["next_method"] = "test_login_method";
dummyXMLRPC.setResponse(data);
dummyXMLRPC.sendReply();
ensure_equals("Fail back to authenticate 2", listener.lastEvent()["change"].asString(), "authenticating");
ensure_equals("Attempt 3", listener.lastEvent()["data"]["attempt"].asInteger(), 3);
ensure_equals("URI 3", listener.lastEvent()["data"]["request"]["uri"].asString(), "login.indeterminate.com");
+ ensure_equals("Method 3", listener.lastEvent()["data"]["request"]["method"].asString(), "test_login_method");
// Finally let the auth succeed.
data.clear();