Sorry, there's nothing at this address.
-Sorry, there's nothing at this address.
+Sorry, there's nothing at this address.
+You do not have access to this resource.
++ You've successfully authenticated with @Model.ProviderDisplayName. + Please enter an email address for this site below and click the Register button to finish + logging in. +
+ ++ Please check your email to reset your password. +
+ diff --git a/GWMS.UI/Areas/Identity/Pages/Account/ForgotPasswordConfirmation.cshtml.cs b/GWMS.UI/Areas/Identity/Pages/Account/ForgotPasswordConfirmation.cshtml.cs new file mode 100644 index 0000000..7dccea2 --- /dev/null +++ b/GWMS.UI/Areas/Identity/Pages/Account/ForgotPasswordConfirmation.cshtml.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc.RazorPages; + +namespace GWMS.UI.Areas.Identity.Pages.Account +{ + [AllowAnonymous] + public class ForgotPasswordConfirmation : PageModel + { + #region Public Methods + + public void OnGet() + { + } + + #endregion Public Methods + } +} \ No newline at end of file diff --git a/GWMS.UI/Areas/Identity/Pages/Account/Lockout.cshtml b/GWMS.UI/Areas/Identity/Pages/Account/Lockout.cshtml new file mode 100644 index 0000000..4eded88 --- /dev/null +++ b/GWMS.UI/Areas/Identity/Pages/Account/Lockout.cshtml @@ -0,0 +1,10 @@ +@page +@model LockoutModel +@{ + ViewData["Title"] = "Locked out"; +} + +This account has been locked out, please try again later.
+You have successfully logged out of the application.
+ } + } ++ There are no external authentication services configured. See this article + for details on setting up this ASP.NET application to support logging in via external services. +
+Your login is protected with an authenticator app. Enter your authenticator code below.
++ Don't have access to your authenticator device? You can + log in with a recovery code. +
+ +@section Scripts { ++ You have requested to log in with a recovery code. This login will not be remembered until you provide + an authenticator app code at log in or disable 2FA and log in again. +
++ Deleting this data will permanently remove your account, and this cannot be recovered. +
++ This action only disables 2FA. +
++ Disabling 2FA does not change the keys used in authenticator apps. If you wish to change the key + used in an authenticator app you should reset your authenticator keys. +
+To use an authenticator app go through the following steps:
++ Download a two-factor authenticator app like Microsoft Authenticator for + Android and + iOS or + Google Authenticator for + Android and + iOS. +
+Scan the QR Code or enter this key @Model.SharedKey into your two factor authenticator app. Spaces and casing do not matter.
+ @*+ Once you have scanned the QR code or input the key above, your two factor authentication app will provide you + with a unique code. Enter the code in the confirmation box below. +
+| @login.ProviderDisplayName | ++ @if (Model.ShowRemoveButton) + { + + } + else + { + @: + } + | +
+ + Put these codes in a safe place. +
++ If you lose your device and don't have the recovery codes you will lose access to your account. +
++ Generating new recovery codes does not change the keys used in authenticator apps. If you wish to change the key + used in an authenticator app you should reset your authenticator keys. +
+Your account contains personal data that you have given us. This page allows you to download or delete that data.
++ Deleting this data will permanently remove your account, and this cannot be recovered. +
+ ++ Delete +
++ + If you reset your authenticator key your authenticator app will not work until you reconfigure it. +
++ This process disables 2FA until you verify your authenticator app. + If you do not complete your authenticator app configuration you may lose access to your account. +
++ You do not have a local username/password for this site. Add a local + account so you can log in without an external login. +
++ Put these codes in a safe place. +
++ If you lose your device and don't have the recovery codes you will lose access to your account. +
+@Model.RecoveryCodes[row]@Model.RecoveryCodes[row + 1]You must generate a new set of recovery codes before you can log in with a recovery code.
+You can generate a new set of recovery codes.
+You should generate a new set of recovery codes.
++ There are no external authentication services configured. See this article + for details on setting up this ASP.NET application to support logging in via external services. +
++ This app does not currently have a real email sender registered, see these docs for how to configure a real email sender. + Normally this would be emailed: Click here to confirm your account +
+ } + else + { ++ Please check your email to confirm your account. +
+ } +} diff --git a/GWMS.UI/Areas/Identity/Pages/Account/RegisterConfirmation.cshtml.cs b/GWMS.UI/Areas/Identity/Pages/Account/RegisterConfirmation.cshtml.cs new file mode 100644 index 0000000..74abbcc --- /dev/null +++ b/GWMS.UI/Areas/Identity/Pages/Account/RegisterConfirmation.cshtml.cs @@ -0,0 +1,75 @@ +using Microsoft.AspNetCore.Authorization; +using System.Text; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Identity; +using Microsoft.AspNetCore.Identity.UI.Services; +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.RazorPages; +using Microsoft.AspNetCore.WebUtilities; + +namespace GWMS.UI.Areas.Identity.Pages.Account +{ + [AllowAnonymous] + public class RegisterConfirmationModel : PageModel + { + #region Private Fields + + private readonly IEmailSender _sender; + private readonly UserManager+ Your password has been reset. Please click here to log in. +
diff --git a/GWMS.UI/Areas/Identity/Pages/Account/ResetPasswordConfirmation.cshtml.cs b/GWMS.UI/Areas/Identity/Pages/Account/ResetPasswordConfirmation.cshtml.cs new file mode 100644 index 0000000..fe7be64 --- /dev/null +++ b/GWMS.UI/Areas/Identity/Pages/Account/ResetPasswordConfirmation.cshtml.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc.RazorPages; + +namespace GWMS.UI.Areas.Identity.Pages.Account +{ + [AllowAnonymous] + public class ResetPasswordConfirmationModel : PageModel + { + #region Public Methods + + public void OnGet() + { + } + + #endregion Public Methods + } +} \ No newline at end of file diff --git a/GWMS.UI/Areas/Identity/Pages/Account/_StatusMessage.cshtml b/GWMS.UI/Areas/Identity/Pages/Account/_StatusMessage.cshtml new file mode 100644 index 0000000..e996841 --- /dev/null +++ b/GWMS.UI/Areas/Identity/Pages/Account/_StatusMessage.cshtml @@ -0,0 +1,10 @@ +@model string + +@if (!String.IsNullOrEmpty(Model)) +{ + var statusMessageClass = Model.StartsWith("Error") ? "danger" : "success"; +
+ Request ID: @Model.RequestId
+
+ Swapping to Development environment will display more detailed information about the error that occurred. +
++ Development environment should not be enabled in deployed applications, as it can result in sensitive information from exceptions being displayed to end users. For local debugging, development environment can be enabled by setting the ASPNETCORE_ENVIRONMENT environment variable to Development, and restarting the application. +
diff --git a/GWMS.UI/Areas/Identity/Pages/Error.cshtml.cs b/GWMS.UI/Areas/Identity/Pages/Error.cshtml.cs new file mode 100644 index 0000000..9c40e59 --- /dev/null +++ b/GWMS.UI/Areas/Identity/Pages/Error.cshtml.cs @@ -0,0 +1,29 @@ +using System.Diagnostics; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.RazorPages; + +namespace GWMS.UI.Areas.Identity.Pages +{ + [AllowAnonymous] + [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] + public class ErrorModel : PageModel + { + #region Public Properties + + public string RequestId { get; set; } + + public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); + + #endregion Public Properties + + #region Public Methods + + public void OnGet() + { + RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; + } + + #endregion Public Methods + } +} \ No newline at end of file diff --git a/GWMS.UI/Areas/Identity/Pages/_ViewImports.cshtml b/GWMS.UI/Areas/Identity/Pages/_ViewImports.cshtml new file mode 100644 index 0000000..57fa35d --- /dev/null +++ b/GWMS.UI/Areas/Identity/Pages/_ViewImports.cshtml @@ -0,0 +1,4 @@ +@using Microsoft.AspNetCore.Identity +@using GWMS.UI.Areas.Identity +@using GWMS.UI.Areas.Identity.Pages +@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers \ No newline at end of file diff --git a/GWMS.UI/Areas/Identity/Pages/_ViewStart.cshtml b/GWMS.UI/Areas/Identity/Pages/_ViewStart.cshtml new file mode 100644 index 0000000..55cd025 --- /dev/null +++ b/GWMS.UI/Areas/Identity/Pages/_ViewStart.cshtml @@ -0,0 +1,4 @@ + +@{ + Layout = "/Pages/Shared/_Layout.cshtml"; +} diff --git a/GWMS.UI/Components/CmpTop.razor b/GWMS.UI/Components/CmpTop.razor index 66772ba..30c172d 100644 --- a/GWMS.UI/Components/CmpTop.razor +++ b/GWMS.UI/Components/CmpTop.razor @@ -7,14 +7,13 @@ @inject AuthenticationStateProvider AuthenticationStateProvider| + | Id | + @*User Name | *@ +User / Email | +Ruolo | +Permessi | ++ |
|---|---|---|---|---|---|---|
| + @if (!ShowPopup) + { + + } + else + { + + } + | +@user.Identity.Id.Substring(0, 4)... | + @*@user.UserName | *@ +@user.Identity.Email | ++ @ShowRoles(user.Roles) + | ++ @ShowClaims(user.Claims) + | ++ @if (!ShowPopup) + { + + } + else + { + + } + | +