Add ASP.NET Identity.

This commit is contained in:
2019-11-07 00:25:43 +00:00
parent 84415fcf05
commit 63d04a6e97
26 changed files with 5978 additions and 13 deletions

View File

@@ -0,0 +1,7 @@
@page
@model RegisterModel
@{
ViewData["Title"] = "Register";
}
<h1>@ViewData["Title"]</h1>
Registration is not allowed

View File

@@ -0,0 +1,14 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
namespace DiscImageChef.Server.Areas.Identity.Pages.Account
{
[AllowAnonymous]
public class RegisterModel : PageModel
{
public IActionResult OnGetAsync(string returnUrl = null) => RedirectToPage("Login");
public IActionResult OnPostAsync(string returnUrl = null) => RedirectToPage("Login");
}
}

View File

@@ -0,0 +1 @@
@using DiscImageChef.Server.Areas.Identity.Pages.Account

View File

@@ -0,0 +1,10 @@
<environment include="Development">
<script src="~/lib/jquery-validation/dist/jquery.validate.js"></script>
<script src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js"></script>
</environment>
<environment exclude="Development">
<script asp-fallback-src="~/lib/jquery-validation/dist/jquery.validate.min.js" asp-fallback-test="window.jQuery && window.jQuery.validator" crossorigin="anonymous" integrity="sha384-rZfj/ogBloos6wzLGpPkkOr/gpkBNLZ6b6yLy4o+ok+t/SAKlL5mvXLr0OXNi1Hp" src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.17.0/jquery.validate.min.js">
</script>
<script asp-fallback-src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js" asp-fallback-test="window.jQuery && window.jQuery.validator && window.jQuery.validator.unobtrusive" crossorigin="anonymous" integrity="sha384-ifv0TYDWxBHzvAk2Z0n8R434FL1Rlv/Av18DXE43N/1rvHyOG4izKst0f2iSLdds" src="https://ajax.aspnetcdn.com/ajax/jquery.validation.unobtrusive/3.2.9/jquery.validate.unobtrusive.min.js">
</script>
</environment>

View File

@@ -0,0 +1,4 @@
@using Microsoft.AspNetCore.Identity
@using DiscImageChef.Server.Areas.Identity
@using DiscImageChef.Server.Areas.Identity.Pages
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers

View File

@@ -0,0 +1,3 @@
@{
Layout = "/Views/Shared/_Layout.cshtml";
}