├── .gitignore
├── MVC4FormsAuth.Managers
├── MVC4FormsAuth.Managers.csproj
├── Properties
│ └── AssemblyInfo.cs
└── UserManager.cs
├── MVC4FormsAuth.Types
├── Attributes
│ ├── AllowAnonymous.cs
│ └── LogonAuthorize.cs
├── MVC4FormsAuth.Types.csproj
├── Models
│ └── Logon.cs
├── MyPrincipal.cs
├── Properties
│ └── AssemblyInfo.cs
└── User.cs
├── MVC4FormsAuth.Web
├── App_Start
│ ├── FilterConfig.cs
│ ├── RouteConfig.cs
│ └── WebApiConfig.cs
├── Controllers
│ ├── HomeController.cs
│ └── LoginController.cs
├── Global.asax
├── Global.asax.cs
├── MVC4FormsAuth.Web.csproj
├── MVC4FormsAuth.Web.csproj.user
├── Properties
│ └── AssemblyInfo.cs
├── Providers
│ └── MyMembershipProvider.cs
├── Styles
│ └── style.css
├── Views
│ ├── Home
│ │ └── Index.cshtml
│ ├── Shared
│ │ ├── Controls
│ │ │ └── Login.cshtml
│ │ └── Layouts
│ │ │ └── default.cshtml
│ └── Web.config
├── Web.Debug.config
├── Web.Release.config
├── Web.config
└── packages.config
├── MVC4FormsAuth.sln
├── README.md
└── packages
├── Microsoft.AspNet.Mvc.4.0.20710.0
└── Microsoft.AspNet.Mvc.4.0.20710.0.nupkg
├── Microsoft.AspNet.Razor.2.0.20710.0
└── Microsoft.AspNet.Razor.2.0.20710.0.nupkg
├── Microsoft.AspNet.WebApi.4.0.20710.0
└── Microsoft.AspNet.WebApi.4.0.20710.0.nupkg
├── Microsoft.AspNet.WebApi.Client.4.0.20710.0
└── Microsoft.AspNet.WebApi.Client.4.0.20710.0.nupkg
├── Microsoft.AspNet.WebApi.Core.4.0.20710.0
├── Microsoft.AspNet.WebApi.Core.4.0.20710.0.nupkg
└── content
│ └── web.config.transform
├── Microsoft.AspNet.WebApi.WebHost.4.0.20710.0
└── Microsoft.AspNet.WebApi.WebHost.4.0.20710.0.nupkg
├── Microsoft.AspNet.WebPages.2.0.20710.0
└── Microsoft.AspNet.WebPages.2.0.20710.0.nupkg
├── Microsoft.Net.Http.2.0.20710.0
├── Microsoft.Net.Http.2.0.20710.0.nupkg
└── lib
│ └── net45
│ └── _._
├── Microsoft.Web.Infrastructure.1.0.0.0
└── Microsoft.Web.Infrastructure.1.0.0.0.nupkg
├── Newtonsoft.Json.4.5.6
└── Newtonsoft.Json.4.5.6.nupkg
└── repositories.config
/.gitignore:
--------------------------------------------------------------------------------
1 | *.cache
2 | *.dll
3 | *.pdb
4 | *.txt
5 | *.suo
6 | *.xml
7 | *.vspscc
8 | /*/bin/Debug/*.dll
9 | /*/obj/*/*.*
--------------------------------------------------------------------------------
/MVC4FormsAuth.Managers/MVC4FormsAuth.Managers.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {5D715937-4A4C-4EB2-9AF5-559F0E32E388}
8 | Library
9 | Properties
10 | MVC4FormsAuth.Managers
11 | MVC4FormsAuth.Managers
12 | v4.0
13 | 512
14 |
15 |
16 | true
17 | full
18 | false
19 | bin\Debug\
20 | DEBUG;TRACE
21 | prompt
22 | 4
23 |
24 |
25 | pdbonly
26 | true
27 | bin\Release\
28 | TRACE
29 | prompt
30 | 4
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 | {641bcc91-cd11-434c-9fd3-c5882f61deed}
50 | MVC4FormsAuth.Types
51 |
52 |
53 |
54 |
61 |
--------------------------------------------------------------------------------
/MVC4FormsAuth.Managers/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("MVC4FormsAuth.Managers")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("MVC4FormsAuth.Managers")]
13 | [assembly: AssemblyCopyright("Copyright © 2012")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("d85e98ca-c486-40e6-aa3c-bc348d5ecf0d")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/MVC4FormsAuth.Managers/UserManager.cs:
--------------------------------------------------------------------------------
1 | using MVC4FormsAuth.Types;
2 | using MVC4FormsAuth.Types.Models;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.Linq;
6 | using System.Text;
7 | using System.Web;
8 | using System.Web.Script.Serialization;
9 | using System.Web.Security;
10 |
11 | namespace MVC4FormsAuth.Managers
12 | {
13 | public static class UserManager
14 | {
15 | ///
16 | /// Returns the User from the Context.User.Identity by decrypting the forms auth ticket and returning the user object.
17 | ///
18 | public static User User
19 | {
20 | get
21 | {
22 | if (HttpContext.Current.User.Identity.IsAuthenticated)
23 | {
24 | // The user is authenticated. Return the user from the forms auth ticket.
25 | return ((MyPrincipal)(HttpContext.Current.User)).User;
26 | }
27 | else if (HttpContext.Current.Items.Contains("User"))
28 | {
29 | // The user is not authenticated, but has successfully logged in.
30 | return (User)HttpContext.Current.Items["User"];
31 | }
32 | else
33 | {
34 | return null;
35 | }
36 | }
37 | }
38 |
39 | ///
40 | /// Authenticates a user against a database, web service, etc.
41 | ///
42 | /// Username
43 | /// Password
44 | /// User
45 | public static User AuthenticateUser(string username, string password)
46 | {
47 | User user = null;
48 |
49 | // Lookup user in database, web service, etc. We'll just generate a fake user for this demo.
50 | if (username == "john" && password == "doe")
51 | {
52 | user = new User { Id = 123, Name = "John Doe", Username = "johndoe", Age = 21 };
53 | }
54 |
55 | return user;
56 | }
57 |
58 | ///
59 | /// Authenticates a user via the MembershipProvider and creates the associated forms authentication ticket.
60 | ///
61 | /// Logon
62 | /// HttpResponseBase
63 | /// bool
64 | public static bool ValidateUser(Logon logon, HttpResponseBase response)
65 | {
66 | bool result = false;
67 |
68 | if (Membership.ValidateUser(logon.Username, logon.Password))
69 | {
70 | // Create the authentication ticket with custom user data.
71 | var serializer = new JavaScriptSerializer();
72 | string userData = serializer.Serialize(UserManager.User);
73 |
74 | FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(1,
75 | logon.Username,
76 | DateTime.Now,
77 | DateTime.Now.AddDays(30),
78 | true,
79 | userData,
80 | FormsAuthentication.FormsCookiePath);
81 |
82 | // Encrypt the ticket.
83 | string encTicket = FormsAuthentication.Encrypt(ticket);
84 |
85 | // Create the cookie.
86 | response.Cookies.Add(new HttpCookie(FormsAuthentication.FormsCookieName, encTicket));
87 |
88 | result = true;
89 | }
90 |
91 | return result;
92 | }
93 |
94 | ///
95 | /// Clears the user session, clears the forms auth ticket, expires the forms auth cookie.
96 | ///
97 | /// HttpSessionStateBase
98 | /// HttpResponseBase
99 | public static void Logoff(HttpSessionStateBase session, HttpResponseBase response)
100 | {
101 | // Delete the user details from cache.
102 | session.Abandon();
103 |
104 | // Delete the authentication ticket and sign out.
105 | FormsAuthentication.SignOut();
106 |
107 | // Clear authentication cookie.
108 | HttpCookie cookie = new HttpCookie(FormsAuthentication.FormsCookieName, "");
109 | cookie.Expires = DateTime.Now.AddYears(-1);
110 | response.Cookies.Add(cookie);
111 | }
112 | }
113 | }
114 |
--------------------------------------------------------------------------------
/MVC4FormsAuth.Types/Attributes/AllowAnonymous.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace MVC4FormsAuth.Types.Attributes
7 | {
8 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
9 | public sealed class AllowAnonymousAttribute : Attribute
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/MVC4FormsAuth.Types/Attributes/LogonAuthorize.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Web.Mvc;
6 |
7 | namespace MVC4FormsAuth.Types.Attributes
8 | {
9 | public sealed class LogonAuthorize : AuthorizeAttribute
10 | {
11 | public override void OnAuthorization(AuthorizationContext filterContext)
12 | {
13 | bool skipAuthorization = filterContext.ActionDescriptor.IsDefined(typeof(AllowAnonymousAttribute), true) ||
14 | filterContext.ActionDescriptor.ControllerDescriptor.IsDefined(typeof(AllowAnonymousAttribute), true);
15 |
16 | // If the method did not exclusively opt-out of security (via the AllowAnonmousAttribute), then check for an authentication ticket.
17 | if (!skipAuthorization)
18 | {
19 | base.OnAuthorization(filterContext);
20 | }
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/MVC4FormsAuth.Types/MVC4FormsAuth.Types.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {641BCC91-CD11-434C-9FD3-C5882F61DEED}
8 | Library
9 | Properties
10 | MVC4FormsAuth.Types
11 | MVC4FormsAuth.Types
12 | v4.0
13 | 512
14 |
15 |
16 | true
17 | full
18 | false
19 | bin\Debug\
20 | DEBUG;TRACE
21 | prompt
22 | 4
23 |
24 |
25 | pdbonly
26 | true
27 | bin\Release\
28 | TRACE
29 | prompt
30 | 4
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
60 |
--------------------------------------------------------------------------------
/MVC4FormsAuth.Types/Models/Logon.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.ComponentModel.DataAnnotations;
6 |
7 | namespace MVC4FormsAuth.Types.Models
8 | {
9 | public class Logon
10 | {
11 | [Required]
12 | public string Username { get; set; }
13 |
14 | [Required]
15 | [DataType(DataType.Password)]
16 | public string Password { get; set; }
17 |
18 | public string RedirectUrl { get; set; }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/MVC4FormsAuth.Types/MyPrincipal.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Security.Principal;
5 | using System.Text;
6 |
7 | namespace MVC4FormsAuth.Types
8 | {
9 | public class MyPrincipal : IPrincipal
10 | {
11 | public MyPrincipal(IIdentity identity)
12 | {
13 | Identity = identity;
14 | }
15 |
16 | public IIdentity Identity
17 | {
18 | get;
19 | private set;
20 | }
21 |
22 | public User User { get; set; }
23 |
24 | public bool IsInRole(string role)
25 | {
26 | return true;
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/MVC4FormsAuth.Types/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("MVC4FormsAuth.Types")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("MVC4FormsAuth.Types")]
13 | [assembly: AssemblyCopyright("Copyright © 2012")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("92035e1d-0971-4eaa-84de-559b906ca1dc")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/MVC4FormsAuth.Types/User.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace MVC4FormsAuth.Types
7 | {
8 | public class User
9 | {
10 | public int Id { get; set; }
11 | public string Name { get; set; }
12 | public string Username { get; set; }
13 | public int Age { get; set; }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/MVC4FormsAuth.Web/App_Start/FilterConfig.cs:
--------------------------------------------------------------------------------
1 | using MVC4FormsAuth.Types.Attributes;
2 | using System.Web;
3 | using System.Web.Mvc;
4 |
5 | namespace MVC4FormsAuth
6 | {
7 | public class FilterConfig
8 | {
9 | public static void RegisterGlobalFilters(GlobalFilterCollection filters)
10 | {
11 | // Add controller security (AllowAnonymousAttribute).
12 | filters.Add(new LogonAuthorize());
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------
/MVC4FormsAuth.Web/App_Start/RouteConfig.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Web;
5 | using System.Web.Mvc;
6 | using System.Web.Routing;
7 |
8 | namespace MVC4FormsAuth
9 | {
10 | public class RouteConfig
11 | {
12 | public static void RegisterRoutes(RouteCollection routes)
13 | {
14 | routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
15 |
16 | routes.MapRoute("login", "login", new { controller = "Login", action = "Login" });
17 | routes.MapRoute("logout", "logout", new { controller = "Login", action = "Logout" });
18 |
19 | routes.MapRoute(
20 | name: "Default",
21 | url: "{controller}/{action}/{id}",
22 | defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
23 | );
24 | }
25 | }
26 | }
--------------------------------------------------------------------------------
/MVC4FormsAuth.Web/App_Start/WebApiConfig.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Web.Http;
5 |
6 | namespace MVC4FormsAuth
7 | {
8 | public static class WebApiConfig
9 | {
10 | public static void Register(HttpConfiguration config)
11 | {
12 | config.Routes.MapHttpRoute(
13 | name: "DefaultApi",
14 | routeTemplate: "api/{controller}/{id}",
15 | defaults: new { id = RouteParameter.Optional }
16 | );
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/MVC4FormsAuth.Web/Controllers/HomeController.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Web;
5 | using System.Web.Mvc;
6 |
7 | namespace MVC4FormsAuth.Web.Controllers
8 | {
9 | public class HomeController : Controller
10 | {
11 | [AllowAnonymous]
12 | public ActionResult Index()
13 | {
14 | return View();
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/MVC4FormsAuth.Web/Controllers/LoginController.cs:
--------------------------------------------------------------------------------
1 | using MVC4FormsAuth.Managers;
2 | using MVC4FormsAuth.Types.Models;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.Linq;
6 | using System.Web;
7 | using System.Web.Mvc;
8 |
9 | namespace MVC4FormsAuth.Web.Controllers
10 | {
11 | public class LoginController : Controller
12 | {
13 | [HttpPost]
14 | [AllowAnonymous]
15 | public JsonResult Login(Logon logon)
16 | {
17 | string status = "The username or password provided is incorrect.";
18 |
19 | // Verify the fields.
20 | if (ModelState.IsValid)
21 | {
22 | // Authenticate the user.
23 | if (UserManager.ValidateUser(logon, Response))
24 | {
25 | // Redirect to the secure area.
26 | if (string.IsNullOrWhiteSpace(logon.RedirectUrl))
27 | {
28 | logon.RedirectUrl = "/";
29 | }
30 |
31 | status = "OK";
32 | }
33 | }
34 |
35 | return Json(new { RedirectUrl = logon.RedirectUrl, Status = status });
36 | }
37 |
38 | public ActionResult Logout()
39 | {
40 | // Clear the user session and forms auth ticket.
41 | UserManager.Logoff(Session, Response);
42 |
43 | return RedirectToAction("Index", "Home");
44 | }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/MVC4FormsAuth.Web/Global.asax:
--------------------------------------------------------------------------------
1 | <%@ Application Codebehind="Global.asax.cs" Inherits="MVC4FormsAuth.Web.MvcApplication" Language="C#" %>
2 |
--------------------------------------------------------------------------------
/MVC4FormsAuth.Web/Global.asax.cs:
--------------------------------------------------------------------------------
1 | using MVC4FormsAuth.Types;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Security.Principal;
6 | using System.Web;
7 | using System.Web.Http;
8 | using System.Web.Mvc;
9 | using System.Web.Routing;
10 | using System.Web.Script.Serialization;
11 | using System.Web.Security;
12 |
13 | namespace MVC4FormsAuth.Web
14 | {
15 | public class MvcApplication : System.Web.HttpApplication
16 | {
17 | protected void Application_Start()
18 | {
19 | AreaRegistration.RegisterAllAreas();
20 |
21 | WebApiConfig.Register(GlobalConfiguration.Configuration);
22 | FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
23 | RouteConfig.RegisterRoutes(RouteTable.Routes);
24 | }
25 |
26 | protected void Application_AuthenticateRequest(object sender, EventArgs e)
27 | {
28 | HttpCookie authCookie = Request.Cookies[FormsAuthentication.FormsCookieName];
29 | if (authCookie != null)
30 | {
31 | // Get the forms authentication ticket.
32 | FormsAuthenticationTicket authTicket = FormsAuthentication.Decrypt(authCookie.Value);
33 | var identity = new GenericIdentity(authTicket.Name, "Forms");
34 | var principal = new MyPrincipal(identity);
35 |
36 | // Get the custom user data encrypted in the ticket.
37 | string userData = ((FormsIdentity)(Context.User.Identity)).Ticket.UserData;
38 |
39 | // Deserialize the json data and set it on the custom principal.
40 | var serializer = new JavaScriptSerializer();
41 | principal.User = (User)serializer.Deserialize(userData, typeof(User));
42 |
43 | // Set the context user.
44 | Context.User = principal;
45 | }
46 | }
47 | }
48 | }
--------------------------------------------------------------------------------
/MVC4FormsAuth.Web/MVC4FormsAuth.Web.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 |
8 |
9 | 2.0
10 | {A2DF5106-0324-43B2-8A3C-2535BDA02DE3}
11 | {E3E379DF-F4C6-4180-9B81-6769533ABE47};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}
12 | Library
13 | Properties
14 | MVC4FormsAuth.Web
15 | MVC4FormsAuth.Web
16 | v4.0
17 | false
18 | true
19 |
20 |
21 |
22 |
23 |
24 |
25 | true
26 | full
27 | false
28 | bin\
29 | DEBUG;TRACE
30 | prompt
31 | 4
32 |
33 |
34 | pdbonly
35 | true
36 | bin\
37 | TRACE
38 | prompt
39 | 4
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 | True
63 | ..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll
64 |
65 |
66 | ..\packages\Newtonsoft.Json.4.5.6\lib\net40\Newtonsoft.Json.dll
67 |
68 |
69 | True
70 | ..\packages\Microsoft.Net.Http.2.0.20710.0\lib\net40\System.Net.Http.dll
71 |
72 |
73 | ..\packages\Microsoft.AspNet.WebApi.Client.4.0.20710.0\lib\net40\System.Net.Http.Formatting.dll
74 |
75 |
76 | True
77 | ..\packages\Microsoft.Net.Http.2.0.20710.0\lib\net40\System.Net.Http.WebRequest.dll
78 |
79 |
80 | True
81 | ..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.Helpers.dll
82 |
83 |
84 | ..\packages\Microsoft.AspNet.WebApi.Core.4.0.20710.0\lib\net40\System.Web.Http.dll
85 |
86 |
87 | ..\packages\Microsoft.AspNet.WebApi.WebHost.4.0.20710.0\lib\net40\System.Web.Http.WebHost.dll
88 |
89 |
90 | True
91 | ..\packages\Microsoft.AspNet.Mvc.4.0.20710.0\lib\net40\System.Web.Mvc.dll
92 |
93 |
94 | True
95 | ..\packages\Microsoft.AspNet.Razor.2.0.20710.0\lib\net40\System.Web.Razor.dll
96 |
97 |
98 | True
99 | ..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.WebPages.dll
100 |
101 |
102 | True
103 | ..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.WebPages.Deployment.dll
104 |
105 |
106 | True
107 | ..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.WebPages.Razor.dll
108 |
109 |
110 |
111 |
112 |
113 |
114 | Global.asax
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 | Web.config
128 |
129 |
130 | Web.config
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 | {5d715937-4a4c-4eb2-9af5-559f0e32e388}
143 | MVC4FormsAuth.Managers
144 |
145 |
146 | {641bcc91-cd11-434c-9fd3-c5882f61deed}
147 | MVC4FormsAuth.Types
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 | 10.0
158 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 | True
171 | True
172 | 0
173 | /
174 | http://localhost:46808/
175 | False
176 | False
177 |
178 |
179 | False
180 |
181 |
182 |
183 |
184 |
190 |
--------------------------------------------------------------------------------
/MVC4FormsAuth.Web/MVC4FormsAuth.Web.csproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | SpecificPage
10 | True
11 | False
12 | False
13 | False
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 | False
23 | True
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/MVC4FormsAuth.Web/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("MVC4FormsAuth.Web")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("MVC4FormsAuth")]
13 | [assembly: AssemblyCopyright("Copyright © 2012")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("1ed8e8a9-b9b1-41e0-8697-acd12a8206f5")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Revision and Build Numbers
33 | // by using the '*' as shown below:
34 | [assembly: AssemblyVersion("1.0.0.0")]
35 | [assembly: AssemblyFileVersion("1.0.0.0")]
36 |
--------------------------------------------------------------------------------
/MVC4FormsAuth.Web/Providers/MyMembershipProvider.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Web;
5 | using System.Web.Security;
6 | using MVC4FormsAuth.Types;
7 | using MVC4FormsAuth.Managers;
8 |
9 | namespace MVC4FormsAuth.Web.Providers
10 | {
11 | public class MyMembershipProvider : MembershipProvider
12 | {
13 | #region Not Used
14 |
15 | public override string ApplicationName
16 | {
17 | get
18 | {
19 | throw new NotImplementedException();
20 | }
21 | set
22 | {
23 | throw new NotImplementedException();
24 | }
25 | }
26 |
27 | public override bool ChangePassword(string username, string oldPassword, string newPassword)
28 | {
29 | throw new NotImplementedException();
30 | }
31 |
32 | public override bool ChangePasswordQuestionAndAnswer(string username, string password, string newPasswordQuestion, string newPasswordAnswer)
33 | {
34 | throw new NotImplementedException();
35 | }
36 |
37 | public override MembershipUser CreateUser(string username, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved, object providerUserKey, out MembershipCreateStatus status)
38 | {
39 | throw new NotImplementedException();
40 | }
41 |
42 | public override bool DeleteUser(string username, bool deleteAllRelatedData)
43 | {
44 | throw new NotImplementedException();
45 | }
46 |
47 | public override bool EnablePasswordReset
48 | {
49 | get { throw new NotImplementedException(); }
50 | }
51 |
52 | public override bool EnablePasswordRetrieval
53 | {
54 | get { throw new NotImplementedException(); }
55 | }
56 |
57 | public override MembershipUserCollection FindUsersByEmail(string emailToMatch, int pageIndex, int pageSize, out int totalRecords)
58 | {
59 | throw new NotImplementedException();
60 | }
61 |
62 | public override MembershipUserCollection FindUsersByName(string usernameToMatch, int pageIndex, int pageSize, out int totalRecords)
63 | {
64 | throw new NotImplementedException();
65 | }
66 |
67 | public override MembershipUserCollection GetAllUsers(int pageIndex, int pageSize, out int totalRecords)
68 | {
69 | throw new NotImplementedException();
70 | }
71 |
72 | public override int GetNumberOfUsersOnline()
73 | {
74 | throw new NotImplementedException();
75 | }
76 |
77 | public override string GetPassword(string username, string answer)
78 | {
79 | throw new NotImplementedException();
80 | }
81 |
82 | public override string GetUserNameByEmail(string email)
83 | {
84 | throw new NotImplementedException();
85 | }
86 |
87 | public override int MaxInvalidPasswordAttempts
88 | {
89 | get { throw new NotImplementedException(); }
90 | }
91 |
92 | public override int MinRequiredNonAlphanumericCharacters
93 | {
94 | get { throw new NotImplementedException(); }
95 | }
96 |
97 | public override int MinRequiredPasswordLength
98 | {
99 | get { throw new NotImplementedException(); }
100 | }
101 |
102 | public override int PasswordAttemptWindow
103 | {
104 | get { throw new NotImplementedException(); }
105 | }
106 |
107 | public override MembershipPasswordFormat PasswordFormat
108 | {
109 | get { throw new NotImplementedException(); }
110 | }
111 |
112 | public override string PasswordStrengthRegularExpression
113 | {
114 | get { throw new NotImplementedException(); }
115 | }
116 |
117 | public override bool RequiresQuestionAndAnswer
118 | {
119 | get { throw new NotImplementedException(); }
120 | }
121 |
122 | public override bool RequiresUniqueEmail
123 | {
124 | get { throw new NotImplementedException(); }
125 | }
126 |
127 | public override string ResetPassword(string username, string answer)
128 | {
129 | throw new NotImplementedException();
130 | }
131 |
132 | public override bool UnlockUser(string userName)
133 | {
134 | throw new NotImplementedException();
135 | }
136 |
137 | public override void UpdateUser(MembershipUser user)
138 | {
139 | throw new NotImplementedException();
140 | }
141 |
142 | public override MembershipUser GetUser(object providerUserKey, bool userIsOnline)
143 | {
144 | throw new NotImplementedException();
145 | /*string[] parts = providerUserKey.ToString().Split(new char[] { '_' });
146 | if (parts.Length == 2)
147 | {
148 | string username = parts[0];
149 | long userId;
150 | if (Int64.TryParse(parts[1], out userId))
151 | {
152 | User user = UserClient.Load(username, userId);
153 | if (user.UserDataUserId > 0)
154 | {
155 | return new MembershipUser("APMembershipProvider", user.UserDataLoginName, UserManager.User.UserDataUserId, UserManager.User.UserDataLoginName, null, null, true, false, DateTime.MinValue, DateTime.MinValue, DateTime.MinValue, DateTime.MinValue, DateTime.MinValue);
156 | }
157 | }
158 | }
159 |
160 | return null;*/
161 | }
162 |
163 | #endregion
164 |
165 | ///
166 | /// Authenticates the user.
167 | ///
168 | ///Username
169 | ///Password
170 | /// bool
171 | public override bool ValidateUser(string username, string password)
172 | {
173 | // Check if this is a valid user.
174 | User user = UserManager.AuthenticateUser(username, password);
175 | if (user != null)
176 | {
177 | // Store the user temporarily in the context for this request.
178 | HttpContext.Current.Items.Add("User", user);
179 |
180 | return true;
181 | }
182 | else
183 | {
184 | return false;
185 | }
186 | }
187 |
188 | ///
189 | /// Retrieves the user details for a particular user.
190 | ///
191 | ///User to retrieve user details for
192 | ///
193 | /// MembershipUser
194 | public override MembershipUser GetUser(string username, bool userIsOnline)
195 | {
196 | if (UserManager.User != null)
197 | {
198 | return new MembershipUser("MyMembershipProvider", username, UserManager.User.Id, UserManager.User.Username, null, null, true, false, DateTime.MinValue, DateTime.MinValue, DateTime.MinValue, DateTime.MinValue, DateTime.MinValue);
199 | }
200 | else
201 | {
202 | return null;
203 | }
204 | }
205 | }
206 | }
--------------------------------------------------------------------------------
/MVC4FormsAuth.Web/Styles/style.css:
--------------------------------------------------------------------------------
1 | label
2 | {
3 | font-family: Verdana;
4 | font-size: 10pt;
5 | }
6 |
7 | /* Styles for validation helpers */
8 | .field-validation-error
9 | {
10 | font: normal 12px Verdana;
11 | color: #ff0000;
12 | }
13 |
14 | .field-validation-valid
15 | {
16 | display: none;
17 | }
18 |
19 | .input-validation-error
20 | {
21 | border: 1px solid #ff0000;
22 | background-color: #ffeeee;
23 | }
24 |
25 | .validation-summary-valid
26 | {
27 | display: none;
28 | }
29 |
30 | .validation-summary-errors {
31 | background-color: #ffffff;
32 | font-size: 12pt;
33 | }
34 |
35 | div.validation-summary-errors {
36 | display:block;
37 | }
38 |
39 | ul.validation-summary-errors {
40 | margin:0;
41 | padding:0;
42 | border-top:none;
43 | }
--------------------------------------------------------------------------------
/MVC4FormsAuth.Web/Views/Home/Index.cshtml:
--------------------------------------------------------------------------------
1 | @using MVC4FormsAuth.Managers
2 | @using MVC4FormsAuth.Types.Models
3 |
4 | @{
5 | Layout = "~/views/shared/layouts/default.cshtml";
6 | ViewBag.Title = "Index";
7 | }
8 |
9 |
Index
10 |
11 | @if (User.Identity.IsAuthenticated)
12 | {
13 |
14 | You're logged in as @UserManager.User.Username (@UserManager.User.Age)
15 |
16 | }
17 | else
18 | {
19 | @Html.Partial("Controls/Login", new Logon());
20 | }
--------------------------------------------------------------------------------
/MVC4FormsAuth.Web/Views/Shared/Controls/Login.cshtml:
--------------------------------------------------------------------------------
1 | @using MVC4FormsAuth.Types.Models
2 |
3 | @model Logon
4 |
5 | @{ Html.EnableClientValidation(); }
6 |
7 |
29 |
30 | @using (Html.BeginForm("Index", "Login", FormMethod.Post, new { id = "loginForm" }))
31 | {
32 | @Html.HiddenFor(u => u.RedirectUrl, new { value = Model.RedirectUrl })
33 |
34 |
35 |
36 | @Html.LabelFor(u => u.Username)
37 | @Html.TextBoxFor(u => u.Username, new { id = "userid", @class = "inptFld" })
38 |
39 | @Html.LabelFor(u => u.Password)
40 | @Html.PasswordFor(u => u.Password, new { id = "passowdid", @class = "inptFld" })
41 |
42 |
43 | }
--------------------------------------------------------------------------------
/MVC4FormsAuth.Web/Views/Shared/Layouts/default.cshtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | MVC4FormsAuth | @ViewBag.Title
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | @RenderBody()
16 |
17 |
--------------------------------------------------------------------------------
/MVC4FormsAuth.Web/Views/Web.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
39 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/MVC4FormsAuth.Web/Web.Debug.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
17 |
18 |
29 |
30 |
--------------------------------------------------------------------------------
/MVC4FormsAuth.Web/Web.Release.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
17 |
18 |
19 |
30 |
31 |
--------------------------------------------------------------------------------
/MVC4FormsAuth.Web/Web.config:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/MVC4FormsAuth.Web/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/MVC4FormsAuth.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2012
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVC4FormsAuth.Web", "MVC4FormsAuth.Web\MVC4FormsAuth.Web.csproj", "{A2DF5106-0324-43B2-8A3C-2535BDA02DE3}"
5 | EndProject
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVC4FormsAuth.Types", "MVC4FormsAuth.Types\MVC4FormsAuth.Types.csproj", "{641BCC91-CD11-434C-9FD3-C5882F61DEED}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVC4FormsAuth.Managers", "MVC4FormsAuth.Managers\MVC4FormsAuth.Managers.csproj", "{5D715937-4A4C-4EB2-9AF5-559F0E32E388}"
9 | EndProject
10 | Global
11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
12 | Debug|Any CPU = Debug|Any CPU
13 | Release|Any CPU = Release|Any CPU
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {A2DF5106-0324-43B2-8A3C-2535BDA02DE3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
17 | {A2DF5106-0324-43B2-8A3C-2535BDA02DE3}.Debug|Any CPU.Build.0 = Debug|Any CPU
18 | {A2DF5106-0324-43B2-8A3C-2535BDA02DE3}.Release|Any CPU.ActiveCfg = Release|Any CPU
19 | {A2DF5106-0324-43B2-8A3C-2535BDA02DE3}.Release|Any CPU.Build.0 = Release|Any CPU
20 | {641BCC91-CD11-434C-9FD3-C5882F61DEED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21 | {641BCC91-CD11-434C-9FD3-C5882F61DEED}.Debug|Any CPU.Build.0 = Debug|Any CPU
22 | {641BCC91-CD11-434C-9FD3-C5882F61DEED}.Release|Any CPU.ActiveCfg = Release|Any CPU
23 | {641BCC91-CD11-434C-9FD3-C5882F61DEED}.Release|Any CPU.Build.0 = Release|Any CPU
24 | {5D715937-4A4C-4EB2-9AF5-559F0E32E388}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
25 | {5D715937-4A4C-4EB2-9AF5-559F0E32E388}.Debug|Any CPU.Build.0 = Debug|Any CPU
26 | {5D715937-4A4C-4EB2-9AF5-559F0E32E388}.Release|Any CPU.ActiveCfg = Release|Any CPU
27 | {5D715937-4A4C-4EB2-9AF5-559F0E32E388}.Release|Any CPU.Build.0 = Release|Any CPU
28 | EndGlobalSection
29 | GlobalSection(SolutionProperties) = preSolution
30 | HideSolutionNode = FALSE
31 | EndGlobalSection
32 | EndGlobal
33 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | MVC4 Forms Authentication Example
2 | ===================
3 | http://primaryobjects.com/CMS/Article147.aspx
4 |
5 | A basic example of using MVC4 forms authentication with a custom membership provider and custom principal.
6 |
7 | Upon logging in, user data is stored in the encrypted forms auth cookie. This allows you to have global access to the user profile data, without having to retrieve it from the database upon each request.
8 |
9 | Copyright � 2012 Kory Becker (http://www.primaryobjects.com)
10 |
11 | Permission is hereby granted, free of charge, to any person obtaining
12 | a copy of this software and associated documentation files (the
13 | "Software"), to deal in the Software without restriction, including
14 | without limitation the rights to use, copy, modify, merge, publish,
15 | distribute, sublicense, and/or sell copies of the Software, and to
16 | permit persons to whom the Software is furnished to do so, subject to
17 | the following conditions:
18 |
19 | The above copyright notice and this permission notice shall be
20 | included in all copies or substantial portions of the Software.
21 |
22 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
24 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
25 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
26 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
27 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
28 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
/packages/Microsoft.AspNet.Mvc.4.0.20710.0/Microsoft.AspNet.Mvc.4.0.20710.0.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/primaryobjects/MVC4FormsAuthentication/e7e0c6686a7dc36fc10289b49083fb9dca4643f3/packages/Microsoft.AspNet.Mvc.4.0.20710.0/Microsoft.AspNet.Mvc.4.0.20710.0.nupkg
--------------------------------------------------------------------------------
/packages/Microsoft.AspNet.Razor.2.0.20710.0/Microsoft.AspNet.Razor.2.0.20710.0.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/primaryobjects/MVC4FormsAuthentication/e7e0c6686a7dc36fc10289b49083fb9dca4643f3/packages/Microsoft.AspNet.Razor.2.0.20710.0/Microsoft.AspNet.Razor.2.0.20710.0.nupkg
--------------------------------------------------------------------------------
/packages/Microsoft.AspNet.WebApi.4.0.20710.0/Microsoft.AspNet.WebApi.4.0.20710.0.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/primaryobjects/MVC4FormsAuthentication/e7e0c6686a7dc36fc10289b49083fb9dca4643f3/packages/Microsoft.AspNet.WebApi.4.0.20710.0/Microsoft.AspNet.WebApi.4.0.20710.0.nupkg
--------------------------------------------------------------------------------
/packages/Microsoft.AspNet.WebApi.Client.4.0.20710.0/Microsoft.AspNet.WebApi.Client.4.0.20710.0.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/primaryobjects/MVC4FormsAuthentication/e7e0c6686a7dc36fc10289b49083fb9dca4643f3/packages/Microsoft.AspNet.WebApi.Client.4.0.20710.0/Microsoft.AspNet.WebApi.Client.4.0.20710.0.nupkg
--------------------------------------------------------------------------------
/packages/Microsoft.AspNet.WebApi.Core.4.0.20710.0/Microsoft.AspNet.WebApi.Core.4.0.20710.0.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/primaryobjects/MVC4FormsAuthentication/e7e0c6686a7dc36fc10289b49083fb9dca4643f3/packages/Microsoft.AspNet.WebApi.Core.4.0.20710.0/Microsoft.AspNet.WebApi.Core.4.0.20710.0.nupkg
--------------------------------------------------------------------------------
/packages/Microsoft.AspNet.WebApi.Core.4.0.20710.0/content/web.config.transform:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/packages/Microsoft.AspNet.WebApi.WebHost.4.0.20710.0/Microsoft.AspNet.WebApi.WebHost.4.0.20710.0.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/primaryobjects/MVC4FormsAuthentication/e7e0c6686a7dc36fc10289b49083fb9dca4643f3/packages/Microsoft.AspNet.WebApi.WebHost.4.0.20710.0/Microsoft.AspNet.WebApi.WebHost.4.0.20710.0.nupkg
--------------------------------------------------------------------------------
/packages/Microsoft.AspNet.WebPages.2.0.20710.0/Microsoft.AspNet.WebPages.2.0.20710.0.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/primaryobjects/MVC4FormsAuthentication/e7e0c6686a7dc36fc10289b49083fb9dca4643f3/packages/Microsoft.AspNet.WebPages.2.0.20710.0/Microsoft.AspNet.WebPages.2.0.20710.0.nupkg
--------------------------------------------------------------------------------
/packages/Microsoft.Net.Http.2.0.20710.0/Microsoft.Net.Http.2.0.20710.0.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/primaryobjects/MVC4FormsAuthentication/e7e0c6686a7dc36fc10289b49083fb9dca4643f3/packages/Microsoft.Net.Http.2.0.20710.0/Microsoft.Net.Http.2.0.20710.0.nupkg
--------------------------------------------------------------------------------
/packages/Microsoft.Net.Http.2.0.20710.0/lib/net45/_._:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/Microsoft.Web.Infrastructure.1.0.0.0/Microsoft.Web.Infrastructure.1.0.0.0.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/primaryobjects/MVC4FormsAuthentication/e7e0c6686a7dc36fc10289b49083fb9dca4643f3/packages/Microsoft.Web.Infrastructure.1.0.0.0/Microsoft.Web.Infrastructure.1.0.0.0.nupkg
--------------------------------------------------------------------------------
/packages/Newtonsoft.Json.4.5.6/Newtonsoft.Json.4.5.6.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/primaryobjects/MVC4FormsAuthentication/e7e0c6686a7dc36fc10289b49083fb9dca4643f3/packages/Newtonsoft.Json.4.5.6/Newtonsoft.Json.4.5.6.nupkg
--------------------------------------------------------------------------------
/packages/repositories.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------