diff options
author | Cho <cho@lindenlab.com> | 2013-07-12 01:29:57 +0100 |
---|---|---|
committer | Cho <cho@lindenlab.com> | 2013-07-12 01:29:57 +0100 |
commit | 36db132f236d4a3606b42a2a6af1b31c47892706 (patch) | |
tree | 9a2a0da3386a8b323b26f3ac0863524c485135da /indra | |
parent | b22b47fde552d2b1951858b7a4707876744cf396 (diff) |
added state parameter to PUT /connection route for ACME-692
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llfacebookconnect.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llfacebookconnect.h | 6 |
2 files changed, 7 insertions, 5 deletions
diff --git a/indra/newview/llfacebookconnect.cpp b/indra/newview/llfacebookconnect.cpp index 30ebedca25..0d11658d07 100644 --- a/indra/newview/llfacebookconnect.cpp +++ b/indra/newview/llfacebookconnect.cpp @@ -75,7 +75,7 @@ public: { if (query_map.has("code")) { - LLFacebookConnect::instance().connectToFacebook(query_map["code"]); + LLFacebookConnect::instance().connectToFacebook(query_map["code"], query_map.get("state")); } return true; } @@ -286,11 +286,13 @@ std::string LLFacebookConnect::getFacebookConnectURL(const std::string& route) return url; } -void LLFacebookConnect::connectToFacebook(const std::string& auth_code) +void LLFacebookConnect::connectToFacebook(const std::string& auth_code, const std::string& auth_state) { LLSD body; if (!auth_code.empty()) body["code"] = auth_code; + if (!auth_state.empty()) + body["state"] = auth_state; LLHTTPClient::put(getFacebookConnectURL("/connection"), body, new LLFacebookConnectResponder()); } diff --git a/indra/newview/llfacebookconnect.h b/indra/newview/llfacebookconnect.h index 0f828cf43e..77b1896c6e 100644 --- a/indra/newview/llfacebookconnect.h +++ b/indra/newview/llfacebookconnect.h @@ -54,9 +54,9 @@ public: FB_POST_FAILED = 6 }; - void connectToFacebook(const std::string& auth_code = ""); // Initiate the complete FB connection. Please use checkConnectionToFacebook() in normal use. - void disconnectFromFacebook(); // Disconnect from the FBC service. - void checkConnectionToFacebook(bool auto_connect = false); // Check if an access token is available on the FBC service. If not, call connectToFacebook(). + void connectToFacebook(const std::string& auth_code = "", const std::string& auth_state = ""); // Initiate the complete FB connection. Please use checkConnectionToFacebook() in normal use. + void disconnectFromFacebook(); // Disconnect from the FBC service. + void checkConnectionToFacebook(bool auto_connect = false); // Check if an access token is available on the FBC service. If not, call connectToFacebook(). void loadFacebookFriends(); void postCheckin(const std::string& location, const std::string& name, const std::string& description, const std::string& picture, const std::string& message); |