From ec9b76702e804acd74ddad6db7b14d3ca435f30a Mon Sep 17 00:00:00 2001 From: Stuart Ferguson Date: Tue, 7 Oct 2025 19:56:00 +0100 Subject: [PATCH 1/2] fixes --- SecurityService.Client/SecurityServiceClient.cs | 4 ---- .../Pages/Account/ChangePassword/Index.cshtml.cs | 4 ++-- SecurityService.UserInterface/Pages/Index.cshtml.cs | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/SecurityService.Client/SecurityServiceClient.cs b/SecurityService.Client/SecurityServiceClient.cs index cb6416ff..281602d4 100644 --- a/SecurityService.Client/SecurityServiceClient.cs +++ b/SecurityService.Client/SecurityServiceClient.cs @@ -368,7 +368,6 @@ public async Task> GetApiScope(String apiScopeName, public async Task>> GetApiScopes(CancellationToken cancellationToken) { - List response = null; String requestUri = this.BuildRequestUrl("/api/apiscopes"); try @@ -434,7 +433,6 @@ public async Task> GetClient(String clientId, public async Task>> GetClients(CancellationToken cancellationToken) { - List response = null; String requestUri = this.BuildRequestUrl("/api/clients"); try @@ -569,7 +567,6 @@ public async Task> GetRole(Guid roleId, public async Task>> GetRoles(CancellationToken cancellationToken) { - List response = null; String requestUri = this.BuildRequestUrl("/api/roles"); try @@ -734,7 +731,6 @@ private async Task> GetToken(String tokenRequest, CancellationToken cancellationToken) { String requestUri = this.BuildRequestUrl("/connect/token"); - String content = null; try { diff --git a/SecurityService.UserInterface/Pages/Account/ChangePassword/Index.cshtml.cs b/SecurityService.UserInterface/Pages/Account/ChangePassword/Index.cshtml.cs index b309199d..fd61bfaa 100644 --- a/SecurityService.UserInterface/Pages/Account/ChangePassword/Index.cshtml.cs +++ b/SecurityService.UserInterface/Pages/Account/ChangePassword/Index.cshtml.cs @@ -47,9 +47,9 @@ public async Task OnGet(String returnUrl) return Page(); } - public const String PasswordsDontMatch = "New Password does not match Confirm Password"; + private const String PasswordsDontMatch = "New Password does not match Confirm Password"; - public const String ErrorChangingPassword = "An error occurred changing password"; + private const String ErrorChangingPassword = "An error occurred changing password"; public async Task OnPost(CancellationToken cancellationToken) { await BuildModelAsync(Input.ReturnUrl); diff --git a/SecurityService.UserInterface/Pages/Index.cshtml.cs b/SecurityService.UserInterface/Pages/Index.cshtml.cs index e9191470..8e10f8a6 100644 --- a/SecurityService.UserInterface/Pages/Index.cshtml.cs +++ b/SecurityService.UserInterface/Pages/Index.cshtml.cs @@ -9,7 +9,7 @@ namespace IdentityServerHost.Pages.Home; [AllowAnonymous] public class Index : PageModel { - public string Version; + public string Version { get; private set; } public void OnGet() { From 0cdb4895d77b59fe16c5443fcf0bb3f43c3fdd04 Mon Sep 17 00:00:00 2001 From: Stuart Ferguson Date: Tue, 7 Oct 2025 20:02:22 +0100 Subject: [PATCH 2/2] :| --- .../Pages/Account/ChangePassword/Index.cshtml.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/SecurityService.UserInterface/Pages/Account/ChangePassword/Index.cshtml.cs b/SecurityService.UserInterface/Pages/Account/ChangePassword/Index.cshtml.cs index fd61bfaa..ab445e76 100644 --- a/SecurityService.UserInterface/Pages/Account/ChangePassword/Index.cshtml.cs +++ b/SecurityService.UserInterface/Pages/Account/ChangePassword/Index.cshtml.cs @@ -47,9 +47,9 @@ public async Task OnGet(String returnUrl) return Page(); } - private const String PasswordsDontMatch = "New Password does not match Confirm Password"; + private const String DontMatchMessage = "New Password does not match Confirm Password"; - private const String ErrorChangingPassword = "An error occurred changing password"; + private const String ErrorChangingMessage = "An error occurred changing password"; public async Task OnPost(CancellationToken cancellationToken) { await BuildModelAsync(Input.ReturnUrl); @@ -60,7 +60,7 @@ public async Task OnPost(CancellationToken cancellationToken) { if (String.CompareOrdinal(Input.NewPassword, Input.ConfirmPassword) != 0) { await BuildModelAsync(Input.ReturnUrl); - ModelState.AddModelError(String.Empty, PasswordsDontMatch); + ModelState.AddModelError(String.Empty, DontMatchMessage); return this.Page(); } @@ -68,7 +68,7 @@ public async Task OnPost(CancellationToken cancellationToken) { Result? result = await this.Mediator.Send(command, cancellationToken); if (result.IsFailed) { - ModelState.AddModelError(String.Empty, ErrorChangingPassword); + ModelState.AddModelError(String.Empty, ErrorChangingMessage); return this.Page(); }