diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2012-05-29 19:55:09 -0700 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2012-05-29 19:55:09 -0700 |
commit | 35071ed016ca8d0bc8cd64b4d061480b5df862ca (patch) | |
tree | 35d9e444ecac6af1093f6dad78b34563e92c4961 /src/DotNetOpenAuth.AspNet/OpenAuthAuthenticationTicketHelper.cs | |
parent | 15afc19ca85da79bae25b94367e56820d05add7c (diff) | |
parent | 5e07054db57c7d52ca9e3d05ff16c4321eb514b7 (diff) | |
download | DotNetOpenAuth-35071ed016ca8d0bc8cd64b4d061480b5df862ca.zip DotNetOpenAuth-35071ed016ca8d0bc8cd64b4d061480b5df862ca.tar.gz DotNetOpenAuth-35071ed016ca8d0bc8cd64b4d061480b5df862ca.tar.bz2 |
Merge remote-tracking branch 'origin/v4.0'
Diffstat (limited to 'src/DotNetOpenAuth.AspNet/OpenAuthAuthenticationTicketHelper.cs')
-rw-r--r-- | src/DotNetOpenAuth.AspNet/OpenAuthAuthenticationTicketHelper.cs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/DotNetOpenAuth.AspNet/OpenAuthAuthenticationTicketHelper.cs b/src/DotNetOpenAuth.AspNet/OpenAuthAuthenticationTicketHelper.cs index 3fc3a21..f51de1c 100644 --- a/src/DotNetOpenAuth.AspNet/OpenAuthAuthenticationTicketHelper.cs +++ b/src/DotNetOpenAuth.AspNet/OpenAuthAuthenticationTicketHelper.cs @@ -106,10 +106,16 @@ namespace DotNetOpenAuth.AspNet { var cookie = new HttpCookie(FormsAuthentication.FormsCookieName, encryptedTicket) { HttpOnly = true, - Path = FormsAuthentication.FormsCookiePath, - Secure = FormsAuthentication.RequireSSL + Path = FormsAuthentication.FormsCookiePath }; + // only set Secure if FormsAuthentication requires SSL. + // otherwise, leave it to default value + if (FormsAuthentication.RequireSSL) + { + cookie.Secure = true; + } + if (FormsAuthentication.CookieDomain != null) { cookie.Domain = FormsAuthentication.CookieDomain; } @@ -123,4 +129,4 @@ namespace DotNetOpenAuth.AspNet { #endregion } -} +}
\ No newline at end of file |