diff options
author | Monroe Linden <monroe@lindenlab.com> | 2010-03-31 13:53:40 -0700 |
---|---|---|
committer | Monroe Linden <monroe@lindenlab.com> | 2010-03-31 13:53:40 -0700 |
commit | 5c190996222ce2cf14997e16e16beb110173c0a2 (patch) | |
tree | 65e8f0c71de7b8cf9283bdae14036d1693f14563 /indra/newview/llviewermedia.h | |
parent | e504f895135eec69d9ec5ee31cdefc2ced145631 (diff) |
Enable OpenID auth in the embedded webkit browser.
Extract openid_url and openid_token tokens from the login response in process_login_success_response() and send them to LLViewerMedia if they're present.
Added LLViewerMedia::openIDSetup() to receive openid_url and openid_token, and added code to LLViewerMedia to do a POST with LLHTTPClient, retrieve the resulting cookie, and push it into the central cookie store. Also made sure the OpenID cookie gets re-added when the cookie store is cleared.
Added LLPluginCookieStore::setCookiesFromHost() to properly add a cookie that may not have a domain set. Made LLPluginCookieStore::Cookie::parse() add missing domain and path fields to cookies as necessary.
Fixed an issue where carriage returns in the string passed to LLPluginCookieStore::setCookies() or LLPluginCookieStore::setCookiesFromHost() would cause a parse failure.
Reviewed by gino and callum at http://codereview.lindenlab.com/1254001
Diffstat (limited to 'indra/newview/llviewermedia.h')
-rw-r--r-- | indra/newview/llviewermedia.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index 10dacf9532..e829d7a5b4 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -44,6 +44,8 @@ #include "llpluginclassmedia.h" #include "v4color.h" +#include "llurl.h" + class LLViewerMediaImpl; class LLUUID; class LLViewerMediaTexture; @@ -152,11 +154,17 @@ public: static void addCookie(const std::string &name, const std::string &value, const std::string &domain, const LLDate &expires, const std::string &path = std::string("/"), bool secure = false ); static void addSessionCookie(const std::string &name, const std::string &value, const std::string &domain, const std::string &path = std::string("/"), bool secure = false ); static void removeCookie(const std::string &name, const std::string &domain, const std::string &path = std::string("/") ); + + static void openIDSetup(const std::string &openid_url, const std::string &openid_token); + static void openIDCookieResponse(const std::string &cookie); private: + static void setOpenIDCookie(); static void onTeleportFinished(); static LLPluginCookieStore *sCookieStore; + static LLURL sOpenIDURL; + static std::string sOpenIDCookie; }; // Implementation functions not exported into header file |