diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2012-05-09 08:17:43 -0700 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2012-05-09 08:17:43 -0700 |
commit | 01ff3ee1aa3209b9dfd9b9456f05a3a9c0b1234d (patch) | |
tree | de45abe5d03af972ab10241402e66c21b3e50c71 /src | |
parent | 957a1811bc69a033a16b00d755a88ceeaf3fced6 (diff) | |
parent | 3d1dcc42ffc0bcaec407d82b0d228b1305815829 (diff) | |
download | DotNetOpenAuth-01ff3ee1aa3209b9dfd9b9456f05a3a9c0b1234d.zip DotNetOpenAuth-01ff3ee1aa3209b9dfd9b9456f05a3a9c0b1234d.tar.gz DotNetOpenAuth-01ff3ee1aa3209b9dfd9b9456f05a3a9c0b1234d.tar.bz2 |
Merge pull request #142 from dotnetjunky/v4.0a
Make the MachineKeyUtil class internal
Diffstat (limited to 'src')
-rw-r--r-- | src/DotNetOpenAuth.AspNet/Clients/OAuth/AuthenticationOnlyCookieOAuthTokenManager.cs | 4 | ||||
-rw-r--r-- | src/DotNetOpenAuth.AspNet/MachineKeyUtil.cs | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/DotNetOpenAuth.AspNet/Clients/OAuth/AuthenticationOnlyCookieOAuthTokenManager.cs b/src/DotNetOpenAuth.AspNet/Clients/OAuth/AuthenticationOnlyCookieOAuthTokenManager.cs index 10cf39d..a58549a 100644 --- a/src/DotNetOpenAuth.AspNet/Clients/OAuth/AuthenticationOnlyCookieOAuthTokenManager.cs +++ b/src/DotNetOpenAuth.AspNet/Clients/OAuth/AuthenticationOnlyCookieOAuthTokenManager.cs @@ -87,6 +87,10 @@ namespace DotNetOpenAuth.AspNet.Clients { /// <param name="requestTokenSecret">The request token secret.</param> public void StoreRequestToken(string requestToken, string requestTokenSecret) { var cookie = new HttpCookie(TokenCookieKey); + if (FormsAuthentication.RequireSSL) { + cookie.Secure = true; + } + byte[] cookieBytes = Encoding.UTF8.GetBytes(requestTokenSecret); var secretBytes = MachineKeyUtil.Protect(cookieBytes, TokenCookieKey, "Token:" + requestToken); cookie.Values[requestToken] = HttpServerUtility.UrlTokenEncode(secretBytes); diff --git a/src/DotNetOpenAuth.AspNet/MachineKeyUtil.cs b/src/DotNetOpenAuth.AspNet/MachineKeyUtil.cs index ef49652..f5c8547 100644 --- a/src/DotNetOpenAuth.AspNet/MachineKeyUtil.cs +++ b/src/DotNetOpenAuth.AspNet/MachineKeyUtil.cs @@ -24,7 +24,7 @@ namespace DotNetOpenAuth.AspNet { /// since the implementation will change when upgrading 4.0 -> 4.5. This should be /// used for transient data only. /// </summary> - public static class MachineKeyUtil { + internal static class MachineKeyUtil { /// <summary> /// MachineKey implementation depending on the target .NET framework version /// </summary> |