diff options
author | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2011-03-21 07:41:48 +0000 |
---|---|---|
committer | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2011-03-21 07:41:48 +0000 |
commit | a42a08700997d692dd117191f2e0b1455a871d5a (patch) | |
tree | 13b982c3c5b23733d0f5fdf2ff46e6e07545d87d /sca-cpp/trunk/modules/http/openauth.hpp | |
parent | 148ad1144183b0e24cc214dfa527f09efa7585d4 (diff) |
Support authentication across wildcard domains.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1083692 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-cpp/trunk/modules/http/openauth.hpp')
-rw-r--r-- | sca-cpp/trunk/modules/http/openauth.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sca-cpp/trunk/modules/http/openauth.hpp b/sca-cpp/trunk/modules/http/openauth.hpp index 9023848305..9b49cfa4c2 100644 --- a/sca-cpp/trunk/modules/http/openauth.hpp +++ b/sca-cpp/trunk/modules/http/openauth.hpp @@ -73,11 +73,11 @@ const maybe<string> sessionID(const request_rec* r) { /** * Convert a session id to a cookie string. */ -const string cookie(const string& sid) { +const string cookie(const string& sid, const string& domain) { const time_t t = time(NULL) + 86400; char exp[32]; strftime(exp, 32, "%a, %d-%b-%Y %H:%M:%S GMT", gmtime(&t)); - const string c = string("TuscanyOpenAuth=") + sid + string(";path=/;expires=" + string(exp)) + ";secure=TRUE"; + const string c = string("TuscanyOpenAuth=") + sid + ";domain=." + domain + ";path=/;expires=" + string(exp) + ";secure=TRUE"; debug(c, "openauth::cookie"); return c; } |