Automated merge with ssh://hg.lindenlab.com/viewer/viewer-2-0
commit
ad65fa11ac
|
|
@ -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")))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in New Issue