├── .gitignore ├── Users ├── obj │ ├── Debug │ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs │ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs │ │ ├── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs │ │ ├── Users.dll │ │ ├── Users.pdb │ │ ├── Users.csproj.GenerateResource.Cache │ │ ├── DesignTimeResolveAssemblyReferences.cache │ │ ├── Users.csprojResolveAssemblyReference.cache │ │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ │ └── Users.Migrations.AddCountryProperty.resources │ └── Release │ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs │ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs │ │ ├── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs │ │ ├── Package │ │ ├── PackageTmp │ │ │ ├── Views │ │ │ │ ├── _ViewStart.cshtml │ │ │ │ ├── Role │ │ │ │ │ ├── Create.cshtml │ │ │ │ │ ├── Index.cshtml │ │ │ │ │ └── Edit.cshtml │ │ │ │ ├── Home │ │ │ │ │ └── Index.cshtml │ │ │ │ ├── Shared │ │ │ │ │ ├── Error.cshtml │ │ │ │ │ └── _Layout.cshtml │ │ │ │ ├── Admin │ │ │ │ │ ├── Create.cshtml │ │ │ │ │ ├── Edit.cshtml │ │ │ │ │ └── Index.cshtml │ │ │ │ ├── Account │ │ │ │ │ └── Login.cshtml │ │ │ │ └── web.config │ │ │ ├── Global.asax │ │ │ ├── bin │ │ │ │ ├── Owin.dll │ │ │ │ ├── Users.dll │ │ │ │ ├── Microsoft.Owin.dll │ │ │ │ ├── System.Web.Mvc.dll │ │ │ │ ├── EntityFramework.dll │ │ │ │ ├── Newtonsoft.Json.dll │ │ │ │ ├── System.Web.Razor.dll │ │ │ │ ├── System.Web.Helpers.dll │ │ │ │ ├── System.Web.WebPages.dll │ │ │ │ ├── Microsoft.Owin.Security.dll │ │ │ │ ├── EntityFramework.SqlServer.dll │ │ │ │ ├── System.Web.WebPages.Razor.dll │ │ │ │ ├── Microsoft.Owin.Host.SystemWeb.dll │ │ │ │ ├── Microsoft.Owin.Security.OAuth.dll │ │ │ │ ├── Microsoft.Web.Infrastructure.dll │ │ │ │ ├── Microsoft.AspNet.Identity.Core.dll │ │ │ │ ├── Microsoft.AspNet.Identity.Owin.dll │ │ │ │ ├── Microsoft.Owin.Security.Cookies.dll │ │ │ │ ├── System.Web.WebPages.Deployment.dll │ │ │ │ └── Microsoft.AspNet.Identity.EntityFramework.dll │ │ │ ├── fonts │ │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ │ └── glyphicons-halflings-regular.woff2 │ │ │ ├── packages.config │ │ │ ├── Web.config │ │ │ └── Scripts │ │ │ │ └── jquery.validate.unobtrusive.min.js │ │ └── Users.SourceManifest.xml │ │ ├── Users.dll │ │ ├── Users.pdb │ │ ├── _WPPLastBuildInfo.txt │ │ ├── Users.csprojResolveAssemblyReference.cache │ │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ │ ├── CSAutoParameterize.parameters.xml │ │ ├── TransformWebConfig │ │ ├── assist │ │ │ └── Web.config │ │ ├── transformed │ │ │ └── Web.config │ │ └── original │ │ │ └── Web.config │ │ └── CSAutoParameterize │ │ ├── original │ │ ├── Views │ │ │ └── web.config │ │ └── Web.config │ │ └── transformed │ │ ├── Views │ │ └── web.config │ │ └── Web.config ├── Views │ ├── _ViewStart.cshtml │ ├── Role │ │ ├── Create.cshtml │ │ ├── Index.cshtml │ │ └── Edit.cshtml │ ├── Home │ │ ├── Index.cshtml │ │ └── UserProps.cshtml │ ├── Shared │ │ ├── Error.cshtml │ │ └── _Layout.cshtml │ ├── Admin │ │ ├── Create.cshtml │ │ ├── Edit.cshtml │ │ └── Index.cshtml │ ├── Claims │ │ └── Index.cshtml │ ├── Account │ │ └── Login.cshtml │ └── web.config ├── bin │ ├── Owin.dll │ ├── Users.dll │ ├── Users.pdb │ ├── EntityFramework.dll │ ├── Microsoft.Owin.dll │ ├── Newtonsoft.Json.dll │ ├── System.Web.Mvc.dll │ ├── System.Web.Helpers.dll │ ├── System.Web.Razor.dll │ ├── System.Web.Webpages.dll │ ├── Microsoft.Owin.Security.dll │ ├── EntityFramework.SqlServer.dll │ ├── System.Web.Webpages.Razor.dll │ ├── Microsoft.Web.Infrastructure.dll │ ├── Microsoft.AspNet.Identity.Core.dll │ ├── Microsoft.AspNet.Identity.Owin.dll │ ├── Microsoft.Owin.Host.SystemWeb.dll │ ├── Microsoft.Owin.Security.OAuth.dll │ ├── System.Web.Webpages.Deployment.dll │ ├── Microsoft.Owin.Security.Cookies.dll │ ├── Microsoft.AspNet.Identity.EntityFramework.dll │ ├── Users.dll.config │ └── System.Web.Webpages.Deployment.xml ├── Global.asax ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.ttf │ ├── glyphicons-halflings-regular.woff │ └── glyphicons-halflings-regular.woff2 ├── Models │ ├── RoleModificationModel.cs │ ├── RoleEditModel.cs │ ├── AppRole.cs │ ├── LoginModel.cs │ ├── UserViewModels.cs │ └── AppUser.cs ├── Global.asax.cs ├── App_Start │ ├── RouteConfig.cs │ └── IdentityConfig.cs ├── Migrations │ ├── 201509140936514_AddCountryProperty.cs │ ├── 201509140936514_AddCountryProperty.Designer.cs │ └── Configuration.cs ├── Infrastructure │ ├── CustomPasswordValidator.cs │ ├── AppRoleManager.cs │ ├── AppIdentityDbContext.cs │ ├── ClaimsRoles.cs │ ├── ClaimsAccessAttribute.cs │ ├── CustomUserValidator.cs │ ├── LocationClaimsProvider.cs │ ├── IdentityHelper.cs │ └── AppUserManager.cs ├── Controllers │ ├── ClaimsController.cs │ ├── HomeController.cs │ ├── AccountController.cs │ ├── AdminController.cs │ └── RoleController.cs ├── Properties │ ├── PublishProfiles │ │ ├── myusermanagement - FTP.pubxml │ │ ├── myusermanagement - FTP (2).pubxml │ │ ├── myusermanagement - Web Deploy (2).pubxml │ │ └── myusermanagement - Web Deploy.pubxml │ └── AssemblyInfo.cs ├── Web.Debug.config ├── Web.Release.config ├── packages.config ├── Users.csproj.user ├── Web.config └── Scripts │ └── jquery.validate.unobtrusive.min.js ├── Users.v12.suo ├── .vs └── Users │ └── v14 │ └── .suo ├── README.md ├── packages ├── Owin.1.0 │ ├── Owin.1.0.nupkg │ └── lib │ │ └── net40 │ │ └── Owin.dll ├── jQuery.2.1.4 │ ├── jQuery.2.1.4.nupkg │ └── Tools │ │ ├── install.ps1 │ │ ├── uninstall.ps1 │ │ └── common.ps1 ├── repositories.config ├── bootstrap.3.3.5 │ ├── bootstrap.3.3.5.nupkg │ └── content │ │ └── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 ├── EntityFramework.6.1.3 │ ├── tools │ │ ├── migrate.exe │ │ ├── EntityFramework.psd1 │ │ ├── EntityFramework.PowerShell.dll │ │ ├── EntityFramework.PowerShell.Utility.dll │ │ └── about_EntityFramework.help.txt │ ├── EntityFramework.6.1.3.nupkg │ ├── lib │ │ ├── net40 │ │ │ ├── EntityFramework.dll │ │ │ └── EntityFramework.SqlServer.dll │ │ └── net45 │ │ │ ├── EntityFramework.dll │ │ │ └── EntityFramework.SqlServer.dll │ └── content │ │ ├── App.config.transform │ │ └── Web.config.transform ├── Microsoft.Net.Compilers.1.0.0 │ └── tools │ │ ├── csc.exe │ │ └── vbc.exe ├── Microsoft.Owin.3.0.1 │ ├── Microsoft.Owin.3.0.1.nupkg │ └── lib │ │ └── net45 │ │ └── Microsoft.Owin.dll ├── Newtonsoft.Json.7.0.1 │ ├── Newtonsoft.Json.7.0.1.nupkg │ ├── lib │ │ ├── net20 │ │ │ └── Newtonsoft.Json.dll │ │ ├── net35 │ │ │ └── Newtonsoft.Json.dll │ │ ├── net40 │ │ │ └── Newtonsoft.Json.dll │ │ ├── net45 │ │ │ └── Newtonsoft.Json.dll │ │ ├── portable-net40+sl5+wp80+win8+wpa81 │ │ │ └── Newtonsoft.Json.dll │ │ └── portable-net45+wp80+win8+wpa81+dnxcore50 │ │ │ └── Newtonsoft.Json.dll │ └── tools │ │ └── install.ps1 ├── Microsoft.AspNet.Mvc.5.2.3 │ ├── lib │ │ └── net45 │ │ │ └── System.Web.Mvc.dll │ ├── Microsoft.AspNet.Mvc.5.2.3.nupkg │ └── Content │ │ ├── Web.config.uninstall.xdt │ │ └── Web.config.install.xdt ├── jQuery.Validation.1.14.0 │ └── jQuery.Validation.1.14.0.nupkg ├── Microsoft.AspNet.Razor.3.2.3 │ ├── lib │ │ └── net45 │ │ │ └── System.Web.Razor.dll │ └── Microsoft.AspNet.Razor.3.2.3.nupkg ├── Microsoft.AspNet.WebPages.3.2.3 │ ├── lib │ │ └── net45 │ │ │ ├── System.Web.Helpers.dll │ │ │ ├── System.Web.WebPages.dll │ │ │ ├── System.Web.WebPages.Razor.dll │ │ │ ├── System.Web.WebPages.Deployment.dll │ │ │ └── System.Web.WebPages.Deployment.xml │ ├── Microsoft.AspNet.WebPages.3.2.3.nupkg │ └── Content │ │ ├── Web.config.uninstall.xdt │ │ └── Web.config.install.xdt ├── Microsoft.Owin.Security.3.0.1 │ ├── Microsoft.Owin.Security.3.0.1.nupkg │ └── lib │ │ └── net45 │ │ └── Microsoft.Owin.Security.dll ├── Microsoft.Owin.Host.SystemWeb.3.0.1 │ ├── Microsoft.Owin.Host.SystemWeb.3.0.1.nupkg │ └── lib │ │ └── net45 │ │ └── Microsoft.Owin.Host.SystemWeb.dll ├── Microsoft.Owin.Security.OAuth.3.0.1 │ ├── Microsoft.Owin.Security.OAuth.3.0.1.nupkg │ └── lib │ │ └── net45 │ │ └── Microsoft.Owin.Security.OAuth.dll ├── Microsoft.AspNet.Identity.Core.2.2.1 │ ├── Microsoft.AspNet.Identity.Core.2.2.1.nupkg │ └── lib │ │ └── net45 │ │ └── Microsoft.AspNet.Identity.Core.dll ├── Microsoft.AspNet.Identity.Owin.2.2.1 │ ├── Microsoft.AspNet.Identity.Owin.2.2.1.nupkg │ └── lib │ │ └── net45 │ │ └── Microsoft.AspNet.Identity.Owin.dll ├── Microsoft.Web.Infrastructure.1.0.0.0 │ ├── Microsoft.Web.Infrastructure.1.0.0.0.nupkg │ └── lib │ │ └── net40 │ │ └── Microsoft.Web.Infrastructure.dll ├── Microsoft.Owin.Security.Cookies.3.0.1 │ ├── Microsoft.Owin.Security.Cookies.3.0.1.nupkg │ └── lib │ │ └── net45 │ │ └── Microsoft.Owin.Security.Cookies.dll ├── Microsoft.jQuery.Unobtrusive.Validation.3.2.3 │ ├── Microsoft.jQuery.Unobtrusive.Validation.3.2.3.nupkg │ └── Content │ │ └── Scripts │ │ └── jquery.validate.unobtrusive.min.js └── Microsoft.AspNet.Identity.EntityFramework.2.2.1 │ ├── Microsoft.AspNet.Identity.EntityFramework.2.2.1.nupkg │ └── lib │ └── net45 │ └── Microsoft.AspNet.Identity.EntityFramework.dll └── Users.sln /.gitignore: -------------------------------------------------------------------------------- 1 | *.pubxml 2 | *.user -------------------------------------------------------------------------------- /Users/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Users/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Users/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Users/obj/Release/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Users/obj/Release/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Users/obj/Release/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Users/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "~/Views/Shared/_Layout.cshtml"; 3 | } -------------------------------------------------------------------------------- /Users.v12.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users.v12.suo -------------------------------------------------------------------------------- /.vs/Users/v14/.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/.vs/Users/v14/.suo -------------------------------------------------------------------------------- /Users/bin/Owin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/bin/Owin.dll -------------------------------------------------------------------------------- /Users/bin/Users.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/bin/Users.dll -------------------------------------------------------------------------------- /Users/bin/Users.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/bin/Users.pdb -------------------------------------------------------------------------------- /Users/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="Users.MvcApplication" Language="C#" %> 2 | -------------------------------------------------------------------------------- /Users/obj/Release/Package/PackageTmp/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "~/Views/Shared/_Layout.cshtml"; 3 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 关于 ASP.NET Identity 的建立和使用,包括基础类的搭建和用户管理功能的实现 2 | 3 | [点此进行预览](http://myusermanagement.azurewebsites.net) 4 | 5 | -------------------------------------------------------------------------------- /Users/obj/Debug/Users.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/obj/Debug/Users.dll -------------------------------------------------------------------------------- /Users/obj/Debug/Users.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/obj/Debug/Users.pdb -------------------------------------------------------------------------------- /Users/obj/Release/Users.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/obj/Release/Users.dll -------------------------------------------------------------------------------- /Users/obj/Release/Users.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/obj/Release/Users.pdb -------------------------------------------------------------------------------- /Users/bin/EntityFramework.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/bin/EntityFramework.dll -------------------------------------------------------------------------------- /Users/bin/Microsoft.Owin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/bin/Microsoft.Owin.dll -------------------------------------------------------------------------------- /Users/bin/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/bin/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /Users/bin/System.Web.Mvc.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/bin/System.Web.Mvc.dll -------------------------------------------------------------------------------- /Users/bin/System.Web.Helpers.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/bin/System.Web.Helpers.dll -------------------------------------------------------------------------------- /Users/bin/System.Web.Razor.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/bin/System.Web.Razor.dll -------------------------------------------------------------------------------- /packages/Owin.1.0/Owin.1.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/packages/Owin.1.0/Owin.1.0.nupkg -------------------------------------------------------------------------------- /Users/bin/System.Web.Webpages.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/bin/System.Web.Webpages.dll -------------------------------------------------------------------------------- /Users/bin/Microsoft.Owin.Security.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/bin/Microsoft.Owin.Security.dll -------------------------------------------------------------------------------- /Users/obj/Release/Package/PackageTmp/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="Users.MvcApplication" Language="C#" %> 2 | -------------------------------------------------------------------------------- /packages/Owin.1.0/lib/net40/Owin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/packages/Owin.1.0/lib/net40/Owin.dll -------------------------------------------------------------------------------- /Users/bin/EntityFramework.SqlServer.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/bin/EntityFramework.SqlServer.dll -------------------------------------------------------------------------------- /Users/bin/System.Web.Webpages.Razor.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/bin/System.Web.Webpages.Razor.dll -------------------------------------------------------------------------------- /Users/obj/Release/_WPPLastBuildInfo.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/obj/Release/_WPPLastBuildInfo.txt -------------------------------------------------------------------------------- /Users/bin/Microsoft.Web.Infrastructure.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/bin/Microsoft.Web.Infrastructure.dll -------------------------------------------------------------------------------- /packages/jQuery.2.1.4/jQuery.2.1.4.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/packages/jQuery.2.1.4/jQuery.2.1.4.nupkg -------------------------------------------------------------------------------- /packages/repositories.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Users/bin/Microsoft.AspNet.Identity.Core.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/bin/Microsoft.AspNet.Identity.Core.dll -------------------------------------------------------------------------------- /Users/bin/Microsoft.AspNet.Identity.Owin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/bin/Microsoft.AspNet.Identity.Owin.dll -------------------------------------------------------------------------------- /Users/bin/Microsoft.Owin.Host.SystemWeb.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/bin/Microsoft.Owin.Host.SystemWeb.dll -------------------------------------------------------------------------------- /Users/bin/Microsoft.Owin.Security.OAuth.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/bin/Microsoft.Owin.Security.OAuth.dll -------------------------------------------------------------------------------- /Users/bin/System.Web.Webpages.Deployment.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/bin/System.Web.Webpages.Deployment.dll -------------------------------------------------------------------------------- /Users/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /Users/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /Users/bin/Microsoft.Owin.Security.Cookies.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/bin/Microsoft.Owin.Security.Cookies.dll -------------------------------------------------------------------------------- /Users/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /Users/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /packages/bootstrap.3.3.5/bootstrap.3.3.5.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/packages/bootstrap.3.3.5/bootstrap.3.3.5.nupkg -------------------------------------------------------------------------------- /Users/obj/Release/Package/PackageTmp/bin/Owin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/obj/Release/Package/PackageTmp/bin/Owin.dll -------------------------------------------------------------------------------- /packages/EntityFramework.6.1.3/tools/migrate.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/packages/EntityFramework.6.1.3/tools/migrate.exe -------------------------------------------------------------------------------- /Users/obj/Debug/Users.csproj.GenerateResource.Cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/obj/Debug/Users.csproj.GenerateResource.Cache -------------------------------------------------------------------------------- /Users/obj/Release/Package/PackageTmp/bin/Users.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/obj/Release/Package/PackageTmp/bin/Users.dll -------------------------------------------------------------------------------- /packages/Microsoft.Net.Compilers.1.0.0/tools/csc.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/packages/Microsoft.Net.Compilers.1.0.0/tools/csc.exe -------------------------------------------------------------------------------- /packages/Microsoft.Net.Compilers.1.0.0/tools/vbc.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/packages/Microsoft.Net.Compilers.1.0.0/tools/vbc.exe -------------------------------------------------------------------------------- /Users/bin/Microsoft.AspNet.Identity.EntityFramework.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/bin/Microsoft.AspNet.Identity.EntityFramework.dll -------------------------------------------------------------------------------- /Users/obj/Debug/DesignTimeResolveAssemblyReferences.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/obj/Debug/DesignTimeResolveAssemblyReferences.cache -------------------------------------------------------------------------------- /packages/EntityFramework.6.1.3/tools/EntityFramework.psd1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/packages/EntityFramework.6.1.3/tools/EntityFramework.psd1 -------------------------------------------------------------------------------- /packages/Microsoft.Owin.3.0.1/Microsoft.Owin.3.0.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/packages/Microsoft.Owin.3.0.1/Microsoft.Owin.3.0.1.nupkg -------------------------------------------------------------------------------- /Users/obj/Debug/Users.csprojResolveAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/obj/Debug/Users.csprojResolveAssemblyReference.cache -------------------------------------------------------------------------------- /Users/obj/Release/Package/PackageTmp/bin/Microsoft.Owin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/obj/Release/Package/PackageTmp/bin/Microsoft.Owin.dll -------------------------------------------------------------------------------- /Users/obj/Release/Package/PackageTmp/bin/System.Web.Mvc.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/obj/Release/Package/PackageTmp/bin/System.Web.Mvc.dll -------------------------------------------------------------------------------- /packages/EntityFramework.6.1.3/EntityFramework.6.1.3.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/packages/EntityFramework.6.1.3/EntityFramework.6.1.3.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.Owin.3.0.1/lib/net45/Microsoft.Owin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/packages/Microsoft.Owin.3.0.1/lib/net45/Microsoft.Owin.dll -------------------------------------------------------------------------------- /packages/Newtonsoft.Json.7.0.1/Newtonsoft.Json.7.0.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/packages/Newtonsoft.Json.7.0.1/Newtonsoft.Json.7.0.1.nupkg -------------------------------------------------------------------------------- /Users/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /Users/obj/Debug/Users.Migrations.AddCountryProperty.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/obj/Debug/Users.Migrations.AddCountryProperty.resources -------------------------------------------------------------------------------- /Users/obj/Release/Package/PackageTmp/bin/EntityFramework.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/obj/Release/Package/PackageTmp/bin/EntityFramework.dll -------------------------------------------------------------------------------- /Users/obj/Release/Package/PackageTmp/bin/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/obj/Release/Package/PackageTmp/bin/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /Users/obj/Release/Package/PackageTmp/bin/System.Web.Razor.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/obj/Release/Package/PackageTmp/bin/System.Web.Razor.dll -------------------------------------------------------------------------------- /Users/obj/Release/Users.csprojResolveAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/obj/Release/Users.csprojResolveAssemblyReference.cache -------------------------------------------------------------------------------- /packages/EntityFramework.6.1.3/lib/net40/EntityFramework.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/packages/EntityFramework.6.1.3/lib/net40/EntityFramework.dll -------------------------------------------------------------------------------- /packages/EntityFramework.6.1.3/lib/net45/EntityFramework.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/packages/EntityFramework.6.1.3/lib/net45/EntityFramework.dll -------------------------------------------------------------------------------- /packages/Newtonsoft.Json.7.0.1/lib/net20/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/packages/Newtonsoft.Json.7.0.1/lib/net20/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /packages/Newtonsoft.Json.7.0.1/lib/net35/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/packages/Newtonsoft.Json.7.0.1/lib/net35/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /packages/Newtonsoft.Json.7.0.1/lib/net40/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/packages/Newtonsoft.Json.7.0.1/lib/net40/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /packages/Newtonsoft.Json.7.0.1/lib/net45/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/packages/Newtonsoft.Json.7.0.1/lib/net45/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /Users/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /Users/obj/Release/Package/PackageTmp/bin/System.Web.Helpers.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/obj/Release/Package/PackageTmp/bin/System.Web.Helpers.dll -------------------------------------------------------------------------------- /Users/obj/Release/Package/PackageTmp/bin/System.Web.WebPages.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/obj/Release/Package/PackageTmp/bin/System.Web.WebPages.dll -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Mvc.5.2.3/lib/net45/System.Web.Mvc.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/packages/Microsoft.AspNet.Mvc.5.2.3/lib/net45/System.Web.Mvc.dll -------------------------------------------------------------------------------- /packages/jQuery.Validation.1.14.0/jQuery.Validation.1.14.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/packages/jQuery.Validation.1.14.0/jQuery.Validation.1.14.0.nupkg -------------------------------------------------------------------------------- /packages/EntityFramework.6.1.3/tools/EntityFramework.PowerShell.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/packages/EntityFramework.6.1.3/tools/EntityFramework.PowerShell.dll -------------------------------------------------------------------------------- /Users/obj/Release/Package/PackageTmp/bin/Microsoft.Owin.Security.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/obj/Release/Package/PackageTmp/bin/Microsoft.Owin.Security.dll -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Mvc.5.2.3/Microsoft.AspNet.Mvc.5.2.3.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/packages/Microsoft.AspNet.Mvc.5.2.3/Microsoft.AspNet.Mvc.5.2.3.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Razor.3.2.3/lib/net45/System.Web.Razor.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/packages/Microsoft.AspNet.Razor.3.2.3/lib/net45/System.Web.Razor.dll -------------------------------------------------------------------------------- /Users/obj/Release/Package/PackageTmp/bin/EntityFramework.SqlServer.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/obj/Release/Package/PackageTmp/bin/EntityFramework.SqlServer.dll -------------------------------------------------------------------------------- /Users/obj/Release/Package/PackageTmp/bin/System.Web.WebPages.Razor.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/obj/Release/Package/PackageTmp/bin/System.Web.WebPages.Razor.dll -------------------------------------------------------------------------------- /packages/EntityFramework.6.1.3/lib/net40/EntityFramework.SqlServer.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/packages/EntityFramework.6.1.3/lib/net40/EntityFramework.SqlServer.dll -------------------------------------------------------------------------------- /packages/EntityFramework.6.1.3/lib/net45/EntityFramework.SqlServer.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/packages/EntityFramework.6.1.3/lib/net45/EntityFramework.SqlServer.dll -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Razor.3.2.3/Microsoft.AspNet.Razor.3.2.3.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/packages/Microsoft.AspNet.Razor.3.2.3/Microsoft.AspNet.Razor.3.2.3.nupkg -------------------------------------------------------------------------------- /packages/bootstrap.3.3.5/content/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/packages/bootstrap.3.3.5/content/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /packages/bootstrap.3.3.5/content/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/packages/bootstrap.3.3.5/content/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /packages/bootstrap.3.3.5/content/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/packages/bootstrap.3.3.5/content/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /Users/obj/Release/Package/PackageTmp/bin/Microsoft.Owin.Host.SystemWeb.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/obj/Release/Package/PackageTmp/bin/Microsoft.Owin.Host.SystemWeb.dll -------------------------------------------------------------------------------- /Users/obj/Release/Package/PackageTmp/bin/Microsoft.Owin.Security.OAuth.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/obj/Release/Package/PackageTmp/bin/Microsoft.Owin.Security.OAuth.dll -------------------------------------------------------------------------------- /Users/obj/Release/Package/PackageTmp/bin/Microsoft.Web.Infrastructure.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/obj/Release/Package/PackageTmp/bin/Microsoft.Web.Infrastructure.dll -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebPages.3.2.3/lib/net45/System.Web.Helpers.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/packages/Microsoft.AspNet.WebPages.3.2.3/lib/net45/System.Web.Helpers.dll -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebPages.3.2.3/lib/net45/System.Web.WebPages.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/packages/Microsoft.AspNet.WebPages.3.2.3/lib/net45/System.Web.WebPages.dll -------------------------------------------------------------------------------- /packages/Microsoft.Owin.Security.3.0.1/Microsoft.Owin.Security.3.0.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/packages/Microsoft.Owin.Security.3.0.1/Microsoft.Owin.Security.3.0.1.nupkg -------------------------------------------------------------------------------- /packages/bootstrap.3.3.5/content/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/packages/bootstrap.3.3.5/content/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /Users/obj/Release/Package/PackageTmp/bin/Microsoft.AspNet.Identity.Core.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/obj/Release/Package/PackageTmp/bin/Microsoft.AspNet.Identity.Core.dll -------------------------------------------------------------------------------- /Users/obj/Release/Package/PackageTmp/bin/Microsoft.AspNet.Identity.Owin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/obj/Release/Package/PackageTmp/bin/Microsoft.AspNet.Identity.Owin.dll -------------------------------------------------------------------------------- /Users/obj/Release/Package/PackageTmp/bin/Microsoft.Owin.Security.Cookies.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/obj/Release/Package/PackageTmp/bin/Microsoft.Owin.Security.Cookies.dll -------------------------------------------------------------------------------- /Users/obj/Release/Package/PackageTmp/bin/System.Web.WebPages.Deployment.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/obj/Release/Package/PackageTmp/bin/System.Web.WebPages.Deployment.dll -------------------------------------------------------------------------------- /Users/obj/Release/Package/PackageTmp/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/obj/Release/Package/PackageTmp/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /Users/obj/Release/Package/PackageTmp/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/obj/Release/Package/PackageTmp/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /Users/obj/Release/Package/PackageTmp/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/obj/Release/Package/PackageTmp/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /Users/obj/Release/Package/PackageTmp/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/obj/Release/Package/PackageTmp/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /packages/EntityFramework.6.1.3/tools/EntityFramework.PowerShell.Utility.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/packages/EntityFramework.6.1.3/tools/EntityFramework.PowerShell.Utility.dll -------------------------------------------------------------------------------- /packages/Microsoft.Owin.Security.3.0.1/lib/net45/Microsoft.Owin.Security.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/packages/Microsoft.Owin.Security.3.0.1/lib/net45/Microsoft.Owin.Security.dll -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebPages.3.2.3/Microsoft.AspNet.WebPages.3.2.3.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/packages/Microsoft.AspNet.WebPages.3.2.3/Microsoft.AspNet.WebPages.3.2.3.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebPages.3.2.3/lib/net45/System.Web.WebPages.Razor.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/packages/Microsoft.AspNet.WebPages.3.2.3/lib/net45/System.Web.WebPages.Razor.dll -------------------------------------------------------------------------------- /Users/obj/Release/Package/PackageTmp/bin/Microsoft.AspNet.Identity.EntityFramework.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/Users/obj/Release/Package/PackageTmp/bin/Microsoft.AspNet.Identity.EntityFramework.dll -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebPages.3.2.3/lib/net45/System.Web.WebPages.Deployment.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/packages/Microsoft.AspNet.WebPages.3.2.3/lib/net45/System.Web.WebPages.Deployment.dll -------------------------------------------------------------------------------- /packages/Microsoft.Owin.Host.SystemWeb.3.0.1/Microsoft.Owin.Host.SystemWeb.3.0.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/packages/Microsoft.Owin.Host.SystemWeb.3.0.1/Microsoft.Owin.Host.SystemWeb.3.0.1.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.Owin.Security.OAuth.3.0.1/Microsoft.Owin.Security.OAuth.3.0.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/packages/Microsoft.Owin.Security.OAuth.3.0.1/Microsoft.Owin.Security.OAuth.3.0.1.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Identity.Core.2.2.1/Microsoft.AspNet.Identity.Core.2.2.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/packages/Microsoft.AspNet.Identity.Core.2.2.1/Microsoft.AspNet.Identity.Core.2.2.1.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Identity.Owin.2.2.1/Microsoft.AspNet.Identity.Owin.2.2.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/packages/Microsoft.AspNet.Identity.Owin.2.2.1/Microsoft.AspNet.Identity.Owin.2.2.1.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.Owin.Host.SystemWeb.3.0.1/lib/net45/Microsoft.Owin.Host.SystemWeb.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/packages/Microsoft.Owin.Host.SystemWeb.3.0.1/lib/net45/Microsoft.Owin.Host.SystemWeb.dll -------------------------------------------------------------------------------- /packages/Microsoft.Owin.Security.OAuth.3.0.1/lib/net45/Microsoft.Owin.Security.OAuth.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/packages/Microsoft.Owin.Security.OAuth.3.0.1/lib/net45/Microsoft.Owin.Security.OAuth.dll -------------------------------------------------------------------------------- /packages/Microsoft.Web.Infrastructure.1.0.0.0/Microsoft.Web.Infrastructure.1.0.0.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/packages/Microsoft.Web.Infrastructure.1.0.0.0/Microsoft.Web.Infrastructure.1.0.0.0.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.Web.Infrastructure.1.0.0.0/lib/net40/Microsoft.Web.Infrastructure.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/packages/Microsoft.Web.Infrastructure.1.0.0.0/lib/net40/Microsoft.Web.Infrastructure.dll -------------------------------------------------------------------------------- /packages/Newtonsoft.Json.7.0.1/lib/portable-net40+sl5+wp80+win8+wpa81/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/packages/Newtonsoft.Json.7.0.1/lib/portable-net40+sl5+wp80+win8+wpa81/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Identity.Core.2.2.1/lib/net45/Microsoft.AspNet.Identity.Core.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/packages/Microsoft.AspNet.Identity.Core.2.2.1/lib/net45/Microsoft.AspNet.Identity.Core.dll -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Identity.Owin.2.2.1/lib/net45/Microsoft.AspNet.Identity.Owin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/packages/Microsoft.AspNet.Identity.Owin.2.2.1/lib/net45/Microsoft.AspNet.Identity.Owin.dll -------------------------------------------------------------------------------- /packages/Microsoft.Owin.Security.Cookies.3.0.1/Microsoft.Owin.Security.Cookies.3.0.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/packages/Microsoft.Owin.Security.Cookies.3.0.1/Microsoft.Owin.Security.Cookies.3.0.1.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.Owin.Security.Cookies.3.0.1/lib/net45/Microsoft.Owin.Security.Cookies.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/packages/Microsoft.Owin.Security.Cookies.3.0.1/lib/net45/Microsoft.Owin.Security.Cookies.dll -------------------------------------------------------------------------------- /packages/Newtonsoft.Json.7.0.1/lib/portable-net45+wp80+win8+wpa81+dnxcore50/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/packages/Newtonsoft.Json.7.0.1/lib/portable-net45+wp80+win8+wpa81+dnxcore50/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /packages/EntityFramework.6.1.3/content/App.config.transform: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /packages/EntityFramework.6.1.3/content/Web.config.transform: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /packages/Microsoft.jQuery.Unobtrusive.Validation.3.2.3/Microsoft.jQuery.Unobtrusive.Validation.3.2.3.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/packages/Microsoft.jQuery.Unobtrusive.Validation.3.2.3/Microsoft.jQuery.Unobtrusive.Validation.3.2.3.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Identity.EntityFramework.2.2.1/Microsoft.AspNet.Identity.EntityFramework.2.2.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/packages/Microsoft.AspNet.Identity.EntityFramework.2.2.1/Microsoft.AspNet.Identity.EntityFramework.2.2.1.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Identity.EntityFramework.2.2.1/lib/net45/Microsoft.AspNet.Identity.EntityFramework.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MEyes/ASP.NET-Identity-User-Management/HEAD/packages/Microsoft.AspNet.Identity.EntityFramework.2.2.1/lib/net45/Microsoft.AspNet.Identity.EntityFramework.dll -------------------------------------------------------------------------------- /Users/Models/RoleModificationModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | 6 | namespace Users.Models 7 | { 8 | public class RoleModificationModel 9 | { 10 | public string RoleName { get; set; } 11 | public string[] IDsToAdd { get; set; } 12 | public string[] IDsToDelete { get; set; } 13 | } 14 | } -------------------------------------------------------------------------------- /Users/Models/RoleEditModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | 6 | namespace Users.Models 7 | { 8 | public class RoleEditModel 9 | { 10 | public AppRole Role { get; set; } 11 | public IEnumerable Members { get; set; } 12 | public IEnumerable NonMembers { get; set; } 13 | } 14 | } -------------------------------------------------------------------------------- /Users/Models/AppRole.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using Microsoft.AspNet.Identity.EntityFramework; 6 | 7 | namespace Users.Models 8 | { 9 | public class AppRole:IdentityRole 10 | { 11 | public AppRole() : base() { } 12 | public AppRole(string name) : base(name) { } 13 | // 在此添加额外属性 14 | } 15 | } -------------------------------------------------------------------------------- /Users/Models/LoginModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.DataAnnotations; 4 | using System.Linq; 5 | using System.Web; 6 | 7 | namespace Users.Models 8 | { 9 | public class LoginModel 10 | { 11 | [Required] 12 | public string Name { get; set; } 13 | 14 | [Required] 15 | public string Password { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /Users/Models/UserViewModels.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace Users.Models { 4 | 5 | /// 6 | /// 用户创建ViewModel 7 | /// 8 | public class UserViewModel 9 | { 10 | [Required] 11 | public string Name { get; set; } 12 | [Required] 13 | public string Email { get; set; } 14 | [Required] 15 | public string Password { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Users/Views/Role/Create.cshtml: -------------------------------------------------------------------------------- 1 | @model string 2 | @{ 3 | ViewBag.Title = "创建角色"; 4 | } 5 | 6 |

创建角色

7 | @Html.ValidationSummary(false) 8 | 9 | @using (Html.BeginForm()) 10 | { 11 |
12 | 13 | 14 |
15 | 16 | @Html.ActionLink("取消", "Index", null, new { @class = "btn btn-default" }) 17 | } -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Mvc.5.2.3/Content/Web.config.uninstall.xdt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Users/Views/Home/Index.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Index"; 3 | } 4 |
5 |
用户信息
6 | 7 | @foreach (string key in Model.Keys) 8 | { 9 | 10 | 11 | 12 | 13 | } 14 |
@key@Model[key]
15 |
16 | @Html.ActionLink("注销", "Logout", "Account", null, new { @class = "btn btn-primary" }) -------------------------------------------------------------------------------- /Users/Global.asax.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.Linq; 5 | using System.Web; 6 | using System.Web.Mvc; 7 | using System.Web.Routing; 8 | 9 | namespace Users 10 | { 11 | public class MvcApplication : System.Web.HttpApplication 12 | { 13 | protected void Application_Start() 14 | { 15 | AreaRegistration.RegisterAllAreas(); 16 | RouteConfig.RegisterRoutes(RouteTable.Routes); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Users/obj/Release/Package/Users.SourceManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Users/App_Start/RouteConfig.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Mvc; 2 | using System.Web.Routing; 3 | 4 | namespace Users 5 | { 6 | public class RouteConfig 7 | { 8 | public static void RegisterRoutes(RouteCollection routes) 9 | { 10 | routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); 11 | 12 | routes.MapRoute("Default", "{controller}/{action}/{id}", 13 | new {controller = "Home", action = "Index", id = UrlParameter.Optional} 14 | ); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Users/obj/Release/Package/PackageTmp/Views/Role/Create.cshtml: -------------------------------------------------------------------------------- 1 | @model string 2 | @{ 3 | ViewBag.Title = "创建角色"; 4 | } 5 | 6 |

创建角色

7 | @Html.ValidationSummary(false) 8 | 9 | @using (Html.BeginForm()) 10 | { 11 |
12 | 13 | 14 |
15 | 16 | @Html.ActionLink("取消", "Index", null, new { @class = "btn btn-default" }) 17 | } -------------------------------------------------------------------------------- /Users/obj/Release/Package/PackageTmp/Views/Home/Index.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Index"; 3 | } 4 |
5 |
用户信息
6 | 7 | @foreach (string key in Model.Keys) 8 | { 9 | 10 | 11 | 12 | 13 | } 14 |
@key@Model[key]
15 |
16 | @Html.ActionLink("注销", "Logout", "Account", null, new { @class = "btn btn-primary" }) -------------------------------------------------------------------------------- /Users/Views/Shared/Error.cshtml: -------------------------------------------------------------------------------- 1 | @model IEnumerable 2 | @{ ViewBag.Title = "Error";} 3 | 4 |
5 | @switch (Model.Count()) 6 | { 7 | case 0: 8 | @: 发生意外错误,请重试! 9 | break; 10 | case 1: 11 | @Model.First(); 12 | break; 13 | default: 14 | @: 出现了如下错误: 15 |
    16 | @foreach (string error in Model) 17 | { 18 |
  • @error
  • 19 | } 20 |
21 | break; 22 | } 23 |
24 | @Html.ActionLink("OK", "Index", null, new { @class = "btn btn-default" }) 25 | -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebPages.3.2.3/Content/Web.config.uninstall.xdt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 8 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /Users/Migrations/201509140936514_AddCountryProperty.cs: -------------------------------------------------------------------------------- 1 | namespace Users.Migrations 2 | { 3 | using System; 4 | using System.Data.Entity.Migrations; 5 | 6 | public partial class AddCountryProperty : DbMigration 7 | { 8 | public override void Up() 9 | { 10 | AddColumn("dbo.AspNetUsers", "City", c => c.Int(nullable: false)); 11 | AddColumn("dbo.AspNetUsers", "Country", c => c.Int(nullable: false)); 12 | } 13 | 14 | public override void Down() 15 | { 16 | DropColumn("dbo.AspNetUsers", "City"); 17 | DropColumn("dbo.AspNetUsers", "Country"); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Users/obj/Release/Package/PackageTmp/Views/Shared/Error.cshtml: -------------------------------------------------------------------------------- 1 | @model IEnumerable 2 | @{ ViewBag.Title = "Error";} 3 | 4 |
5 | @switch (Model.Count()) 6 | { 7 | case 0: 8 | @: 发生意外错误,请重试! 9 | break; 10 | case 1: 11 | @Model.First(); 12 | break; 13 | default: 14 | @: 出现了如下错误: 15 |
    16 | @foreach (string error in Model) 17 | { 18 |
  • @error
  • 19 | } 20 |
21 | break; 22 | } 23 |
24 | @Html.ActionLink("OK", "Index", null, new { @class = "btn btn-default" }) 25 | -------------------------------------------------------------------------------- /Users/Infrastructure/CustomPasswordValidator.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using System.Threading.Tasks; 4 | using Microsoft.AspNet.Identity; 5 | 6 | namespace Users.Infrastructure 7 | { 8 | public class CustomPasswordValidator : PasswordValidator 9 | { 10 | public override async Task ValidateAsync(string password) 11 | { 12 | IdentityResult result = await base.ValidateAsync(password); 13 | if (password.Contains("12345")) 14 | { 15 | List errors = result.Errors.ToList(); 16 | errors.Add("密码不能包含连续数字"); 17 | result = new IdentityResult(errors); 18 | } 19 | return result; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Users/Infrastructure/AppRoleManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using Microsoft.AspNet.Identity; 6 | using Microsoft.AspNet.Identity.EntityFramework; 7 | using Microsoft.AspNet.Identity.Owin; 8 | using Microsoft.Owin; 9 | using Users.Models; 10 | 11 | namespace Users.Infrastructure 12 | { 13 | public class AppRoleManager:RoleManager 14 | { 15 | public AppRoleManager(RoleStore store):base(store) 16 | { 17 | } 18 | 19 | public static AppRoleManager Create(IdentityFactoryOptions options, IOwinContext context) 20 | { 21 | return new AppRoleManager(new RoleStore(context.Get())); 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /Users/Views/Home/UserProps.cshtml: -------------------------------------------------------------------------------- 1 | @using Users.Models 2 | @model AppUser 3 | @{ 4 | ViewBag.Title = "UserProps"; 5 | } 6 |
7 |
8 | 自定义用户属性 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
城市@Model.City
国籍@Model.Country
20 |
21 | @using (Html.BeginForm()) 22 | { 23 |
24 | 25 | @Html.DropDownListFor(model=>model.City,new SelectList(Enum.GetNames(typeof(Cities)))) 26 |
27 | 28 | } 29 | 30 | -------------------------------------------------------------------------------- /Users/Views/Admin/Create.cshtml: -------------------------------------------------------------------------------- 1 | @model Users.Models.UserViewModel 2 | @{ 3 | ViewBag.Title = "创建用户"; 4 | } 5 |

创建用户

6 | @Html.ValidationSummary(false) 7 | @using (Html.BeginForm()) 8 | { 9 |
10 | 11 | @Html.TextBoxFor(x => x.Name, new {@class = "form-control"}) 12 |
13 |
14 | 15 | @Html.TextBoxFor(x => x.Email, new {@class = "form-control"}) 16 |
17 |
18 | 19 | @Html.PasswordFor(x => x.Password, new {@class = "form-control"}) 20 |
21 | 22 | @Html.ActionLink("取消", "Index", null, new {@class = "btn btn-default"}) 23 | } 24 | -------------------------------------------------------------------------------- /Users/Views/Admin/Edit.cshtml: -------------------------------------------------------------------------------- 1 | @model Users.Models.AppUser 2 | @{ 3 | ViewBag.Title = "编辑用户"; 4 | } 5 | @Html.ValidationSummary(false) 6 |

编辑用户

7 | 8 |
9 | 10 |

@Model.UserName

11 |
12 | @using (Html.BeginForm()) 13 | { 14 | @Html.HiddenFor(x => x.Id) 15 |
16 | 17 | @Html.TextBoxFor(x => x.Email, new {@class = "form-control"}) 18 |
19 |
20 | 21 | 22 |
23 | 24 | @Html.ActionLink("取消", "Index", null, new {@class = "btn btn-default"}) 25 | } 26 | -------------------------------------------------------------------------------- /Users/Infrastructure/AppIdentityDbContext.cs: -------------------------------------------------------------------------------- 1 | using System.Data.Entity; 2 | using Microsoft.AspNet.Identity; 3 | using Microsoft.AspNet.Identity.EntityFramework; 4 | using Users.Models; 5 | 6 | namespace Users.Infrastructure 7 | { 8 | public class AppIdentityDbContext : IdentityDbContext 9 | { 10 | public AppIdentityDbContext() : base("IdentityDb") 11 | { 12 | } 13 | 14 | static AppIdentityDbContext() 15 | { 16 | Database.SetInitializer(new IdentityDbInit()); 17 | } 18 | 19 | public static AppIdentityDbContext Create() 20 | { 21 | return new AppIdentityDbContext(); 22 | } 23 | } 24 | 25 | public class IdentityDbInit:NullDatabaseInitializer 26 | { 27 | 28 | } 29 | } -------------------------------------------------------------------------------- /Users/Infrastructure/ClaimsRoles.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Security.Claims; 5 | using System.Web; 6 | 7 | namespace Users.Infrastructure 8 | { 9 | public class ClaimsRoles 10 | { 11 | public static IEnumerable CreateRolesFromClaims(ClaimsIdentity user) 12 | { 13 | List claims = new List(); 14 | if (user.HasClaim(x => x.Type == ClaimTypes.StateOrProvince 15 | && x.Issuer == "RemoteClaims" && x.Value == "北京") 16 | && user.HasClaim(x => x.Type == ClaimTypes.Role 17 | && x.Value == "Employee")) 18 | { 19 | claims.Add(new Claim(ClaimTypes.Role, "BjStaff")); 20 | } 21 | return claims; 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /Users/Views/Claims/Index.cshtml: -------------------------------------------------------------------------------- 1 | @using System.Security.Claims 2 | @using Users.Infrastructure 3 | @model IEnumerable 4 | @{ 5 | ViewBag.Title = "Index"; 6 | } 7 |
8 |
9 | 声明 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | @foreach (Claim claim in Model.OrderBy(x=>x.Type)) 19 | { 20 | 21 | 22 | 23 | 24 | 25 | 26 | } 27 |
SubjectIssuerTypeValue
@claim.Subject.Name@claim.Issuer@Html.ClaimType(claim.Type)@claim.Value
28 |
-------------------------------------------------------------------------------- /Users/obj/Release/Package/PackageTmp/Views/Admin/Create.cshtml: -------------------------------------------------------------------------------- 1 | @model Users.Models.UserViewModel 2 | @{ 3 | ViewBag.Title = "创建用户"; 4 | } 5 |

创建用户

6 | @Html.ValidationSummary(false) 7 | @using (Html.BeginForm()) 8 | { 9 |
10 | 11 | @Html.TextBoxFor(x => x.Name, new {@class = "form-control"}) 12 |
13 |
14 | 15 | @Html.TextBoxFor(x => x.Email, new {@class = "form-control"}) 16 |
17 |
18 | 19 | @Html.PasswordFor(x => x.Password, new {@class = "form-control"}) 20 |
21 | 22 | @Html.ActionLink("取消", "Index", null, new {@class = "btn btn-default"}) 23 | } 24 | -------------------------------------------------------------------------------- /Users/obj/Release/Package/PackageTmp/Views/Admin/Edit.cshtml: -------------------------------------------------------------------------------- 1 | @model Users.Models.AppUser 2 | @{ 3 | ViewBag.Title = "编辑用户"; 4 | } 5 | @Html.ValidationSummary(false) 6 |

编辑用户

7 | 8 |
9 | 10 |

@Model.UserName

11 |
12 | @using (Html.BeginForm()) 13 | { 14 | @Html.HiddenFor(x => x.Id) 15 |
16 | 17 | @Html.TextBoxFor(x => x.Email, new {@class = "form-control"}) 18 |
19 |
20 | 21 | 22 |
23 | 24 | @Html.ActionLink("取消", "Index", null, new {@class = "btn btn-default"}) 25 | } 26 | -------------------------------------------------------------------------------- /Users/Infrastructure/ClaimsAccessAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Security.Claims; 5 | using System.Web; 6 | using System.Web.Mvc; 7 | 8 | namespace Users.Infrastructure 9 | { 10 | public class ClaimsAccessAttribute:AuthorizeAttribute 11 | { 12 | public string Issuer { get; set; } 13 | public string ClaimType { get; set; } 14 | public string Value { get; set; } 15 | protected override bool AuthorizeCore(HttpContextBase context) 16 | { 17 | return context.User.Identity.IsAuthenticated 18 | && context.User.Identity is ClaimsIdentity 19 | && ((ClaimsIdentity)context.User.Identity).HasClaim(x => 20 | x.Issuer == Issuer && x.Type == ClaimType && x.Value == Value 21 | ); 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /Users/Infrastructure/CustomUserValidator.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using System.Threading.Tasks; 4 | using Microsoft.AspNet.Identity; 5 | using Users.Models; 6 | 7 | namespace Users.Infrastructure 8 | { 9 | public class CustomUserValidator : UserValidator 10 | { 11 | public CustomUserValidator(AppUserManager mgr) 12 | : base(mgr) 13 | { 14 | } 15 | 16 | public override async Task ValidateAsync(AppUser user) 17 | { 18 | IdentityResult result = await base.ValidateAsync(user); 19 | 20 | if (!user.Email.ToLower().EndsWith("@gmail.com")) 21 | { 22 | List errors = result.Errors.ToList(); 23 | errors.Add("Email 地址只支持gmail域名"); 24 | result = new IdentityResult(errors); 25 | } 26 | return result; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Users/Migrations/201509140936514_AddCountryProperty.Designer.cs: -------------------------------------------------------------------------------- 1 | // 2 | namespace Users.Migrations 3 | { 4 | using System.CodeDom.Compiler; 5 | using System.Data.Entity.Migrations; 6 | using System.Data.Entity.Migrations.Infrastructure; 7 | using System.Resources; 8 | 9 | [GeneratedCode("EntityFramework.Migrations", "6.1.3-40302")] 10 | public sealed partial class AddCountryProperty : IMigrationMetadata 11 | { 12 | private readonly ResourceManager Resources = new ResourceManager(typeof(AddCountryProperty)); 13 | 14 | string IMigrationMetadata.Id 15 | { 16 | get { return "201509140936514_AddCountryProperty"; } 17 | } 18 | 19 | string IMigrationMetadata.Source 20 | { 21 | get { return null; } 22 | } 23 | 24 | string IMigrationMetadata.Target 25 | { 26 | get { return Resources.GetString("Target"); } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Users/Views/Account/Login.cshtml: -------------------------------------------------------------------------------- 1 | @using System.Web.UI.WebControls 2 | @model Users.Models.LoginModel 3 | @{ 4 | ViewBag.Title = "登录"; 5 | } 6 | 7 |

登录

8 | @Html.ValidationSummary() 9 | @using (Html.BeginForm()) 10 | { 11 | @Html.AntiForgeryToken() 12 | 13 |
14 | 15 | @Html.TextBoxFor(x=>x.Name,new {@class="form-control",placeholder="Admin"}) 16 |
17 |
18 | 19 | @Html.PasswordFor(x => x.Password, new {@class = "form-control",placeholder="Password2015"}) 20 |
21 | 22 | } 23 | 24 | @using (Html.BeginForm("GoogleLogin", "Account")) 25 | { 26 | 27 | 28 | } 29 | -------------------------------------------------------------------------------- /Users/obj/Release/Package/PackageTmp/Views/Account/Login.cshtml: -------------------------------------------------------------------------------- 1 | @using System.Web.UI.WebControls 2 | @model Users.Models.LoginModel 3 | @{ 4 | ViewBag.Title = "登录"; 5 | } 6 | 7 |

登录

8 | @Html.ValidationSummary() 9 | @using (Html.BeginForm()) 10 | { 11 | @Html.AntiForgeryToken() 12 | 13 |
14 | 15 | @Html.TextBoxFor(x=>x.Name,new {@class="form-control",placeholder="Admin"}) 16 |
17 |
18 | 19 | @Html.PasswordFor(x => x.Password, new {@class = "form-control",placeholder="Password2015"}) 20 |
21 | 22 | } 23 | 24 | @using (Html.BeginForm("GoogleLogin", "Account")) 25 | { 26 | 27 | 28 | } 29 | -------------------------------------------------------------------------------- /Users.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.23107.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Users", "Users\Users.csproj", "{B88DDFCF-E855-4FC1-BF37-54DF2E13115A}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {B88DDFCF-E855-4FC1-BF37-54DF2E13115A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {B88DDFCF-E855-4FC1-BF37-54DF2E13115A}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {B88DDFCF-E855-4FC1-BF37-54DF2E13115A}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {B88DDFCF-E855-4FC1-BF37-54DF2E13115A}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /Users/Infrastructure/LocationClaimsProvider.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Security.Claims; 5 | using System.Web; 6 | 7 | namespace Users.Infrastructure 8 | { 9 | public static class LocationClaimsProvider 10 | { 11 | public static IEnumerable GetClaims(ClaimsIdentity user) 12 | { 13 | List claims=new List(); 14 | if (user.Name.ToLower()=="admin") 15 | { 16 | claims.Add(CreateClaim(ClaimTypes.PostalCode, "200000")); 17 | claims.Add(CreateClaim(ClaimTypes.StateOrProvince, "上海")); 18 | } 19 | else 20 | { 21 | claims.Add(CreateClaim(ClaimTypes.PostalCode, "100000")); 22 | claims.Add(CreateClaim(ClaimTypes.StateOrProvince, "北京")); 23 | } 24 | return claims; 25 | } 26 | 27 | private static Claim CreateClaim(string type,string value) 28 | { 29 | return new Claim(type, value, ClaimValueTypes.String, "RemoteClaims"); 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /Users/Controllers/ClaimsController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Security.Claims; 5 | using System.Web; 6 | using System.Web.Mvc; 7 | using Users.Infrastructure; 8 | 9 | namespace Users.Controllers 10 | { 11 | public class ClaimsController : Controller 12 | { 13 | [Authorize] 14 | public ActionResult Index() 15 | { 16 | ClaimsIdentity claimsIdentity = HttpContext.User.Identity as ClaimsIdentity; 17 | if (claimsIdentity==null) 18 | { 19 | return View("Error", new string[] {"未找到声明"}); 20 | } 21 | else 22 | { 23 | return View(claimsIdentity.Claims); 24 | } 25 | } 26 | 27 | 28 | [Authorize(Roles = "BjStaff")] 29 | public string OtherAction() 30 | { 31 | return "这是一个受保护的Action"; 32 | } 33 | [ClaimsAccess(Issuer = "RemoteClaims", ClaimType = ClaimTypes.PostalCode, Value = "200000")] 34 | public string AnotherAction() 35 | { 36 | return "这也是一个受保护的Action"; 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /Users/Properties/PublishProfiles/myusermanagement - FTP.pubxml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | FTP 9 | Release 10 | Any CPU 11 | http://myusermanagement.azurewebsites.net 12 | True 13 | False 14 | ftp://waws-prod-ch1-015.ftp.azurewebsites.windows.net 15 | False 16 | True 17 | site/wwwroot 18 | myusermanagement\$myusermanagement 19 | <_SavePWD>True 20 | 21 | -------------------------------------------------------------------------------- /Users/Properties/PublishProfiles/myusermanagement - FTP (2).pubxml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | FTP 9 | Release 10 | Any CPU 11 | http://myusermanagement.azurewebsites.net 12 | True 13 | False 14 | ftp://waws-prod-ch1-015.ftp.azurewebsites.windows.net 15 | False 16 | True 17 | site/wwwroot 18 | myusermanagement\$myusermanagement 19 | <_SavePWD>True 20 | 21 | -------------------------------------------------------------------------------- /Users/Infrastructure/IdentityHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Reflection; 5 | using System.Security.Claims; 6 | using System.Web; 7 | using System.Web.Mvc; 8 | using Microsoft.AspNet.Identity.Owin; 9 | 10 | namespace Users.Infrastructure 11 | { 12 | public static class IdentityHelper 13 | { 14 | public static MvcHtmlString GetUserName(this HtmlHelper html,string id) 15 | { 16 | AppUserManager userManager = HttpContext.Current.GetOwinContext().GetUserManager(); 17 | return new MvcHtmlString(userManager.FindByIdAsync(id).Result.UserName); 18 | } 19 | public static MvcHtmlString ClaimType(this HtmlHelper html, string claimType) 20 | { 21 | FieldInfo[] fields = typeof(ClaimTypes).GetFields(); 22 | foreach (FieldInfo field in fields) 23 | { 24 | if (field.GetValue(null).ToString() == claimType) 25 | { 26 | return new MvcHtmlString(field.Name); 27 | } 28 | } 29 | return new MvcHtmlString(string.Format("{0}", 30 | claimType.Split('/', '.').Last())); 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /Users/obj/Release/CSAutoParameterize.parameters.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Users/Web.Debug.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 29 | 30 | -------------------------------------------------------------------------------- /Users/Models/AppUser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Microsoft.AspNet.Identity.EntityFramework; 3 | 4 | namespace Users.Models { 5 | /// 6 | /// 自定义的User Class继承IdentityUser,在此扩展自定义User属性 7 | /// 8 | public class AppUser : IdentityUser 9 | { 10 | // 在此添加额外属性 11 | public Countries Country { get; set; } 12 | public Cities City { get; set; } 13 | 14 | public void SetCountryFromCity(Cities city) 15 | { 16 | switch (city) 17 | { 18 | case Cities.Shanghai: 19 | case Cities.Hangzhou: 20 | Country=Countries.China; 21 | break; 22 | case Cities.NewYork: 23 | Country=Countries.USA; 24 | break; 25 | case Cities.Tokyo: 26 | Country=Countries.Japan; 27 | break; 28 | default: 29 | Country=Countries.None; 30 | break; 31 | } 32 | } 33 | 34 | } 35 | 36 | public enum Countries 37 | { 38 | China, 39 | USA, 40 | Japan, 41 | None 42 | } 43 | public enum Cities 44 | { 45 | Shanghai, 46 | Hangzhou, 47 | NewYork, 48 | Tokyo 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Users/Web.Release.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | 30 | 31 | -------------------------------------------------------------------------------- /packages/jQuery.2.1.4/Tools/install.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | . (Join-Path $toolsPath common.ps1) 4 | 5 | # VS 11 and above supports the new intellisense JS files 6 | $vsVersion = [System.Version]::Parse($dte.Version) 7 | $supportsJsIntelliSenseFile = $vsVersion.Major -ge 11 8 | 9 | if (-not $supportsJsIntelliSenseFile) { 10 | $displayVersion = $vsVersion.Major 11 | Write-Host "IntelliSense JS files are not supported by your version of Visual Studio: $displayVersion" 12 | exit 13 | } 14 | 15 | if ($scriptsFolderProjectItem -eq $null) { 16 | # No Scripts folder 17 | Write-Host "No Scripts folder found" 18 | exit 19 | } 20 | 21 | # Delete the vsdoc file from the project 22 | try { 23 | $vsDocProjectItem = $scriptsFolderProjectItem.ProjectItems.Item("jquery-$ver-vsdoc.js") 24 | Delete-ProjectItem $vsDocProjectItem 25 | } 26 | catch { 27 | Write-Host "Error deleting vsdoc file: " + $_.Exception -ForegroundColor Red 28 | exit 29 | } 30 | 31 | # Copy the intellisense file to the project from the tools folder 32 | $intelliSenseFileSourcePath = Join-Path $toolsPath $intelliSenseFileName 33 | try { 34 | $scriptsFolderProjectItem.ProjectItems.AddFromFileCopy($intelliSenseFileSourcePath) 35 | } 36 | catch { 37 | # This will throw if the file already exists, so we need to catch here 38 | } 39 | 40 | # Update the _references.js file 41 | AddOrUpdate-Reference $scriptsFolderProjectItem $jqueryFileNameRegEx $jqueryFileName -------------------------------------------------------------------------------- /Users/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("Users")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Users")] 13 | [assembly: AssemblyCopyright("Copyright © 2014")] 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("72ca7013-40df-4142-8a68-eeb75a2250df")] 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 | -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Mvc.5.2.3/Content/Web.config.install.xdt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /Users/obj/Release/TransformWebConfig/assist/Web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | 30 | 31 | -------------------------------------------------------------------------------- /Users/Views/Admin/Index.cshtml: -------------------------------------------------------------------------------- 1 | @using Users.Models 2 | @model IEnumerable 3 | @{ 4 | ViewBag.Title = "Index"; 5 | } 6 |
7 |
8 | ASP.NET Identity 用户管理 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | @if (Model.Count() == 0) 18 | { 19 | 20 | } 21 | else 22 | { 23 | foreach (AppUser user in Model) 24 | { 25 | 26 | 27 | 28 | 29 | 41 | 42 | } 43 | } 44 |
ID用户名Email
暂无用户
@user.Id@user.UserName@user.Email 30 | @using (Html.BeginForm("Delete", "Admin", 31 | new {id = user.Id})) 32 | { 33 | @Html.ActionLink("编辑", "Edit", new {id = user.Id}, 34 | new {@class = "btn btn-primary btn-xs"}) 35 | 39 | } 40 |
45 |
46 | @Html.ActionLink("创建", "Create", null, new {@class = "btn btn-primary"}) 47 | -------------------------------------------------------------------------------- /packages/jQuery.2.1.4/Tools/uninstall.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | . (Join-Path $toolsPath common.ps1) 4 | 5 | # Determine the file paths 6 | $projectIntelliSenseFilePath = Join-Path $projectScriptsFolderPath $intelliSenseFileName 7 | $origIntelliSenseFilePath = Join-Path $toolsPath $intelliSenseFileName 8 | 9 | if (Test-Path $projectIntelliSenseFilePath) { 10 | if ((Get-Checksum $projectIntelliSenseFilePath) -eq (Get-Checksum $origIntelliSenseFilePath)) { 11 | # The intellisense file in the project matches the file in the tools folder, delete it 12 | 13 | if ($scriptsFolderProjectItem -eq $null) { 14 | # No Scripts folder 15 | exit 16 | } 17 | 18 | try { 19 | # Get the project item for the intellisense file 20 | $intelliSenseFileProjectItem = $scriptsFolderProjectItem.ProjectItems.Item($intelliSenseFileName) 21 | } 22 | catch { 23 | # The item wasn't found 24 | exit 25 | } 26 | 27 | # Delete the project item 28 | Delete-ProjectItem $intelliSenseFileProjectItem 29 | } 30 | else { 31 | $projectScriptsFolderLeaf = Split-Path $projectScriptsFolderPath -Leaf 32 | Write-Host "Skipping '$projectScriptsFolderLeaf\$intelliSenseFileName' because it was modified." -ForegroundColor Magenta 33 | } 34 | } 35 | else { 36 | # The intellisense file was not found in project 37 | Write-Host "The intellisense file was not found in project at path $projectIntelliSenseFilePath" 38 | } 39 | 40 | # Update the _references.js file 41 | Remove-Reference $scriptsFolderProjectItem $jqueryFileNameRegEx -------------------------------------------------------------------------------- /Users/obj/Release/Package/PackageTmp/Views/Admin/Index.cshtml: -------------------------------------------------------------------------------- 1 | @using Users.Models 2 | @model IEnumerable 3 | @{ 4 | ViewBag.Title = "Index"; 5 | } 6 |
7 |
8 | ASP.NET Identity 用户管理 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | @if (Model.Count() == 0) 18 | { 19 | 20 | } 21 | else 22 | { 23 | foreach (AppUser user in Model) 24 | { 25 | 26 | 27 | 28 | 29 | 41 | 42 | } 43 | } 44 |
ID用户名Email
暂无用户
@user.Id@user.UserName@user.Email 30 | @using (Html.BeginForm("Delete", "Admin", 31 | new {id = user.Id})) 32 | { 33 | @Html.ActionLink("编辑", "Edit", new {id = user.Id}, 34 | new {@class = "btn btn-primary btn-xs"}) 35 | 39 | } 40 |
45 |
46 | @Html.ActionLink("创建", "Create", null, new {@class = "btn btn-primary"}) 47 | -------------------------------------------------------------------------------- /Users/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 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /Users/obj/Release/Package/PackageTmp/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 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /Users/obj/Release/CSAutoParameterize/original/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 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /Users/obj/Release/CSAutoParameterize/transformed/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 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /Users/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Users/Infrastructure/AppUserManager.cs: -------------------------------------------------------------------------------- 1 | using System.Management.Instrumentation; 2 | using Microsoft.AspNet.Identity; 3 | using Microsoft.AspNet.Identity.EntityFramework; 4 | using Microsoft.AspNet.Identity.Owin; 5 | using Microsoft.Owin; 6 | using Users.Models; 7 | 8 | namespace Users.Infrastructure { 9 | /// 10 | /// 用户管理 11 | /// 12 | public class AppUserManager : UserManager { 13 | 14 | public AppUserManager(IUserStore store) 15 | : base(store) { 16 | } 17 | 18 | public static AppUserManager Create( 19 | IdentityFactoryOptions options, 20 | IOwinContext context) { 21 | 22 | AppIdentityDbContext db = context.Get(); 23 | //UserStore 是 包含在 Microsoft.AspNet.Identity.EntityFramework 中,它实现了 UserManger 类中与用户操作相关的方法。 24 | //也就是说UserStore类中的方法(诸如:FindById、FindByNameAsync...)通过EntityFramework检索和持久化UserInfo到数据库中 25 | AppUserManager manager = new AppUserManager(new UserStore(db)); 26 | 27 | //自定义的User Validator 28 | manager.UserValidator = new CustomUserValidator(manager) 29 | { 30 | AllowOnlyAlphanumericUserNames = false, 31 | RequireUniqueEmail = true 32 | }; 33 | 34 | //自定义的Password Validator 35 | //manager.PasswordValidator = new CustomPasswordValidator 36 | //{ 37 | // RequiredLength = 6, 38 | // RequireNonLetterOrDigit = false, 39 | // RequireDigit = false, 40 | // RequireLowercase = true, 41 | // RequireUppercase = true 42 | //}; 43 | return manager; 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /Users/obj/Release/Package/PackageTmp/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Users/Views/Role/Index.cshtml: -------------------------------------------------------------------------------- 1 | @using Users.Infrastructure 2 | @model IEnumerable 3 | @{ 4 | ViewBag.Title = "角色"; 5 | } 6 |
7 |
角色
8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | @if (Model.Count() == 0) 16 | { 17 | 18 | } 19 | else 20 | { 21 | foreach (var role in Model) 22 | { 23 | 24 | 25 | 26 | 38 | 47 | 48 | } 49 | } 50 | 51 |
IDNameUsers操作
暂无角色
@role.Id@role.Name 27 | @if (role.Users == null || role.Users.Count <= 0) 28 | { 29 | @:该角色下暂无用户 30 | } 31 | else 32 | { 33 |

34 | @string.Join(", ", role.Users.Select(x => Html.GetUserName(x.UserId))) 35 |

36 | } 37 |
39 | @using (Html.BeginForm("Delete", "Role", new {id = role.Id})) 40 | { 41 | @Html.ActionLink("编辑", "Edit", new {id = role.Id}, new {@class = "btn btn-primary btn-xs"}) 42 | 45 | } 46 |
52 |
53 | @Html.ActionLink("创建", "Create", null, new { @class = "btn btn-primary" }) 54 | -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebPages.3.2.3/Content/Web.config.install.xdt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 21 | 22 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /Users/Views/Shared/_Layout.cshtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | @ViewBag.Title 6 | 7 | 8 | 14 | 15 | 16 | 36 |
37 | @RenderBody() 38 |
39 |
40 |

© @DateTime.Now.Year - My ASP.NET Application

41 |
42 |
43 | 44 | 45 | -------------------------------------------------------------------------------- /Users/obj/Release/Package/PackageTmp/Views/Shared/_Layout.cshtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | @ViewBag.Title 6 | 7 | 8 | 14 | 15 | 16 | 36 |
37 | @RenderBody() 38 |
39 |
40 |

© @DateTime.Now.Year - My ASP.NET Application

41 |
42 |
43 | 44 | 45 | -------------------------------------------------------------------------------- /Users/obj/Release/Package/PackageTmp/Views/Role/Index.cshtml: -------------------------------------------------------------------------------- 1 | @using Users.Infrastructure 2 | @model IEnumerable 3 | @{ 4 | ViewBag.Title = "角色"; 5 | } 6 |
7 |
角色
8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | @if (Model.Count() == 0) 16 | { 17 | 18 | } 19 | else 20 | { 21 | foreach (var role in Model) 22 | { 23 | 24 | 25 | 26 | 38 | 47 | 48 | } 49 | } 50 | 51 |
IDNameUsers操作
暂无角色
@role.Id@role.Name 27 | @if (role.Users == null || role.Users.Count <= 0) 28 | { 29 | @:该角色下暂无用户 30 | } 31 | else 32 | { 33 |

34 | @string.Join(", ", role.Users.Select(x => Html.GetUserName(x.UserId))) 35 |

36 | } 37 |
39 | @using (Html.BeginForm("Delete", "Role", new {id = role.Id})) 40 | { 41 | @Html.ActionLink("编辑", "Edit", new {id = role.Id}, new {@class = "btn btn-primary btn-xs"}) 42 | 45 | } 46 |
52 |
53 | @Html.ActionLink("创建", "Create", null, new { @class = "btn btn-primary" }) 54 | -------------------------------------------------------------------------------- /Users/Users.csproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | True 5 | False 6 | False 7 | 8 | False 9 | 600 10 | 600 11 | ProjectFiles 12 | myusermanagement - Web Deploy 13 | 14 | 15 | 16 | 17 | 18 | Admin 19 | CurrentPage 20 | True 21 | False 22 | False 23 | False 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | True 33 | True 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /packages/EntityFramework.6.1.3/tools/about_EntityFramework.help.txt: -------------------------------------------------------------------------------- 1 | TOPIC 2 | about_EntityFramework 3 | 4 | SHORT DESCRIPTION 5 | Provides information about Entity Framework commands. 6 | 7 | LONG DESCRIPTION 8 | This topic describes the Entity Framework commands. Entity Framework is 9 | Microsoft's recommended data access technology for new applications. 10 | 11 | The following Entity Framework cmdlets are used with Entity Framework 12 | Migrations. 13 | 14 | Cmdlet Description 15 | ----------------- --------------------------------------------------- 16 | Enable-Migrations Enables Code First Migrations in a project. 17 | 18 | Add-Migration Scaffolds a migration script for any pending model 19 | changes. 20 | 21 | Update-Database Applies any pending migrations to the database. 22 | 23 | Get-Migrations Displays the migrations that have been applied to 24 | the target database. 25 | 26 | The following Entity Framework cmdlets are used by NuGet packages that 27 | install Entity Framework providers. These commands are not usually used as 28 | part of normal application development. 29 | 30 | Cmdlet Description 31 | ------------------------------ --------------------------------------- 32 | Add-EFProvider Adds or updates an Entity Framework 33 | provider entry in the project config 34 | file. 35 | 36 | Add-EFDefaultConnectionFactory Adds or updates an Entity Framework 37 | default connection factory in the 38 | project config file. 39 | 40 | Initialize-EFConfiguration Initializes the Entity Framework 41 | section in the project config file and 42 | sets defaults. 43 | 44 | SEE ALSO 45 | Enable-Migrations 46 | Add-Migration 47 | Update-Database 48 | Get-Migrations 49 | -------------------------------------------------------------------------------- /Users/Migrations/Configuration.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNet.Identity; 2 | using Microsoft.AspNet.Identity.EntityFramework; 3 | using Users.Infrastructure; 4 | using Users.Models; 5 | 6 | namespace Users.Migrations 7 | { 8 | using System; 9 | using System.Data.Entity; 10 | using System.Data.Entity.Migrations; 11 | using System.Linq; 12 | 13 | internal sealed class Configuration : DbMigrationsConfiguration 14 | { 15 | public Configuration() 16 | { 17 | AutomaticMigrationsEnabled = true; 18 | ContextKey = "Users.Infrastructure.AppIdentityDbContext"; 19 | } 20 | 21 | protected override void Seed(Users.Infrastructure.AppIdentityDbContext context) 22 | { 23 | AppUserManager userManager = new AppUserManager(new UserStore(context)); 24 | AppRoleManager roleManager = new AppRoleManager(new RoleStore(context)); 25 | 26 | string roleName = "Administrator"; 27 | string userName = "Admin"; 28 | string password = "Password2015"; 29 | string email = "admin@jkxy.com"; 30 | 31 | if (!roleManager.RoleExists(roleName)) 32 | { 33 | roleManager.Create(new AppRole(roleName)); 34 | } 35 | 36 | AppUser user = userManager.FindByName(userName); 37 | if (user == null) 38 | { 39 | userManager.Create(new AppUser { UserName = userName, Email = email }, 40 | password); 41 | user = userManager.FindByName(userName); 42 | } 43 | 44 | if (!userManager.IsInRole(user.Id, roleName)) 45 | { 46 | userManager.AddToRole(user.Id, roleName); 47 | } 48 | foreach (AppUser dbUser in userManager.Users) 49 | { 50 | if (dbUser.Country==Countries.None) 51 | { 52 | dbUser.SetCountryFromCity(dbUser.City); 53 | } 54 | } 55 | context.SaveChanges(); 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /Users/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Threading.Tasks; 3 | using System.Web; 4 | using System.Web.Mvc; 5 | using Microsoft.AspNet.Identity; 6 | using Microsoft.AspNet.Identity.Owin; 7 | using Users.Infrastructure; 8 | using Users.Models; 9 | 10 | namespace Users.Controllers 11 | { 12 | public class HomeController : Controller 13 | { 14 | [Authorize] 15 | public ActionResult Index() 16 | { 17 | return View(GetData("Index")); 18 | } 19 | 20 | [Authorize(Roles = "Employee")] 21 | public ActionResult OtherAction() 22 | { 23 | return View("Index", GetData("OtherAction")); 24 | } 25 | 26 | private Dictionary GetData(string actionName) 27 | { 28 | Dictionary dict 29 | = new Dictionary(); 30 | 31 | dict.Add("Action", actionName); 32 | dict.Add("用户", HttpContext.User.Identity.Name); 33 | dict.Add("是否身份验证通过", HttpContext.User.Identity.IsAuthenticated); 34 | dict.Add("身份验证类型", HttpContext.User.Identity.AuthenticationType); 35 | dict.Add("是否隶属于Administrator", HttpContext.User.IsInRole("Administrator")); 36 | return dict; 37 | } 38 | 39 | [Authorize] 40 | public ActionResult UserProps() 41 | { 42 | return View(CurrentUser); 43 | } 44 | 45 | [Authorize] 46 | [HttpPost] 47 | public async Task UserProps(Cities city) 48 | { 49 | AppUser user = CurrentUser; 50 | user.City = city; 51 | user.SetCountryFromCity(city); 52 | await UserManager.UpdateAsync(user); 53 | return View(user); 54 | } 55 | private AppUser CurrentUser 56 | { 57 | get { return UserManager.FindByName(HttpContext.User.Identity.Name); } 58 | } 59 | 60 | private AppUserManager UserManager 61 | { 62 | get { return HttpContext.GetOwinContext().GetUserManager(); } 63 | } 64 | } 65 | } -------------------------------------------------------------------------------- /Users/Views/Role/Edit.cshtml: -------------------------------------------------------------------------------- 1 | 2 | @using Users.Models 3 | @model RoleEditModel 4 | @{ 5 | ViewBag.Title = "编辑角色"; 6 | } 7 | @Html.ValidationSummary() 8 | 9 | @using (Html.BeginForm()) 10 | { 11 | 12 |
13 |
14 | 向角色【 @Model.Role.Name】添加用户 15 |
16 | 17 | @if (Model.NonMembers.Count() == 0) 18 | { 19 | 20 | 23 | 24 | } 25 | else 26 | { 27 | 28 | 29 | 30 | 31 | foreach (AppUser user in Model.NonMembers) 32 | { 33 | 34 | 35 | 38 | 39 | } 40 | } 41 |
21 | 暂无 22 |
用户名添加至角色
@user.UserName 36 | 37 |
42 |
43 |
44 |
45 | 从角色【 @Model.Role.Name】移除用户 46 |
47 | 48 | @if (Model.Members.Count() == 0) 49 | { 50 | 51 | } 52 | else 53 | { 54 | 55 | 56 | 57 | 58 | foreach (AppUser user in Model.Members) 59 | { 60 | 61 | 62 | 65 | 66 | } 67 | } 68 |
暂无
用户名从角色中移除
@user.UserName 63 | 64 |
69 |
70 | 71 | @Html.ActionLink("取消", "Index", null, new { @class = "btn btn-default" }) 72 | } 73 | -------------------------------------------------------------------------------- /Users/obj/Release/Package/PackageTmp/Views/Role/Edit.cshtml: -------------------------------------------------------------------------------- 1 | 2 | @using Users.Models 3 | @model RoleEditModel 4 | @{ 5 | ViewBag.Title = "编辑角色"; 6 | } 7 | @Html.ValidationSummary() 8 | 9 | @using (Html.BeginForm()) 10 | { 11 | 12 |
13 |
14 | 向角色【 @Model.Role.Name】添加用户 15 |
16 | 17 | @if (Model.NonMembers.Count() == 0) 18 | { 19 | 20 | 23 | 24 | } 25 | else 26 | { 27 | 28 | 29 | 30 | 31 | foreach (AppUser user in Model.NonMembers) 32 | { 33 | 34 | 35 | 38 | 39 | } 40 | } 41 |
21 | 暂无 22 |
用户名添加至角色
@user.UserName 36 | 37 |
42 |
43 |
44 |
45 | 从角色【 @Model.Role.Name】移除用户 46 |
47 | 48 | @if (Model.Members.Count() == 0) 49 | { 50 | 51 | } 52 | else 53 | { 54 | 55 | 56 | 57 | 58 | foreach (AppUser user in Model.Members) 59 | { 60 | 61 | 62 | 65 | 66 | } 67 | } 68 |
暂无
用户名从角色中移除
@user.UserName 63 | 64 |
69 |
70 | 71 | @Html.ActionLink("取消", "Index", null, new { @class = "btn btn-default" }) 72 | } 73 | -------------------------------------------------------------------------------- /Users/Properties/PublishProfiles/myusermanagement - Web Deploy (2).pubxml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | MSDeploy 9 | False 10 | Release 11 | Any CPU 12 | http://myusermanagement.azurewebsites.net 13 | True 14 | False 15 | myusermanagement.scm.azurewebsites.net:443 16 | myusermanagement 17 | 18 | True 19 | WMSVC 20 | True 21 | $myusermanagement 22 | <_SavePWD>True 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | Data Source=tcp:xaokyeimar.database.windows.net,1433;Initial Catalog=test;Integrated Security=False;User ID=eyes@xaokyeimar;Password=p@ssw0rd;Connect Timeout=30;Encrypt=True 37 | 38 | 39 | -------------------------------------------------------------------------------- /Users/Properties/PublishProfiles/myusermanagement - Web Deploy.pubxml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | MSDeploy 9 | Release 10 | Any CPU 11 | http://myusermanagement.azurewebsites.net 12 | True 13 | False 14 | myusermanagement.scm.azurewebsites.net:443 15 | myusermanagement 16 | 17 | True 18 | WMSVC 19 | True 20 | $myusermanagement 21 | <_SavePWD>True 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | False 33 | <_DestinationType>AzureWebSite 34 | 35 | 36 | 37 | Server=tcp:xaokyeimar.database.windows.net,1433;Database=test;User ID=eyes@xaokyeimar;Password=p@ssw0rd;Trusted_Connection=False;Encrypt=True;Connection Timeout=30;MultipleActiveResultSets=True 38 | 39 | 40 | -------------------------------------------------------------------------------- /Users/App_Start/IdentityConfig.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNet.Identity; 7 | using Microsoft.Owin; 8 | using Microsoft.Owin.Security.Cookies; 9 | using Owin; 10 | using Users.Infrastructure; 11 | 12 | namespace Users 13 | { 14 | using Microsoft.Owin.Security.Google; 15 | using AppFunc = Func, Task>; 16 | public class IdentityConfig 17 | { 18 | public void Configuration(IAppBuilder app) 19 | { 20 | //app.CreatePerOwinContext 内幕: 21 | //1.使用app.Use方法将IdentityFactoryMiddleware和参数callback回掉函数注册到Owin Pipeline中 22 | //app.Use(typeof(IdentityFactoryMiddleware>), args); 23 | //2.当IdentityFactoryMiddleware中间件被Invoke执行时,执行callback回掉函数,返回具体实例Instance 24 | //TResult instance = ((IdentityFactoryMiddleware) this).Options.Provider.Create(((IdentityFactoryMiddleware) this).Options, context); 25 | //3.将返回的实例存储在Owin Context中 26 | //context.Set(instance); 27 | 28 | app.CreatePerOwinContext(AppIdentityDbContext.Create); 29 | app.CreatePerOwinContext(AppUserManager.Create); 30 | app.CreatePerOwinContext(AppRoleManager.Create); 31 | 32 | //app.UseCookieAuthentication 内幕: 33 | //1.将 CookieAuthenticationMiddleware 中间件注册到OWIN Pipeline中 34 | //app.Use(typeof(CookieAuthenticationMiddleware), app, options); 35 | //2.前面添加的CookieAuthenticationMiddleware指定在 ASP.NET 集成管道(ASP.NET integrated pipeline)的AuthenticateRequest阶段执行 36 | //var stage=PipelineStage.Authenticate; 37 | //app.UseStageMarker(stage); 38 | //3.当调用(Invoke)此Middleware时,将调用CreateHandler方法返回CookieAuthenticationHandler对象 39 | //AuthenticationHandler handler = CreateHandler(); 40 | //4.CookieAuthenticationHandler对象包含AuthenticateCoreAsync、ApplyResponseGrantAsync方法 41 | //AuthenticateCoreAsync:read && validate cookie,然后通过AddUserIdentity方法创建ClaimsPrincipal对象并添加到到Owin环境字典中,可以通过OwinContext对象Request.User可以获取当前用户 42 | //5.var newClaimsPrincipal = new ClaimsPrincipal(identity); 43 | //5._context.Request.User = newClaimsPrincipal; 44 | //6.ApplyResponseGrantAsync:Response cookie 45 | //http://www.asp.net/aspnet/overview/owin-and-katana/owin-middleware-in-the-iis-integrated-pipeline 46 | app.UseCookieAuthentication(new CookieAuthenticationOptions 47 | { 48 | AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie, 49 | LoginPath = new PathString("/Account/Login") 50 | }); 51 | app.UseExternalSignInCookie(DefaultAuthenticationTypes.ExternalCookie); 52 | //http://www.asp.net/mvc/overview/security/create-an-aspnet-mvc-5-app-with-facebook-and-google-oauth2-and-openid-sign-on 53 | app.UseGoogleAuthentication(new GoogleOAuth2AuthenticationOptions() 54 | { 55 | ClientId = "165066370005-6nhsp87llelff3tou91hhktg6eqgr0ke.apps.googleusercontent.com", 56 | ClientSecret = "euWbCSUZujjQGKMqOyz0msbq", 57 | }); 58 | } 59 | } 60 | } -------------------------------------------------------------------------------- /Users/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 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /Users/bin/Users.dll.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 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /Users/obj/Release/TransformWebConfig/transformed/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 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /Users/obj/Release/TransformWebConfig/original/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 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /packages/Newtonsoft.Json.7.0.1/tools/install.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | # open json.net splash page on package install 4 | # don't open if json.net is installed as a dependency 5 | 6 | try 7 | { 8 | $url = "http://www.newtonsoft.com/json/install?version=" + $package.Version 9 | $dte2 = Get-Interface $dte ([EnvDTE80.DTE2]) 10 | 11 | if ($dte2.ActiveWindow.Caption -eq "Package Manager Console") 12 | { 13 | # user is installing from VS NuGet console 14 | # get reference to the window, the console host and the input history 15 | # show webpage if "install-package newtonsoft.json" was last input 16 | 17 | $consoleWindow = $(Get-VSComponentModel).GetService([NuGetConsole.IPowerConsoleWindow]) 18 | 19 | $props = $consoleWindow.GetType().GetProperties([System.Reflection.BindingFlags]::Instance -bor ` 20 | [System.Reflection.BindingFlags]::NonPublic) 21 | 22 | $prop = $props | ? { $_.Name -eq "ActiveHostInfo" } | select -first 1 23 | if ($prop -eq $null) { return } 24 | 25 | $hostInfo = $prop.GetValue($consoleWindow) 26 | if ($hostInfo -eq $null) { return } 27 | 28 | $history = $hostInfo.WpfConsole.InputHistory.History 29 | 30 | $lastCommand = $history | select -last 1 31 | 32 | if ($lastCommand) 33 | { 34 | $lastCommand = $lastCommand.Trim().ToLower() 35 | if ($lastCommand.StartsWith("install-package") -and $lastCommand.Contains("newtonsoft.json")) 36 | { 37 | $dte2.ItemOperations.Navigate($url) | Out-Null 38 | } 39 | } 40 | } 41 | else 42 | { 43 | # user is installing from VS NuGet dialog 44 | # get reference to the window, then smart output console provider 45 | # show webpage if messages in buffered console contains "installing...newtonsoft.json" in last operation 46 | 47 | $instanceField = [NuGet.Dialog.PackageManagerWindow].GetField("CurrentInstance", [System.Reflection.BindingFlags]::Static -bor ` 48 | [System.Reflection.BindingFlags]::NonPublic) 49 | 50 | $consoleField = [NuGet.Dialog.PackageManagerWindow].GetField("_smartOutputConsoleProvider", [System.Reflection.BindingFlags]::Instance -bor ` 51 | [System.Reflection.BindingFlags]::NonPublic) 52 | 53 | if ($instanceField -eq $null -or $consoleField -eq $null) { return } 54 | 55 | $instance = $instanceField.GetValue($null) 56 | 57 | if ($instance -eq $null) { return } 58 | 59 | $consoleProvider = $consoleField.GetValue($instance) 60 | if ($consoleProvider -eq $null) { return } 61 | 62 | $console = $consoleProvider.CreateOutputConsole($false) 63 | 64 | $messagesField = $console.GetType().GetField("_messages", [System.Reflection.BindingFlags]::Instance -bor ` 65 | [System.Reflection.BindingFlags]::NonPublic) 66 | if ($messagesField -eq $null) { return } 67 | 68 | $messages = $messagesField.GetValue($console) 69 | if ($messages -eq $null) { return } 70 | 71 | $operations = $messages -split "==============================" 72 | 73 | $lastOperation = $operations | select -last 1 74 | 75 | if ($lastOperation) 76 | { 77 | $lastOperation = $lastOperation.ToLower() 78 | 79 | $lines = $lastOperation -split "`r`n" 80 | 81 | $installMatch = $lines | ? { $_.StartsWith("------- installing...newtonsoft.json ") } | select -first 1 82 | 83 | if ($installMatch) 84 | { 85 | $dte2.ItemOperations.Navigate($url) | Out-Null 86 | } 87 | } 88 | } 89 | } 90 | catch 91 | { 92 | try 93 | { 94 | $pmPane = $dte2.ToolWindows.OutputWindow.OutputWindowPanes.Item("Package Manager") 95 | 96 | $selection = $pmPane.TextDocument.Selection 97 | $selection.StartOfDocument($false) 98 | $selection.EndOfDocument($true) 99 | 100 | if ($selection.Text.StartsWith("Attempting to gather dependencies information for package 'Newtonsoft.Json." + $package.Version + "'")) 101 | { 102 | $dte2.ItemOperations.Navigate($url) | Out-Null 103 | } 104 | } 105 | catch 106 | { 107 | # stop potential errors from bubbling up 108 | # worst case the splash page won't open 109 | } 110 | } 111 | 112 | # still yolo -------------------------------------------------------------------------------- /packages/jQuery.2.1.4/Tools/common.ps1: -------------------------------------------------------------------------------- 1 | function Get-Checksum($file) { 2 | $cryptoProvider = New-Object "System.Security.Cryptography.MD5CryptoServiceProvider" 3 | 4 | $fileInfo = Get-Item $file 5 | trap { ; 6 | continue } $stream = $fileInfo.OpenRead() 7 | if ($? -eq $false) { 8 | # Couldn't open file for reading 9 | return $null 10 | } 11 | 12 | $bytes = $cryptoProvider.ComputeHash($stream) 13 | $checksum = '' 14 | foreach ($byte in $bytes) { 15 | $checksum += $byte.ToString('x2') 16 | } 17 | 18 | $stream.Close() | Out-Null 19 | 20 | return $checksum 21 | } 22 | 23 | function AddOrUpdate-Reference($scriptsFolderProjectItem, $fileNamePattern, $newFileName) { 24 | try { 25 | $referencesFileProjectItem = $scriptsFolderProjectItem.ProjectItems.Item("_references.js") 26 | } 27 | catch { 28 | # _references.js file not found 29 | return 30 | } 31 | 32 | if ($referencesFileProjectItem -eq $null) { 33 | # _references.js file not found 34 | return 35 | } 36 | 37 | $referencesFilePath = $referencesFileProjectItem.FileNames(1) 38 | $referencesTempFilePath = Join-Path $env:TEMP "_references.tmp.js" 39 | 40 | if ((Select-String $referencesFilePath -pattern $fileNamePattern).Length -eq 0) { 41 | # File has no existing matching reference line 42 | # Add the full reference line to the beginning of the file 43 | "/// " | Add-Content $referencesTempFilePath -Encoding UTF8 44 | Get-Content $referencesFilePath | Add-Content $referencesTempFilePath 45 | } 46 | else { 47 | # Loop through file and replace old file name with new file name 48 | Get-Content $referencesFilePath | ForEach-Object { $_ -replace $fileNamePattern, $newFileName } > $referencesTempFilePath 49 | } 50 | 51 | # Copy over the new _references.js file 52 | Copy-Item $referencesTempFilePath $referencesFilePath -Force 53 | Remove-Item $referencesTempFilePath -Force 54 | } 55 | 56 | function Remove-Reference($scriptsFolderProjectItem, $fileNamePattern) { 57 | try { 58 | $referencesFileProjectItem = $scriptsFolderProjectItem.ProjectItems.Item("_references.js") 59 | } 60 | catch { 61 | # _references.js file not found 62 | return 63 | } 64 | 65 | if ($referencesFileProjectItem -eq $null) { 66 | return 67 | } 68 | 69 | $referencesFilePath = $referencesFileProjectItem.FileNames(1) 70 | $referencesTempFilePath = Join-Path $env:TEMP "_references.tmp.js" 71 | 72 | if ((Select-String $referencesFilePath -pattern $fileNamePattern).Length -eq 1) { 73 | # Delete the line referencing the file 74 | Get-Content $referencesFilePath | ForEach-Object { if (-not ($_ -match $fileNamePattern)) { $_ } } > $referencesTempFilePath 75 | 76 | # Copy over the new _references.js file 77 | Copy-Item $referencesTempFilePath $referencesFilePath -Force 78 | Remove-Item $referencesTempFilePath -Force 79 | } 80 | } 81 | 82 | function Delete-ProjectItem($item) { 83 | $itemDeleted = $false 84 | for ($1=1; $i -le 5; $i++) { 85 | try { 86 | $item.Delete() 87 | $itemDeleted = $true 88 | break 89 | } 90 | catch { 91 | # Try again in 200ms 92 | [System.Threading.Thread]::Sleep(200) 93 | } 94 | } 95 | if ($itemDeleted -eq $false) { 96 | throw "Unable to delete project item after five attempts." 97 | } 98 | } 99 | 100 | # Extract the version number from the jquery file in the package's content\scripts folder 101 | $packageScriptsFolder = Join-Path $installPath Content\Scripts 102 | $jqueryFileName = Join-Path $packageScriptsFolder "jquery-*.js" | Get-ChildItem -Exclude "*.min.js","*-vsdoc.js" | Split-Path -Leaf 103 | $jqueryFileNameRegEx = "jquery-((?:\d+\.)?(?:\d+\.)?(?:\d+\.)?(?:\d+)).js" 104 | $jqueryFileName -match $jqueryFileNameRegEx 105 | $ver = $matches[1] 106 | 107 | $intelliSenseFileName = "jquery-$ver.intellisense.js" 108 | 109 | # Get the project item for the scripts folder 110 | try { 111 | $scriptsFolderProjectItem = $project.ProjectItems.Item("Scripts") 112 | $projectScriptsFolderPath = $scriptsFolderProjectItem.FileNames(1) 113 | } 114 | catch { 115 | # No Scripts folder 116 | Write-Host "No scripts folder found" 117 | } -------------------------------------------------------------------------------- /Users/obj/Release/Package/PackageTmp/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 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /Users/obj/Release/CSAutoParameterize/transformed/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 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /Users/obj/Release/CSAutoParameterize/original/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 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /Users/Controllers/AccountController.cs: -------------------------------------------------------------------------------- 1 | using System.Security.Claims; 2 | using System.Threading.Tasks; 3 | using System.Web; 4 | using System.Web.Mvc; 5 | using Microsoft.AspNet.Identity; 6 | using Microsoft.AspNet.Identity.Owin; 7 | using Microsoft.Owin.Security; 8 | using Users.Infrastructure; 9 | using Users.Models; 10 | 11 | namespace Users.Controllers 12 | { 13 | [Authorize] 14 | public class AccountController : Controller 15 | { 16 | [AllowAnonymous] 17 | public ActionResult Login(string returnUrl) 18 | { 19 | ViewBag.returnUrl = returnUrl; 20 | return View(); 21 | } 22 | 23 | public ActionResult LogOut() 24 | { 25 | AuthManager.SignOut(); 26 | return RedirectToAction("Index", "Home"); 27 | } 28 | 29 | [HttpPost] 30 | [AllowAnonymous] 31 | [ValidateAntiForgeryToken] 32 | public async Task Login(LoginModel model,string returnUrl) 33 | { 34 | 35 | if (ModelState.IsValid) 36 | { 37 | AppUser user = await UserManager.FindAsync(model.Name, model.Password); 38 | if (user==null) 39 | { 40 | ModelState.AddModelError("","无效的用户名或密码"); 41 | } 42 | else 43 | { 44 | var claimsIdentity = await UserManager.CreateIdentityAsync(user, DefaultAuthenticationTypes.ApplicationCookie); 45 | claimsIdentity.AddClaims(LocationClaimsProvider.GetClaims(claimsIdentity)); 46 | claimsIdentity.AddClaims(ClaimsRoles.CreateRolesFromClaims(claimsIdentity)); 47 | AuthManager.SignOut(); 48 | AuthManager.SignIn(new AuthenticationProperties {IsPersistent = false}, claimsIdentity); 49 | 50 | return Redirect(returnUrl); 51 | } 52 | } 53 | ViewBag.returnUrl = returnUrl; 54 | 55 | return View(model); 56 | } 57 | 58 | [HttpPost] 59 | [AllowAnonymous] 60 | public ActionResult GoogleLogin(string returnUrl) 61 | { 62 | var properties = new AuthenticationProperties 63 | { 64 | RedirectUri = Url.Action("GoogleLoginCallback", 65 | new { returnUrl = returnUrl }) 66 | }; 67 | HttpContext.GetOwinContext().Authentication.Challenge(properties, "Google"); 68 | return new HttpUnauthorizedResult(); 69 | } 70 | /// 71 | /// Google登陆成功后(即授权成功)回掉此Action 72 | /// 73 | /// 74 | /// 75 | [AllowAnonymous] 76 | public async Task GoogleLoginCallback(string returnUrl) 77 | { 78 | ExternalLoginInfo loginInfo = await AuthManager.GetExternalLoginInfoAsync(); 79 | AppUser user = await UserManager.FindAsync(loginInfo.Login); 80 | if (user == null) 81 | { 82 | user = new AppUser 83 | { 84 | Email = loginInfo.Email, 85 | UserName = loginInfo.DefaultUserName, 86 | City = Cities.Shanghai, 87 | Country = Countries.China 88 | }; 89 | 90 | IdentityResult result = await UserManager.CreateAsync(user); 91 | if (!result.Succeeded) 92 | { 93 | return View("Error", result.Errors); 94 | } 95 | result = await UserManager.AddLoginAsync(user.Id, loginInfo.Login); 96 | if (!result.Succeeded) 97 | { 98 | return View("Error", result.Errors); 99 | } 100 | } 101 | ClaimsIdentity ident = await UserManager.CreateIdentityAsync(user, 102 | DefaultAuthenticationTypes.ApplicationCookie); 103 | ident.AddClaims(loginInfo.ExternalIdentity.Claims); 104 | AuthManager.SignIn(new AuthenticationProperties 105 | { 106 | IsPersistent = false 107 | }, ident); 108 | return Redirect(returnUrl ?? "/"); 109 | } 110 | private IAuthenticationManager AuthManager 111 | { 112 | get { return HttpContext.GetOwinContext().Authentication; } 113 | } 114 | private AppUserManager UserManager 115 | { 116 | get { return HttpContext.GetOwinContext().GetUserManager(); } 117 | } 118 | } 119 | } -------------------------------------------------------------------------------- /Users/bin/System.Web.Webpages.Deployment.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | System.Web.WebPages.Deployment 5 | 6 | 7 | 8 | Provides a registration point for pre-application start code for Web Pages deployment. 9 | 10 | 11 | Registers pre-application start code for Web Pages deployment. 12 | 13 | 14 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Provides methods that are used to get deployment information about the Web application. 15 | 16 | 17 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Gets the assembly path for the Web Pages deployment. 18 | The assembly path for the Web Pages deployment. 19 | The Web Pages version. 20 | 21 | 22 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Gets the Web Pages version from the given binary path. 23 | The Web Pages version. 24 | The binary path for the Web Pages. 25 | 26 | 27 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Gets the assembly references from the given path regardless of the Web Pages version. 28 | The dictionary containing the assembly references of the Web Pages and its version. 29 | The path to the Web Pages application. 30 | 31 | 32 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Gets the maximum version of the Web Pages loaded assemblies. 33 | The maximum version of the Web Pages loaded assemblies. 34 | 35 | 36 | Gets the Web Pages version from the given path. 37 | The Web Pages version. 38 | The path of the root directory for the application. 39 | 40 | 41 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Gets the Web Pages version using the configuration settings with the specified path. 42 | The Web Pages version. 43 | The path to the application settings. 44 | 45 | 46 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Returns the assemblies for this Web Pages deployment. 47 | A list containing the assemblies for this Web Pages deployment. 48 | 49 | 50 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Indicates whether the Web Pages deployment is enabled. 51 | true if the Web Pages deployment is enabled; otherwise, false. 52 | The path to the Web Pages deployment. 53 | 54 | 55 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Indicates whether the Web Pages deployment is explicitly disabled. 56 | true if the Web Pages deployment is explicitly disabled; otherwise, false. 57 | The path to the Web Pages deployment. 58 | 59 | 60 | -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebPages.3.2.3/lib/net45/System.Web.WebPages.Deployment.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | System.Web.WebPages.Deployment 5 | 6 | 7 | 8 | Provides a registration point for pre-application start code for Web Pages deployment. 9 | 10 | 11 | Registers pre-application start code for Web Pages deployment. 12 | 13 | 14 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Provides methods that are used to get deployment information about the Web application. 15 | 16 | 17 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Gets the assembly path for the Web Pages deployment. 18 | The assembly path for the Web Pages deployment. 19 | The Web Pages version. 20 | 21 | 22 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Gets the Web Pages version from the given binary path. 23 | The Web Pages version. 24 | The binary path for the Web Pages. 25 | 26 | 27 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Gets the assembly references from the given path regardless of the Web Pages version. 28 | The dictionary containing the assembly references of the Web Pages and its version. 29 | The path to the Web Pages application. 30 | 31 | 32 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Gets the maximum version of the Web Pages loaded assemblies. 33 | The maximum version of the Web Pages loaded assemblies. 34 | 35 | 36 | Gets the Web Pages version from the given path. 37 | The Web Pages version. 38 | The path of the root directory for the application. 39 | 40 | 41 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Gets the Web Pages version using the configuration settings with the specified path. 42 | The Web Pages version. 43 | The path to the application settings. 44 | 45 | 46 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Returns the assemblies for this Web Pages deployment. 47 | A list containing the assemblies for this Web Pages deployment. 48 | 49 | 50 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Indicates whether the Web Pages deployment is enabled. 51 | true if the Web Pages deployment is enabled; otherwise, false. 52 | The path to the Web Pages deployment. 53 | 54 | 55 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Indicates whether the Web Pages deployment is explicitly disabled. 56 | true if the Web Pages deployment is explicitly disabled; otherwise, false. 57 | The path to the Web Pages deployment. 58 | 59 | 60 | -------------------------------------------------------------------------------- /Users/Controllers/AdminController.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using System.Web; 3 | using System.Web.Mvc; 4 | using Microsoft.AspNet.Identity; 5 | using Microsoft.AspNet.Identity.Owin; 6 | using Users.Infrastructure; 7 | using Users.Models; 8 | 9 | namespace Users.Controllers 10 | { 11 | [Authorize(Roles = "Administrator")] 12 | public class AdminController : Controller 13 | { 14 | public ActionResult Index() 15 | { 16 | return View(UserManager.Users); 17 | } 18 | 19 | public ActionResult Create() 20 | { 21 | return View(); 22 | } 23 | 24 | [HttpPost] 25 | public async Task Create(UserViewModel model) 26 | { 27 | if (ModelState.IsValid) 28 | { 29 | var user = new AppUser {UserName = model.Name, Email = model.Email}; 30 | //传入Password并转换成PasswordHash 31 | IdentityResult result = await UserManager.CreateAsync(user, 32 | model.Password); 33 | if (result.Succeeded) 34 | { 35 | return RedirectToAction("Index"); 36 | } 37 | AddErrorsFromResult(result); 38 | } 39 | return View(model); 40 | } 41 | 42 | [HttpPost] 43 | public async Task Delete(string id) 44 | { 45 | AppUser user = await UserManager.FindByIdAsync(id); 46 | if (user != null) 47 | { 48 | if (user.UserName=="Admin") 49 | { 50 | return View("Error", new[] { "请勿删除管理员!" }); 51 | } 52 | 53 | IdentityResult result = await UserManager.DeleteAsync(user); 54 | if (result.Succeeded) 55 | { 56 | return RedirectToAction("Index"); 57 | } 58 | return View("Error", result.Errors); 59 | } 60 | return View("Error", new[] {"User Not Found"}); 61 | } 62 | 63 | public async Task Edit(string id) 64 | { 65 | AppUser user = await UserManager.FindByIdAsync(id); 66 | if (user != null) 67 | { 68 | return View(user); 69 | } 70 | return RedirectToAction("Index"); 71 | } 72 | 73 | [HttpPost] 74 | public async Task Edit(string id, string email, string password) 75 | { 76 | //根据Id找到AppUser对象 77 | AppUser user = await UserManager.FindByIdAsync(id); 78 | 79 | if (user != null) 80 | { 81 | if (user.UserName=="Admin") 82 | { 83 | return View("Error", new[] { "请勿修改管理员密码!" }); 84 | } 85 | 86 | IdentityResult validPass = null; 87 | if (password != string.Empty) 88 | { 89 | //验证密码是否满足要求 90 | validPass = await UserManager.PasswordValidator.ValidateAsync(password); 91 | if (validPass.Succeeded) 92 | { 93 | user.PasswordHash = UserManager.PasswordHasher.HashPassword(password); 94 | } 95 | else 96 | { 97 | AddErrorsFromResult(validPass); 98 | } 99 | } 100 | //验证Email是否满足要求 101 | user.Email = email; 102 | IdentityResult validEmail = await UserManager.UserValidator.ValidateAsync(user); 103 | if (!validEmail.Succeeded) 104 | { 105 | AddErrorsFromResult(validEmail); 106 | } 107 | 108 | if ((validEmail.Succeeded && validPass == null) || (validEmail.Succeeded && validPass.Succeeded)) 109 | { 110 | IdentityResult result = await UserManager.UpdateAsync(user); 111 | 112 | if (result.Succeeded) 113 | { 114 | return RedirectToAction("Index"); 115 | } 116 | AddErrorsFromResult(result); 117 | } 118 | } 119 | else 120 | { 121 | ModelState.AddModelError("", "无法找到改用户"); 122 | } 123 | return View(user); 124 | } 125 | 126 | private void AddErrorsFromResult(IdentityResult result) 127 | { 128 | foreach (string error in result.Errors) 129 | { 130 | ModelState.AddModelError("", error); 131 | } 132 | } 133 | 134 | private AppUserManager UserManager 135 | { 136 | get { return HttpContext.GetOwinContext().GetUserManager(); } 137 | } 138 | } 139 | } 140 | -------------------------------------------------------------------------------- /Users/Controllers/RoleController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.DataAnnotations; 4 | using System.Linq; 5 | using System.Security.Claims; 6 | using System.Threading.Tasks; 7 | using System.Web; 8 | using System.Web.Mvc; 9 | using System.Web.Security; 10 | using Microsoft.AspNet.Identity; 11 | using Microsoft.AspNet.Identity.Owin; 12 | using Users.Infrastructure; 13 | using Users.Models; 14 | 15 | namespace Users.Controllers 16 | { 17 | [Authorize(Roles = "Administrator")] 18 | public class RoleController : Controller 19 | { 20 | // GET: Role 21 | public ActionResult Index() 22 | { 23 | return View(RoleManager.Roles); 24 | } 25 | public ActionResult Create() 26 | { 27 | return View(); 28 | } 29 | /// 30 | /// 编辑操作,获取所有隶属于此Role的成员和非隶属于此Role的成员 31 | /// 32 | /// 33 | /// 34 | public async Task Edit(string id) 35 | { 36 | AppRole role = await RoleManager.FindByIdAsync(id); 37 | string[] memberIDs = role.Users.Select(x => x.UserId).ToArray(); 38 | IEnumerable members = UserManager.Users.Where(x => memberIDs.Any(y => y == x.Id)); 39 | IEnumerable nonMembers = UserManager.Users.Except(members); 40 | return View(new RoleEditModel() 41 | { 42 | Role = role, 43 | Members = members, 44 | NonMembers = nonMembers 45 | }); 46 | } 47 | [HttpPost] 48 | public async Task Edit(RoleModificationModel model) 49 | { 50 | IdentityResult result; 51 | if (ModelState.IsValid) 52 | { 53 | foreach (string userId in model.IDsToAdd??new string[] {}) 54 | { 55 | result = await UserManager.AddToRoleAsync(userId, model.RoleName); 56 | if (!result.Succeeded) 57 | { 58 | return View("Error", result.Errors); 59 | } 60 | } 61 | foreach (var userId in model.IDsToDelete??new string[] {}) 62 | { 63 | //演示用,正式部署时去掉 64 | var currentUser = await UserManager.FindByIdAsync(userId); 65 | if (currentUser.UserName=="Admin" && model.RoleName=="Administrator" ) 66 | { 67 | return View("Error", new string[] { "请勿修改Admin的角色!" }); 68 | } 69 | 70 | result = await UserManager.RemoveFromRoleAsync(userId, model.RoleName); 71 | if (!result.Succeeded) 72 | { 73 | return View("Error", result.Errors); 74 | } 75 | } 76 | return RedirectToAction("Index"); 77 | } 78 | return View("Error",new string[] {"无法找到此角色"}); 79 | } 80 | 81 | [HttpPost] 82 | public async Task Create(string name) 83 | { 84 | if (ModelState.IsValid) 85 | { 86 | IdentityResult result = await RoleManager.CreateAsync(new AppRole(name)); 87 | if (result.Succeeded) 88 | { 89 | return RedirectToAction("Index"); 90 | } 91 | else 92 | { 93 | AddErrorsFromResult(result); 94 | } 95 | } 96 | return View(name); 97 | } 98 | 99 | [HttpPost] 100 | public async Task Delete(string id) 101 | { 102 | AppRole role = await RoleManager.FindByIdAsync(id); 103 | if (role != null) 104 | { 105 | if (role.Name=="Administrator") 106 | { 107 | return View("Error", new string[] { "请勿删除该管理员角色!" }); 108 | } 109 | 110 | IdentityResult result = await RoleManager.DeleteAsync(role); 111 | if (result.Succeeded) 112 | { 113 | return RedirectToAction("Index"); 114 | } 115 | else 116 | { 117 | return View("Error", result.Errors); 118 | } 119 | } 120 | else 121 | { 122 | return View("Error", new string[] { "无法找到该Role" }); 123 | } 124 | } 125 | 126 | private void AddErrorsFromResult(IdentityResult result) 127 | { 128 | foreach (string error in result.Errors) 129 | { 130 | ModelState.AddModelError("", error); 131 | } 132 | } 133 | /// 134 | /// 从OWIN环境字典中获取AppUserManager对象 135 | /// 136 | private AppUserManager UserManager 137 | { 138 | get 139 | { 140 | return HttpContext.GetOwinContext().GetUserManager(); 141 | } 142 | } 143 | /// 144 | /// 从OWIN环境字典中获取AppRoleManager对象 145 | /// 146 | private AppRoleManager RoleManager 147 | { 148 | get 149 | { 150 | return HttpContext.GetOwinContext().GetUserManager(); 151 | } 152 | } 153 | } 154 | } -------------------------------------------------------------------------------- /Users/Scripts/jquery.validate.unobtrusive.min.js: -------------------------------------------------------------------------------- 1 | /* NUGET: BEGIN LICENSE TEXT 2 | * 3 | * Microsoft grants you the right to use these script files for the sole 4 | * purpose of either: (i) interacting through your browser with the Microsoft 5 | * website or online service, subject to the applicable licensing or use 6 | * terms; or (ii) using the files as included with a Microsoft product subject 7 | * to that product's license terms. Microsoft reserves all other rights to the 8 | * files not expressly granted by Microsoft, whether by implication, estoppel 9 | * or otherwise. Insofar as a script file is dual licensed under GPL, 10 | * Microsoft neither took the code under GPL nor distributes it thereunder but 11 | * under the terms set out in this paragraph. All notices and licenses 12 | * below are for informational purposes only. 13 | * 14 | * NUGET: END LICENSE TEXT */ 15 | /* 16 | ** Unobtrusive validation support library for jQuery and jQuery Validate 17 | ** Copyright (C) Microsoft Corporation. All rights reserved. 18 | */ 19 | (function(a){var d=a.validator,b,e="unobtrusiveValidation";function c(a,b,c){a.rules[b]=c;if(a.message)a.messages[b]=a.message}function j(a){return a.replace(/^\s+|\s+$/g,"").split(/\s*,\s*/g)}function f(a){return a.replace(/([!"#$%&'()*+,./:;<=>?@\[\\\]^`{|}~])/g,"\\$1")}function h(a){return a.substr(0,a.lastIndexOf(".")+1)}function g(a,b){if(a.indexOf("*.")===0)a=a.replace("*.",b);return a}function m(c,e){var b=a(this).find("[data-valmsg-for='"+f(e[0].name)+"']"),d=b.attr("data-valmsg-replace"),g=d?a.parseJSON(d)!==false:null;b.removeClass("field-validation-valid").addClass("field-validation-error");c.data("unobtrusiveContainer",b);if(g){b.empty();c.removeClass("input-validation-error").appendTo(b)}else c.hide()}function l(e,d){var c=a(this).find("[data-valmsg-summary=true]"),b=c.find("ul");if(b&&b.length&&d.errorList.length){b.empty();c.addClass("validation-summary-errors").removeClass("validation-summary-valid");a.each(d.errorList,function(){a("
  • ").html(this.message).appendTo(b)})}}function k(d){var b=d.data("unobtrusiveContainer"),c=b.attr("data-valmsg-replace"),e=c?a.parseJSON(c):null;if(b){b.addClass("field-validation-valid").removeClass("field-validation-error");d.removeData("unobtrusiveContainer");e&&b.empty()}}function n(){var b=a(this),c="__jquery_unobtrusive_validation_form_reset";if(b.data(c))return;b.data(c,true);try{b.data("validator").resetForm()}finally{b.removeData(c)}b.find(".validation-summary-errors").addClass("validation-summary-valid").removeClass("validation-summary-errors");b.find(".field-validation-error").addClass("field-validation-valid").removeClass("field-validation-error").removeData("unobtrusiveContainer").find(">*").removeData("unobtrusiveContainer")}function i(b){var c=a(b),f=c.data(e),i=a.proxy(n,b),g=d.unobtrusive.options||{},h=function(e,d){var c=g[e];c&&a.isFunction(c)&&c.apply(b,d)};if(!f){f={options:{errorClass:g.errorClass||"input-validation-error",errorElement:g.errorElement||"span",errorPlacement:function(){m.apply(b,arguments);h("errorPlacement",arguments)},invalidHandler:function(){l.apply(b,arguments);h("invalidHandler",arguments)},messages:{},rules:{},success:function(){k.apply(b,arguments);h("success",arguments)}},attachValidation:function(){c.off("reset."+e,i).on("reset."+e,i).validate(this.options)},validate:function(){c.validate();return c.valid()}};c.data(e,f)}return f}d.unobtrusive={adapters:[],parseElement:function(b,h){var d=a(b),f=d.parents("form")[0],c,e,g;if(!f)return;c=i(f);c.options.rules[b.name]=e={};c.options.messages[b.name]=g={};a.each(this.adapters,function(){var c="data-val-"+this.name,i=d.attr(c),h={};if(i!==undefined){c+="-";a.each(this.params,function(){h[this]=d.attr(c+this)});this.adapt({element:b,form:f,message:i,params:h,rules:e,messages:g})}});a.extend(e,{__dummy__:true});!h&&c.attachValidation()},parse:function(c){var b=a(c),e=b.parents().addBack().filter("form").add(b.find("form")).has("[data-val=true]");b.find("[data-val=true]").each(function(){d.unobtrusive.parseElement(this,true)});e.each(function(){var a=i(this);a&&a.attachValidation()})}};b=d.unobtrusive.adapters;b.add=function(c,a,b){if(!b){b=a;a=[]}this.push({name:c,params:a,adapt:b});return this};b.addBool=function(a,b){return this.add(a,function(d){c(d,b||a,true)})};b.addMinMax=function(e,g,f,a,d,b){return this.add(e,[d||"min",b||"max"],function(b){var e=b.params.min,d=b.params.max;if(e&&d)c(b,a,[e,d]);else if(e)c(b,g,e);else d&&c(b,f,d)})};b.addSingleVal=function(a,b,d){return this.add(a,[b||"val"],function(e){c(e,d||a,e.params[b])})};d.addMethod("__dummy__",function(){return true});d.addMethod("regex",function(b,c,d){var a;if(this.optional(c))return true;a=(new RegExp(d)).exec(b);return a&&a.index===0&&a[0].length===b.length});d.addMethod("nonalphamin",function(c,d,b){var a;if(b){a=c.match(/\W/g);a=a&&a.length>=b}return a});if(d.methods.extension){b.addSingleVal("accept","mimtype");b.addSingleVal("extension","extension")}else b.addSingleVal("extension","extension","accept");b.addSingleVal("regex","pattern");b.addBool("creditcard").addBool("date").addBool("digits").addBool("email").addBool("number").addBool("url");b.addMinMax("length","minlength","maxlength","rangelength").addMinMax("range","min","max","range");b.addMinMax("minlength","minlength").addMinMax("maxlength","minlength","maxlength");b.add("equalto",["other"],function(b){var i=h(b.element.name),j=b.params.other,d=g(j,i),e=a(b.form).find(":input").filter("[name='"+f(d)+"']")[0];c(b,"equalTo",e)});b.add("required",function(a){(a.element.tagName.toUpperCase()!=="INPUT"||a.element.type.toUpperCase()!=="CHECKBOX")&&c(a,"required",true)});b.add("remote",["url","type","additionalfields"],function(b){var d={url:b.params.url,type:b.params.type||"GET",data:{}},e=h(b.element.name);a.each(j(b.params.additionalfields||b.element.name),function(i,h){var c=g(h,e);d.data[c]=function(){var d=a(b.form).find(":input").filter("[name='"+f(c)+"']");return d.is(":checkbox")?d.filter(":checked").val()||d.filter(":hidden").val()||"":d.is(":radio")?d.filter(":checked").val()||"":d.val()}});c(b,"remote",d)});b.add("password",["min","nonalphamin","regex"],function(a){a.params.min&&c(a,"minlength",a.params.min);a.params.nonalphamin&&c(a,"nonalphamin",a.params.nonalphamin);a.params.regex&&c(a,"regex",a.params.regex)});a(function(){d.unobtrusive.parse(document)})})(jQuery); -------------------------------------------------------------------------------- /Users/obj/Release/Package/PackageTmp/Scripts/jquery.validate.unobtrusive.min.js: -------------------------------------------------------------------------------- 1 | /* NUGET: BEGIN LICENSE TEXT 2 | * 3 | * Microsoft grants you the right to use these script files for the sole 4 | * purpose of either: (i) interacting through your browser with the Microsoft 5 | * website or online service, subject to the applicable licensing or use 6 | * terms; or (ii) using the files as included with a Microsoft product subject 7 | * to that product's license terms. Microsoft reserves all other rights to the 8 | * files not expressly granted by Microsoft, whether by implication, estoppel 9 | * or otherwise. Insofar as a script file is dual licensed under GPL, 10 | * Microsoft neither took the code under GPL nor distributes it thereunder but 11 | * under the terms set out in this paragraph. All notices and licenses 12 | * below are for informational purposes only. 13 | * 14 | * NUGET: END LICENSE TEXT */ 15 | /* 16 | ** Unobtrusive validation support library for jQuery and jQuery Validate 17 | ** Copyright (C) Microsoft Corporation. All rights reserved. 18 | */ 19 | (function(a){var d=a.validator,b,e="unobtrusiveValidation";function c(a,b,c){a.rules[b]=c;if(a.message)a.messages[b]=a.message}function j(a){return a.replace(/^\s+|\s+$/g,"").split(/\s*,\s*/g)}function f(a){return a.replace(/([!"#$%&'()*+,./:;<=>?@\[\\\]^`{|}~])/g,"\\$1")}function h(a){return a.substr(0,a.lastIndexOf(".")+1)}function g(a,b){if(a.indexOf("*.")===0)a=a.replace("*.",b);return a}function m(c,e){var b=a(this).find("[data-valmsg-for='"+f(e[0].name)+"']"),d=b.attr("data-valmsg-replace"),g=d?a.parseJSON(d)!==false:null;b.removeClass("field-validation-valid").addClass("field-validation-error");c.data("unobtrusiveContainer",b);if(g){b.empty();c.removeClass("input-validation-error").appendTo(b)}else c.hide()}function l(e,d){var c=a(this).find("[data-valmsg-summary=true]"),b=c.find("ul");if(b&&b.length&&d.errorList.length){b.empty();c.addClass("validation-summary-errors").removeClass("validation-summary-valid");a.each(d.errorList,function(){a("
  • ").html(this.message).appendTo(b)})}}function k(d){var b=d.data("unobtrusiveContainer"),c=b.attr("data-valmsg-replace"),e=c?a.parseJSON(c):null;if(b){b.addClass("field-validation-valid").removeClass("field-validation-error");d.removeData("unobtrusiveContainer");e&&b.empty()}}function n(){var b=a(this),c="__jquery_unobtrusive_validation_form_reset";if(b.data(c))return;b.data(c,true);try{b.data("validator").resetForm()}finally{b.removeData(c)}b.find(".validation-summary-errors").addClass("validation-summary-valid").removeClass("validation-summary-errors");b.find(".field-validation-error").addClass("field-validation-valid").removeClass("field-validation-error").removeData("unobtrusiveContainer").find(">*").removeData("unobtrusiveContainer")}function i(b){var c=a(b),f=c.data(e),i=a.proxy(n,b),g=d.unobtrusive.options||{},h=function(e,d){var c=g[e];c&&a.isFunction(c)&&c.apply(b,d)};if(!f){f={options:{errorClass:g.errorClass||"input-validation-error",errorElement:g.errorElement||"span",errorPlacement:function(){m.apply(b,arguments);h("errorPlacement",arguments)},invalidHandler:function(){l.apply(b,arguments);h("invalidHandler",arguments)},messages:{},rules:{},success:function(){k.apply(b,arguments);h("success",arguments)}},attachValidation:function(){c.off("reset."+e,i).on("reset."+e,i).validate(this.options)},validate:function(){c.validate();return c.valid()}};c.data(e,f)}return f}d.unobtrusive={adapters:[],parseElement:function(b,h){var d=a(b),f=d.parents("form")[0],c,e,g;if(!f)return;c=i(f);c.options.rules[b.name]=e={};c.options.messages[b.name]=g={};a.each(this.adapters,function(){var c="data-val-"+this.name,i=d.attr(c),h={};if(i!==undefined){c+="-";a.each(this.params,function(){h[this]=d.attr(c+this)});this.adapt({element:b,form:f,message:i,params:h,rules:e,messages:g})}});a.extend(e,{__dummy__:true});!h&&c.attachValidation()},parse:function(c){var b=a(c),e=b.parents().addBack().filter("form").add(b.find("form")).has("[data-val=true]");b.find("[data-val=true]").each(function(){d.unobtrusive.parseElement(this,true)});e.each(function(){var a=i(this);a&&a.attachValidation()})}};b=d.unobtrusive.adapters;b.add=function(c,a,b){if(!b){b=a;a=[]}this.push({name:c,params:a,adapt:b});return this};b.addBool=function(a,b){return this.add(a,function(d){c(d,b||a,true)})};b.addMinMax=function(e,g,f,a,d,b){return this.add(e,[d||"min",b||"max"],function(b){var e=b.params.min,d=b.params.max;if(e&&d)c(b,a,[e,d]);else if(e)c(b,g,e);else d&&c(b,f,d)})};b.addSingleVal=function(a,b,d){return this.add(a,[b||"val"],function(e){c(e,d||a,e.params[b])})};d.addMethod("__dummy__",function(){return true});d.addMethod("regex",function(b,c,d){var a;if(this.optional(c))return true;a=(new RegExp(d)).exec(b);return a&&a.index===0&&a[0].length===b.length});d.addMethod("nonalphamin",function(c,d,b){var a;if(b){a=c.match(/\W/g);a=a&&a.length>=b}return a});if(d.methods.extension){b.addSingleVal("accept","mimtype");b.addSingleVal("extension","extension")}else b.addSingleVal("extension","extension","accept");b.addSingleVal("regex","pattern");b.addBool("creditcard").addBool("date").addBool("digits").addBool("email").addBool("number").addBool("url");b.addMinMax("length","minlength","maxlength","rangelength").addMinMax("range","min","max","range");b.addMinMax("minlength","minlength").addMinMax("maxlength","minlength","maxlength");b.add("equalto",["other"],function(b){var i=h(b.element.name),j=b.params.other,d=g(j,i),e=a(b.form).find(":input").filter("[name='"+f(d)+"']")[0];c(b,"equalTo",e)});b.add("required",function(a){(a.element.tagName.toUpperCase()!=="INPUT"||a.element.type.toUpperCase()!=="CHECKBOX")&&c(a,"required",true)});b.add("remote",["url","type","additionalfields"],function(b){var d={url:b.params.url,type:b.params.type||"GET",data:{}},e=h(b.element.name);a.each(j(b.params.additionalfields||b.element.name),function(i,h){var c=g(h,e);d.data[c]=function(){var d=a(b.form).find(":input").filter("[name='"+f(c)+"']");return d.is(":checkbox")?d.filter(":checked").val()||d.filter(":hidden").val()||"":d.is(":radio")?d.filter(":checked").val()||"":d.val()}});c(b,"remote",d)});b.add("password",["min","nonalphamin","regex"],function(a){a.params.min&&c(a,"minlength",a.params.min);a.params.nonalphamin&&c(a,"nonalphamin",a.params.nonalphamin);a.params.regex&&c(a,"regex",a.params.regex)});a(function(){d.unobtrusive.parse(document)})})(jQuery); -------------------------------------------------------------------------------- /packages/Microsoft.jQuery.Unobtrusive.Validation.3.2.3/Content/Scripts/jquery.validate.unobtrusive.min.js: -------------------------------------------------------------------------------- 1 | /* NUGET: BEGIN LICENSE TEXT 2 | * 3 | * Microsoft grants you the right to use these script files for the sole 4 | * purpose of either: (i) interacting through your browser with the Microsoft 5 | * website or online service, subject to the applicable licensing or use 6 | * terms; or (ii) using the files as included with a Microsoft product subject 7 | * to that product's license terms. Microsoft reserves all other rights to the 8 | * files not expressly granted by Microsoft, whether by implication, estoppel 9 | * or otherwise. Insofar as a script file is dual licensed under GPL, 10 | * Microsoft neither took the code under GPL nor distributes it thereunder but 11 | * under the terms set out in this paragraph. All notices and licenses 12 | * below are for informational purposes only. 13 | * 14 | * NUGET: END LICENSE TEXT */ 15 | /* 16 | ** Unobtrusive validation support library for jQuery and jQuery Validate 17 | ** Copyright (C) Microsoft Corporation. All rights reserved. 18 | */ 19 | (function(a){var d=a.validator,b,e="unobtrusiveValidation";function c(a,b,c){a.rules[b]=c;if(a.message)a.messages[b]=a.message}function j(a){return a.replace(/^\s+|\s+$/g,"").split(/\s*,\s*/g)}function f(a){return a.replace(/([!"#$%&'()*+,./:;<=>?@\[\\\]^`{|}~])/g,"\\$1")}function h(a){return a.substr(0,a.lastIndexOf(".")+1)}function g(a,b){if(a.indexOf("*.")===0)a=a.replace("*.",b);return a}function m(c,e){var b=a(this).find("[data-valmsg-for='"+f(e[0].name)+"']"),d=b.attr("data-valmsg-replace"),g=d?a.parseJSON(d)!==false:null;b.removeClass("field-validation-valid").addClass("field-validation-error");c.data("unobtrusiveContainer",b);if(g){b.empty();c.removeClass("input-validation-error").appendTo(b)}else c.hide()}function l(e,d){var c=a(this).find("[data-valmsg-summary=true]"),b=c.find("ul");if(b&&b.length&&d.errorList.length){b.empty();c.addClass("validation-summary-errors").removeClass("validation-summary-valid");a.each(d.errorList,function(){a("
  • ").html(this.message).appendTo(b)})}}function k(d){var b=d.data("unobtrusiveContainer"),c=b.attr("data-valmsg-replace"),e=c?a.parseJSON(c):null;if(b){b.addClass("field-validation-valid").removeClass("field-validation-error");d.removeData("unobtrusiveContainer");e&&b.empty()}}function n(){var b=a(this),c="__jquery_unobtrusive_validation_form_reset";if(b.data(c))return;b.data(c,true);try{b.data("validator").resetForm()}finally{b.removeData(c)}b.find(".validation-summary-errors").addClass("validation-summary-valid").removeClass("validation-summary-errors");b.find(".field-validation-error").addClass("field-validation-valid").removeClass("field-validation-error").removeData("unobtrusiveContainer").find(">*").removeData("unobtrusiveContainer")}function i(b){var c=a(b),f=c.data(e),i=a.proxy(n,b),g=d.unobtrusive.options||{},h=function(e,d){var c=g[e];c&&a.isFunction(c)&&c.apply(b,d)};if(!f){f={options:{errorClass:g.errorClass||"input-validation-error",errorElement:g.errorElement||"span",errorPlacement:function(){m.apply(b,arguments);h("errorPlacement",arguments)},invalidHandler:function(){l.apply(b,arguments);h("invalidHandler",arguments)},messages:{},rules:{},success:function(){k.apply(b,arguments);h("success",arguments)}},attachValidation:function(){c.off("reset."+e,i).on("reset."+e,i).validate(this.options)},validate:function(){c.validate();return c.valid()}};c.data(e,f)}return f}d.unobtrusive={adapters:[],parseElement:function(b,h){var d=a(b),f=d.parents("form")[0],c,e,g;if(!f)return;c=i(f);c.options.rules[b.name]=e={};c.options.messages[b.name]=g={};a.each(this.adapters,function(){var c="data-val-"+this.name,i=d.attr(c),h={};if(i!==undefined){c+="-";a.each(this.params,function(){h[this]=d.attr(c+this)});this.adapt({element:b,form:f,message:i,params:h,rules:e,messages:g})}});a.extend(e,{__dummy__:true});!h&&c.attachValidation()},parse:function(c){var b=a(c),e=b.parents().addBack().filter("form").add(b.find("form")).has("[data-val=true]");b.find("[data-val=true]").each(function(){d.unobtrusive.parseElement(this,true)});e.each(function(){var a=i(this);a&&a.attachValidation()})}};b=d.unobtrusive.adapters;b.add=function(c,a,b){if(!b){b=a;a=[]}this.push({name:c,params:a,adapt:b});return this};b.addBool=function(a,b){return this.add(a,function(d){c(d,b||a,true)})};b.addMinMax=function(e,g,f,a,d,b){return this.add(e,[d||"min",b||"max"],function(b){var e=b.params.min,d=b.params.max;if(e&&d)c(b,a,[e,d]);else if(e)c(b,g,e);else d&&c(b,f,d)})};b.addSingleVal=function(a,b,d){return this.add(a,[b||"val"],function(e){c(e,d||a,e.params[b])})};d.addMethod("__dummy__",function(){return true});d.addMethod("regex",function(b,c,d){var a;if(this.optional(c))return true;a=(new RegExp(d)).exec(b);return a&&a.index===0&&a[0].length===b.length});d.addMethod("nonalphamin",function(c,d,b){var a;if(b){a=c.match(/\W/g);a=a&&a.length>=b}return a});if(d.methods.extension){b.addSingleVal("accept","mimtype");b.addSingleVal("extension","extension")}else b.addSingleVal("extension","extension","accept");b.addSingleVal("regex","pattern");b.addBool("creditcard").addBool("date").addBool("digits").addBool("email").addBool("number").addBool("url");b.addMinMax("length","minlength","maxlength","rangelength").addMinMax("range","min","max","range");b.addMinMax("minlength","minlength").addMinMax("maxlength","minlength","maxlength");b.add("equalto",["other"],function(b){var i=h(b.element.name),j=b.params.other,d=g(j,i),e=a(b.form).find(":input").filter("[name='"+f(d)+"']")[0];c(b,"equalTo",e)});b.add("required",function(a){(a.element.tagName.toUpperCase()!=="INPUT"||a.element.type.toUpperCase()!=="CHECKBOX")&&c(a,"required",true)});b.add("remote",["url","type","additionalfields"],function(b){var d={url:b.params.url,type:b.params.type||"GET",data:{}},e=h(b.element.name);a.each(j(b.params.additionalfields||b.element.name),function(i,h){var c=g(h,e);d.data[c]=function(){var d=a(b.form).find(":input").filter("[name='"+f(c)+"']");return d.is(":checkbox")?d.filter(":checked").val()||d.filter(":hidden").val()||"":d.is(":radio")?d.filter(":checked").val()||"":d.val()}});c(b,"remote",d)});b.add("password",["min","nonalphamin","regex"],function(a){a.params.min&&c(a,"minlength",a.params.min);a.params.nonalphamin&&c(a,"nonalphamin",a.params.nonalphamin);a.params.regex&&c(a,"regex",a.params.regex)});a(function(){d.unobtrusive.parse(document)})})(jQuery); --------------------------------------------------------------------------------