Permalink
Browse files

Removed CookieAuthentication static helper class.

  • Loading branch information...
1 parent 2aa980d commit 66c2321b1c93f638e6189082b9053b9c8753fb2b @mehrdada mehrdada committed Aug 13, 2012
View
1 AppHarbor.Web.Security/AppHarbor.Web.Security.csproj
@@ -39,7 +39,6 @@
<ItemGroup>
<Compile Include="AuthenticationCookie.cs" />
<Compile Include="ConfigFileAuthenticationConfiguration.cs" />
- <Compile Include="CookieAuthentication.cs" />
<Compile Include="CookieAuthenticationModule.cs" />
<Compile Include="CookieAuthenticator.cs" />
<Compile Include="CookieIdentity.cs" />
View
32 AppHarbor.Web.Security/CookieAuthentication.cs
@@ -1,32 +0,0 @@
-using System.Web;
-using System.Web.Security;
-
-namespace AppHarbor.Web.Security
-{
- public static class CookieAuthentication
- {
- public static void RedirectFromLoginPage(string userName, bool createPersistentCookie = false, string[] roles = null, byte[] tag = null)
- {
- SetAuthCookie(userName, createPersistentCookie, roles, tag);
- var context = HttpContext.Current;
- var returnUrl = context.Request.QueryString["ReturnUrl"];
- if (!string.IsNullOrWhiteSpace(returnUrl))
- {
- returnUrl = FormsAuthentication.DefaultUrl;
- }
- context.Response.Redirect(returnUrl);
- }
-
- public static void SetAuthCookie(string userName, bool createPersistentCookie = false, string[] roles = null, byte[] tag = null)
- {
- var cookieAuthenticator = new CookieAuthenticator();
- cookieAuthenticator.SetCookie(userName, createPersistentCookie, roles, tag);
- }
-
- public static void SignOut()
- {
- var cookieAuthenticator = new CookieAuthenticator();
- cookieAuthenticator.SignOut();
- }
- }
-}

0 comments on commit 66c2321

Please sign in to comment.