diff --git a/src/Microsoft.AspNet.Security.Cookies/CookieAuthenticationHandler.cs b/src/Microsoft.AspNet.Security.Cookies/CookieAuthenticationHandler.cs index e290232575..c8f964ee7a 100644 --- a/src/Microsoft.AspNet.Security.Cookies/CookieAuthenticationHandler.cs +++ b/src/Microsoft.AspNet.Security.Cookies/CookieAuthenticationHandler.cs @@ -150,7 +150,7 @@ namespace Microsoft.AspNet.Security.Cookies }; if (Options.CookieSecure == CookieSecureOption.SameAsRequest) { - cookieOptions.Secure = Request.IsSecure; + cookieOptions.Secure = Request.IsHttps; } else { diff --git a/src/Microsoft.AspNet.Security.OpenIdConnect/OpenidConnectAuthenticationHandler.cs b/src/Microsoft.AspNet.Security.OpenIdConnect/OpenidConnectAuthenticationHandler.cs index b30346e853..b51eb59034 100644 --- a/src/Microsoft.AspNet.Security.OpenIdConnect/OpenidConnectAuthenticationHandler.cs +++ b/src/Microsoft.AspNet.Security.OpenIdConnect/OpenidConnectAuthenticationHandler.cs @@ -472,7 +472,7 @@ namespace Microsoft.AspNet.Security.OpenIdConnect new CookieOptions { HttpOnly = true, - Secure = Request.IsSecure + Secure = Request.IsHttps }); } @@ -502,7 +502,7 @@ namespace Microsoft.AspNet.Security.OpenIdConnect var cookieOptions = new CookieOptions { HttpOnly = true, - Secure = Request.IsSecure + Secure = Request.IsHttps }; Response.Cookies.Delete(nonceKey, cookieOptions); diff --git a/src/Microsoft.AspNet.Security.Twitter/TwitterAuthenticationHandler.cs b/src/Microsoft.AspNet.Security.Twitter/TwitterAuthenticationHandler.cs index 46dcd43f4c..b16c4a2184 100644 --- a/src/Microsoft.AspNet.Security.Twitter/TwitterAuthenticationHandler.cs +++ b/src/Microsoft.AspNet.Security.Twitter/TwitterAuthenticationHandler.cs @@ -108,7 +108,7 @@ namespace Microsoft.AspNet.Security.Twitter var cookieOptions = new CookieOptions { HttpOnly = true, - Secure = Request.IsSecure + Secure = Request.IsHttps }; Response.Cookies.Delete(StateCookie, cookieOptions); @@ -167,7 +167,7 @@ namespace Microsoft.AspNet.Security.Twitter var cookieOptions = new CookieOptions { HttpOnly = true, - Secure = Request.IsSecure + Secure = Request.IsHttps }; Response.Cookies.Append(StateCookie, Options.StateDataFormat.Protect(requestToken), cookieOptions); diff --git a/src/Microsoft.AspNet.Security/Infrastructure/AuthenticationHandler.cs b/src/Microsoft.AspNet.Security/Infrastructure/AuthenticationHandler.cs index fc847f4fa9..92b7889d58 100644 --- a/src/Microsoft.AspNet.Security/Infrastructure/AuthenticationHandler.cs +++ b/src/Microsoft.AspNet.Security/Infrastructure/AuthenticationHandler.cs @@ -393,7 +393,7 @@ namespace Microsoft.AspNet.Security.Infrastructure var cookieOptions = new CookieOptions { HttpOnly = true, - Secure = Request.IsSecure + Secure = Request.IsHttps }; properties.Dictionary[correlationKey] = correlationId; @@ -415,7 +415,7 @@ namespace Microsoft.AspNet.Security.Infrastructure var cookieOptions = new CookieOptions { HttpOnly = true, - Secure = Request.IsSecure + Secure = Request.IsHttps }; Response.Cookies.Delete(correlationKey, cookieOptions);