From c51d02a59718daf8b807e0103ac4381fca1f28dc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Nov 2026 23:49:20 +0000 Subject: [PATCH 1/4] Bump the duende group with 4 updates Bumps Duende.IdentityServer from 7.3.2 to 8.0.11 Bumps Duende.IdentityServer.AspNetIdentity from 7.3.2 to 8.0.11 Bumps Duende.IdentityServer.EntityFramework from 7.3.2 to 8.0.11 Bumps Duende.IdentityServer.Storage from 7.3.2 to 8.0.11 --- updated-dependencies: - dependency-name: Duende.IdentityServer dependency-version: 8.0.11 dependency-type: direct:production update-type: version-update:semver-major dependency-group: duende - dependency-name: Duende.IdentityServer.Storage dependency-version: 8.0.11 dependency-type: direct:production update-type: version-update:semver-major dependency-group: duende - dependency-name: Duende.IdentityServer.AspNetIdentity dependency-version: 8.0.11 dependency-type: direct:production update-type: version-update:semver-major dependency-group: duende - dependency-name: Duende.IdentityServer.EntityFramework dependency-version: 8.0.11 dependency-type: direct:production update-type: version-update:semver-major dependency-group: duende ... Signed-off-by: dependabot[bot] --- Directory.Packages.props | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 0f490d79a..a62e363a1 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -65,11 +65,11 @@ - - - + + + - + From 1bf47f636f9069ac89ede60d50074b4d8b23ea11 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Nov 2026 23:49:20 +0000 Subject: [PATCH 2/4] Bump the duende group with 4 updates Bumps Duende.IdentityServer from 7.3.2 to 8.0.11 Bumps Duende.IdentityServer.AspNetIdentity from 7.3.2 to 8.0.11 Bumps Duende.IdentityServer.EntityFramework from 7.3.2 to 8.0.11 Bumps Duende.IdentityServer.Storage from 7.3.2 to 8.0.11 --- updated-dependencies: - dependency-name: Duende.IdentityServer dependency-version: 8.0.11 dependency-type: direct:production update-type: version-update:semver-major dependency-group: duende - dependency-name: Duende.IdentityServer.Storage dependency-version: 8.0.11 dependency-type: direct:production update-type: version-update:semver-major dependency-group: duende - dependency-name: Duende.IdentityServer.AspNetIdentity dependency-version: 8.0.11 dependency-type: direct:production update-type: version-update:semver-major dependency-group: duende - dependency-name: Duende.IdentityServer.EntityFramework dependency-version: 8.0.11 dependency-type: direct:production update-type: version-update:semver-major dependency-group: duende ... Signed-off-by: dependabot[bot] --- Directory.Packages.props | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 1e725f654..5c3aa740b 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -66,11 +66,11 @@ - - - + + + - + From b5c460168d8f5fde9d17a2f2412ccc6f8ac55673 Mon Sep 17 00:00:00 2001 From: damianedwards Date: Mon, 16 Nov 2026 17:59:36 -0800 Subject: [PATCH 3/4] Fix Duende 8.0.11 dependency and API compatibility Align EntityFramework.Storage, migrate identity interactions and request cancellation, and cover login cancellation and diagnostics decoding. Preserve the .NET 11 EF/Npgsql dependency pins. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- Directory.Packages.props | 2 +- .../Quickstart/Account/AccountController.cs | 20 +++---- .../Quickstart/Account/ExternalController.cs | 4 +- .../Quickstart/Consent/ConsentController.cs | 14 ++--- .../Quickstart/Device/DeviceController.cs | 12 ++--- .../Diagnostics/DiagnosticsViewModel.cs | 3 +- .../Quickstart/Grants/GrantsController.cs | 10 ++-- .../Quickstart/Home/HomeController.cs | 2 +- src/Identity.API/Services/ProfileService.cs | 4 +- .../IdentityConfigurationTests.cs | 53 +++++++++++++++++++ 10 files changed, 89 insertions(+), 35 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 5c3aa740b..8314fe57e 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -69,7 +69,7 @@ - + diff --git a/src/Identity.API/Quickstart/Account/AccountController.cs b/src/Identity.API/Quickstart/Account/AccountController.cs index e0aef7b95..90cca35a4 100644 --- a/src/Identity.API/Quickstart/Account/AccountController.cs +++ b/src/Identity.API/Quickstart/Account/AccountController.cs @@ -61,7 +61,7 @@ public async Task Login(string returnUrl) public async Task Login(LoginInputModel model, string button) { // check if we are in the context of an authorization request - var context = await _interaction.GetAuthorizationContextAsync(model.ReturnUrl); + var context = await _interaction.GetAuthorizationContextAsync(model.ReturnUrl, HttpContext.RequestAborted); // the user clicked the "cancel" button if (button != "login") @@ -71,7 +71,7 @@ public async Task Login(LoginInputModel model, string button) // if the user cancels, send a result back into IdentityServer as if they // denied the consent (even if this client does not require consent). // this will send back an access denied OIDC error response to the client. - await _interaction.DenyAuthorizationAsync(context, AuthorizationError.AccessDenied); + await _interaction.DenyAuthenticationAsync(context, InteractionError.AccessDenied, HttpContext.RequestAborted); // we can trust model.ReturnUrl since GetAuthorizationContextAsync returned non-null if (context.IsNativeClient()) @@ -96,7 +96,7 @@ public async Task Login(LoginInputModel model, string button) if (result.Succeeded) { var user = await _userManager.FindByNameAsync(model.Username); - await _events.RaiseAsync(new UserLoginSuccessEvent(user.UserName, user.Id, user.UserName, clientId: context?.Client.ClientId)); + await _events.RaiseAsync(new UserLoginSuccessEvent(user.UserName, user.Id, user.UserName, clientId: context?.Client.ClientId), HttpContext.RequestAborted); if (context != null) { @@ -127,7 +127,7 @@ public async Task Login(LoginInputModel model, string button) } } - await _events.RaiseAsync(new UserLoginFailureEvent(model.Username, "invalid credentials", clientId: context?.Client.ClientId)); + await _events.RaiseAsync(new UserLoginFailureEvent(model.Username, "invalid credentials", clientId: context?.Client.ClientId), HttpContext.RequestAborted); ModelState.AddModelError(string.Empty, AccountOptions.InvalidCredentialsErrorMessage); } @@ -175,7 +175,7 @@ public async Task Logout(LogoutInputModel model) await _signInManager.SignOutAsync(); // raise the logout event - await _events.RaiseAsync(new UserLogoutSuccessEvent(User.GetSubjectId(), User.GetDisplayName())); + await _events.RaiseAsync(new UserLogoutSuccessEvent(User.GetSubjectId(), User.GetDisplayName()), HttpContext.RequestAborted); } // check if we need to trigger sign-out at an upstream identity provider @@ -205,7 +205,7 @@ public IActionResult AccessDenied() /*****************************************/ private async Task BuildLoginViewModelAsync(string returnUrl) { - var context = await _interaction.GetAuthorizationContextAsync(returnUrl); + var context = await _interaction.GetAuthorizationContextAsync(returnUrl, HttpContext.RequestAborted); if (context?.IdP != null && await _schemeProvider.GetSchemeAsync(context.IdP) != null) { var local = context.IdP == IdentityServerConstants.LocalIdentityProvider; @@ -239,7 +239,7 @@ private async Task BuildLoginViewModelAsync(string returnUrl) var allowLocal = true; if (context?.Client.ClientId != null) { - var client = await _clientStore.FindEnabledClientByIdAsync(context.Client.ClientId); + var client = await _clientStore.FindEnabledClientByIdAsync(context.Client.ClientId, HttpContext.RequestAborted); if (client != null) { allowLocal = client.EnableLocalLogin; @@ -280,7 +280,7 @@ private async Task BuildLogoutViewModelAsync(string logoutId) return vm; } - var context = await _interaction.GetLogoutContextAsync(logoutId); + var context = await _interaction.GetLogoutContextAsync(logoutId, HttpContext.RequestAborted); if (context?.ShowSignoutPrompt == false) { // it's safe to automatically sign-out @@ -296,7 +296,7 @@ private async Task BuildLogoutViewModelAsync(string logoutId) private async Task BuildLoggedOutViewModelAsync(string logoutId) { // get context information (client name, post logout redirect URI and iframe for federated signout) - var logout = await _interaction.GetLogoutContextAsync(logoutId); + var logout = await _interaction.GetLogoutContextAsync(logoutId, HttpContext.RequestAborted); var vm = new LoggedOutViewModel { @@ -320,7 +320,7 @@ private async Task BuildLoggedOutViewModelAsync(string logou // if there's no current logout context, we need to create one // this captures necessary info from the current logged in user // before we signout and redirect away to the external IdP for signout - vm.LogoutId = await _interaction.CreateLogoutContextAsync(); + vm.LogoutId = await _interaction.CreateLogoutContextAsync(HttpContext.RequestAborted); } vm.ExternalAuthenticationScheme = idp; diff --git a/src/Identity.API/Quickstart/Account/ExternalController.cs b/src/Identity.API/Quickstart/Account/ExternalController.cs index 5abc2fa3b..5fd0be9d5 100644 --- a/src/Identity.API/Quickstart/Account/ExternalController.cs +++ b/src/Identity.API/Quickstart/Account/ExternalController.cs @@ -116,8 +116,8 @@ public async Task Callback() var returnUrl = result.Properties.Items["returnUrl"] ?? "~/"; // check if external login is in the context of an OIDC request - var context = await _interaction.GetAuthorizationContextAsync(returnUrl); - await _events.RaiseAsync(new UserLoginSuccessEvent(provider, providerUserId, user.Id, name, true, context?.Client.ClientId)); + var context = await _interaction.GetAuthorizationContextAsync(returnUrl, HttpContext.RequestAborted); + await _events.RaiseAsync(new UserLoginSuccessEvent(provider, providerUserId, user.Id, name, true, context?.Client.ClientId), HttpContext.RequestAborted); if (context != null) { diff --git a/src/Identity.API/Quickstart/Consent/ConsentController.cs b/src/Identity.API/Quickstart/Consent/ConsentController.cs index 2cdf323ec..dfcab25d7 100644 --- a/src/Identity.API/Quickstart/Consent/ConsentController.cs +++ b/src/Identity.API/Quickstart/Consent/ConsentController.cs @@ -52,7 +52,7 @@ public async Task Index(ConsentInputModel model) if (result.IsRedirect) { - var context = await _interaction.GetAuthorizationContextAsync(model.ReturnUrl); + var context = await _interaction.GetAuthorizationContextAsync(model.ReturnUrl, HttpContext.RequestAborted); if (context?.IsNativeClient() == true) { // The client is native, so this change in how to @@ -84,7 +84,7 @@ private async Task ProcessConsent(ConsentInputModel model) var result = new ProcessConsentResult(); // validate return url is still valid - var request = await _interaction.GetAuthorizationContextAsync(model.ReturnUrl); + var request = await _interaction.GetAuthorizationContextAsync(model.ReturnUrl, HttpContext.RequestAborted); if (request == null) return result; ConsentResponse grantedConsent = null; @@ -92,10 +92,10 @@ private async Task ProcessConsent(ConsentInputModel model) // user clicked 'no' - send back the standard 'access_denied' response if (model?.Button == "no") { - grantedConsent = new ConsentResponse { Error = AuthorizationError.AccessDenied }; + grantedConsent = new ConsentResponse { Error = InteractionError.AccessDenied }; // emit event - await _events.RaiseAsync(new ConsentDeniedEvent(User.GetSubjectId(), request.Client.ClientId, request.ValidatedResources.RawScopeValues)); + await _events.RaiseAsync(new ConsentDeniedEvent(User.GetSubjectId(), request.Client.ClientId, request.ValidatedResources.RawScopeValues), HttpContext.RequestAborted); } // user clicked 'yes' - validate the data else if (model?.Button == "yes") @@ -117,7 +117,7 @@ private async Task ProcessConsent(ConsentInputModel model) }; // emit event - await _events.RaiseAsync(new ConsentGrantedEvent(User.GetSubjectId(), request.Client.ClientId, request.ValidatedResources.RawScopeValues, grantedConsent.ScopesValuesConsented, grantedConsent.RememberConsent)); + await _events.RaiseAsync(new ConsentGrantedEvent(User.GetSubjectId(), request.Client.ClientId, request.ValidatedResources.RawScopeValues, grantedConsent.ScopesValuesConsented, grantedConsent.RememberConsent), HttpContext.RequestAborted); } else { @@ -132,7 +132,7 @@ private async Task ProcessConsent(ConsentInputModel model) if (grantedConsent != null) { // communicate outcome of consent back to identityserver - await _interaction.GrantConsentAsync(request, grantedConsent); + await _interaction.GrantConsentAsync(request, grantedConsent, HttpContext.RequestAborted); // indicate that's it ok to redirect back to authorization endpoint result.RedirectUri = model.ReturnUrl; @@ -149,7 +149,7 @@ private async Task ProcessConsent(ConsentInputModel model) private async Task BuildViewModelAsync(string returnUrl, ConsentInputModel model = null) { - var request = await _interaction.GetAuthorizationContextAsync(returnUrl); + var request = await _interaction.GetAuthorizationContextAsync(returnUrl, HttpContext.RequestAborted); if (request != null) { return CreateConsentViewModel(model, returnUrl, request); diff --git a/src/Identity.API/Quickstart/Device/DeviceController.cs b/src/Identity.API/Quickstart/Device/DeviceController.cs index 5eb55caad..a53b17a52 100644 --- a/src/Identity.API/Quickstart/Device/DeviceController.cs +++ b/src/Identity.API/Quickstart/Device/DeviceController.cs @@ -64,7 +64,7 @@ private async Task ProcessConsent(DeviceAuthorizationInput { var result = new ProcessConsentResult(); - var request = await _interaction.GetAuthorizationContextAsync(model.UserCode); + var request = await _interaction.GetAuthorizationContextAsync(model.UserCode, HttpContext.RequestAborted); if (request == null) return result; ConsentResponse grantedConsent = null; @@ -72,10 +72,10 @@ private async Task ProcessConsent(DeviceAuthorizationInput // user clicked 'no' - send back the standard 'access_denied' response if (model.Button == "no") { - grantedConsent = new ConsentResponse { Error = AuthorizationError.AccessDenied }; + grantedConsent = new ConsentResponse { Error = InteractionError.AccessDenied }; // emit event - await _events.RaiseAsync(new ConsentDeniedEvent(User.GetSubjectId(), request.Client.ClientId, request.ValidatedResources.RawScopeValues)); + await _events.RaiseAsync(new ConsentDeniedEvent(User.GetSubjectId(), request.Client.ClientId, request.ValidatedResources.RawScopeValues), HttpContext.RequestAborted); } // user clicked 'yes' - validate the data else if (model.Button == "yes") @@ -97,7 +97,7 @@ private async Task ProcessConsent(DeviceAuthorizationInput }; // emit event - await _events.RaiseAsync(new ConsentGrantedEvent(User.GetSubjectId(), request.Client.ClientId, request.ValidatedResources.RawScopeValues, grantedConsent.ScopesValuesConsented, grantedConsent.RememberConsent)); + await _events.RaiseAsync(new ConsentGrantedEvent(User.GetSubjectId(), request.Client.ClientId, request.ValidatedResources.RawScopeValues, grantedConsent.ScopesValuesConsented, grantedConsent.RememberConsent), HttpContext.RequestAborted); } else { @@ -112,7 +112,7 @@ private async Task ProcessConsent(DeviceAuthorizationInput if (grantedConsent != null) { // communicate outcome of consent back to identityserver - await _interaction.HandleRequestAsync(model.UserCode, grantedConsent); + await _interaction.HandleRequestAsync(model.UserCode, grantedConsent, HttpContext.RequestAborted); // indicate that's it ok to redirect back to authorization endpoint result.RedirectUri = model.ReturnUrl; @@ -129,7 +129,7 @@ private async Task ProcessConsent(DeviceAuthorizationInput private async Task BuildViewModelAsync(string userCode, DeviceAuthorizationInputModel model = null) { - var request = await _interaction.GetAuthorizationContextAsync(userCode); + var request = await _interaction.GetAuthorizationContextAsync(userCode, HttpContext.RequestAborted); if (request != null) { return CreateConsentViewModel(userCode, model, request); diff --git a/src/Identity.API/Quickstart/Diagnostics/DiagnosticsViewModel.cs b/src/Identity.API/Quickstart/Diagnostics/DiagnosticsViewModel.cs index 6f87fd1d7..0f965777c 100644 --- a/src/Identity.API/Quickstart/Diagnostics/DiagnosticsViewModel.cs +++ b/src/Identity.API/Quickstart/Diagnostics/DiagnosticsViewModel.cs @@ -2,6 +2,7 @@ // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. +using System.Buffers.Text; using System.Text; using System.Text.Json; @@ -16,7 +17,7 @@ public DiagnosticsViewModel(AuthenticateResult result) if (result.Properties.Items.ContainsKey("client_list")) { var encoded = result.Properties.Items["client_list"]; - var bytes = Base64Url.Decode(encoded); + var bytes = Base64Url.DecodeFromChars(encoded); var value = Encoding.UTF8.GetString(bytes); Clients = JsonSerializer.Deserialize(value); diff --git a/src/Identity.API/Quickstart/Grants/GrantsController.cs b/src/Identity.API/Quickstart/Grants/GrantsController.cs index 3045c44d5..0bdf7c6d6 100644 --- a/src/Identity.API/Quickstart/Grants/GrantsController.cs +++ b/src/Identity.API/Quickstart/Grants/GrantsController.cs @@ -42,23 +42,23 @@ public async Task Index() [ValidateAntiForgeryToken] public async Task Revoke(string clientId) { - await _interaction.RevokeUserConsentAsync(clientId); - await _events.RaiseAsync(new GrantsRevokedEvent(User.GetSubjectId(), clientId)); + await _interaction.RevokeUserConsentAsync(clientId, HttpContext.RequestAborted); + await _events.RaiseAsync(new GrantsRevokedEvent(User.GetSubjectId(), clientId), HttpContext.RequestAborted); return RedirectToAction("Index"); } private async Task BuildViewModelAsync() { - var grants = await _interaction.GetAllUserGrantsAsync(); + var grants = await _interaction.GetAllUserGrantsAsync(HttpContext.RequestAborted); var list = new List(); foreach (var grant in grants) { - var client = await _clients.FindClientByIdAsync(grant.ClientId); + var client = await _clients.FindClientByIdAsync(grant.ClientId, HttpContext.RequestAborted); if (client != null) { - var resources = await _resources.FindResourcesByScopeAsync(grant.Scopes); + var resources = await _resources.FindResourcesByScopeAsync(grant.Scopes, HttpContext.RequestAborted); var item = new GrantViewModel() { diff --git a/src/Identity.API/Quickstart/Home/HomeController.cs b/src/Identity.API/Quickstart/Home/HomeController.cs index 27f4d73cc..6de69cdad 100644 --- a/src/Identity.API/Quickstart/Home/HomeController.cs +++ b/src/Identity.API/Quickstart/Home/HomeController.cs @@ -41,7 +41,7 @@ public async Task Error(string errorId) var vm = new ErrorViewModel(); // retrieve error details from identityserver - var message = await _interaction.GetErrorContextAsync(errorId); + var message = await _interaction.GetErrorContextAsync(errorId, HttpContext.RequestAborted); if (message != null) { vm.Error = message; diff --git a/src/Identity.API/Services/ProfileService.cs b/src/Identity.API/Services/ProfileService.cs index f42a50fad..225d2cfdc 100644 --- a/src/Identity.API/Services/ProfileService.cs +++ b/src/Identity.API/Services/ProfileService.cs @@ -9,7 +9,7 @@ public ProfileService(UserManager userManager) _userManager = userManager; } - public async Task GetProfileDataAsync(ProfileDataRequestContext context) + public async Task GetProfileDataAsync(ProfileDataRequestContext context, CancellationToken ct) { var subject = context.Subject ?? throw new ArgumentNullException(nameof(context.Subject)); @@ -23,7 +23,7 @@ public async Task GetProfileDataAsync(ProfileDataRequestContext context) context.IssuedClaims = claims.ToList(); } - public async Task IsActiveAsync(IsActiveContext context) + public async Task IsActiveAsync(IsActiveContext context, CancellationToken ct) { var subject = context.Subject ?? throw new ArgumentNullException(nameof(context.Subject)); diff --git a/tests/Application.UnitTests/IdentityConfigurationTests.cs b/tests/Application.UnitTests/IdentityConfigurationTests.cs index 0fcf5b946..723491b75 100644 --- a/tests/Application.UnitTests/IdentityConfigurationTests.cs +++ b/tests/Application.UnitTests/IdentityConfigurationTests.cs @@ -1,5 +1,12 @@ +using System.Security.Claims; +using Duende.IdentityServer.Models; +using Duende.IdentityServer.Services; using eShop.Identity.API.Configuration; using eShop.Identity.API.Services; +using IdentityServerHost.Quickstart.UI; +using Microsoft.AspNetCore.Authentication; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Configuration; namespace eShop.Application.UnitTests; @@ -48,4 +55,50 @@ public void RedirectServiceExtractsConfiguredRedirect(string returnUrl, string e Assert.AreEqual(expected, service.ExtractRedirectUriFromReturnUrl(returnUrl)); } + + [TestMethod] + [DataRow("https://web.test/signin-oidc", false)] + [DataRow("maui://callback", true)] + public async Task CancellingLoginDeniesAuthenticationWithRequestCancellation(string redirectUri, bool nativeClient) + { + const string returnUrl = "/connect/authorize/callback?client_id=webapp"; + using var cancellation = new CancellationTokenSource(); + var interaction = Substitute.For(); + var request = new AuthorizationRequest { RedirectUri = redirectUri }; + interaction.GetAuthorizationContextAsync(returnUrl, cancellation.Token).Returns(request); + var controller = new AccountController(null!, null!, interaction, null!, null!, null!, null!) + { + ControllerContext = new ControllerContext + { + HttpContext = new DefaultHttpContext { RequestAborted = cancellation.Token } + } + }; + + var result = await controller.Login(new LoginInputModel { ReturnUrl = returnUrl }, "cancel"); + + await interaction.Received(1).DenyAuthenticationAsync(request, InteractionError.AccessDenied, cancellation.Token); + if (nativeClient) + { + var view = (ViewResult)result; + Assert.AreEqual("Redirect", view.ViewName); + Assert.AreEqual(returnUrl, ((RedirectViewModel)view.Model!).RedirectUrl); + } + else + { + Assert.AreEqual(returnUrl, ((RedirectResult)result).Url); + } + } + + [TestMethod] + [DataRow("WyJ3ZWJhcHAiLCJtYXVpIl0")] + [DataRow("WyJ3ZWJhcHAiLCJtYXVpIl0=")] + public void DiagnosticsDecodesClientList(string encoded) + { + var properties = new AuthenticationProperties(new Dictionary { ["client_list"] = encoded }); + var ticket = new AuthenticationTicket(new ClaimsPrincipal(), properties, "test"); + + var model = new DiagnosticsViewModel(AuthenticateResult.Success(ticket)); + + Assert.AreSequenceEqual(new[] { "webapp", "maui" }, model.Clients); + } } From 36403462447676938d6e3fdb0c588ffc024499da Mon Sep 17 00:00:00 2001 From: damianedwards Date: Tue, 17 Nov 2026 13:53:40 -0800 Subject: [PATCH 4/4] Fix PR assertion and deprecated action runtime warnings Use current MSTest collection assertions and Node.js 24 action runtimes in PR validation, browser tests, and Markdown lint workflows. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .github/workflows/markdownlint.yml | 4 ++-- .github/workflows/playwright.yml | 8 ++++---- .github/workflows/pr-validation.yml | 4 ++-- .../IdentityConfigurationTests.cs | 12 ++++++------ tests/Application.UnitTests/WebhookClientTests.cs | 2 +- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/markdownlint.yml b/.github/workflows/markdownlint.yml index 65a4c870e..bc4e29746 100644 --- a/.github/workflows/markdownlint.yml +++ b/.github/workflows/markdownlint.yml @@ -14,9 +14,9 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Use Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v5 with: node-version: 20.x - name: Run Markdownlint diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index c766fe65d..a41eaa97b 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -19,11 +19,11 @@ jobs: timeout-minutes: 60 runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-dotnet@v4 + - uses: actions/checkout@v5 + - uses: actions/setup-dotnet@v5 with: dotnet-version: '11.0.x' - - uses: actions/setup-node@v4 + - uses: actions/setup-node@v5 with: node-version: lts/* - name: Install dependencies @@ -36,7 +36,7 @@ jobs: ESHOP_USE_HTTP_ENDPOINTS: 1 USERNAME1: bob PASSWORD: Pass123$ - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v6 if: always() with: name: playwright-report diff --git a/.github/workflows/pr-validation.yml b/.github/workflows/pr-validation.yml index 77431a0ca..8c4e72dde 100644 --- a/.github/workflows/pr-validation.yml +++ b/.github/workflows/pr-validation.yml @@ -20,9 +20,9 @@ jobs: test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Setup .NET (global.json) - uses: actions/setup-dotnet@v3 + uses: actions/setup-dotnet@v5 - name: Build run: dotnet build eShop.Web.slnf - name: Test diff --git a/tests/Application.UnitTests/IdentityConfigurationTests.cs b/tests/Application.UnitTests/IdentityConfigurationTests.cs index 723491b75..2d53f4461 100644 --- a/tests/Application.UnitTests/IdentityConfigurationTests.cs +++ b/tests/Application.UnitTests/IdentityConfigurationTests.cs @@ -20,8 +20,8 @@ public void ApiResourcesAndScopesStayAligned() var resources = Config.GetApis().Select(resource => resource.Name).Order().ToArray(); var scopes = Config.GetApiScopes().Select(scope => scope.Name).Order().ToArray(); - CollectionAssert.AreEqual(resources, scopes); - CollectionAssert.AreEquivalent(new[] { "basket", "orders", "webhooks" }, scopes); + Assert.AreSequenceEqual(resources, scopes); + Assert.AreSequenceEqual(new[] { "basket", "orders", "webhooks" }, scopes); } [TestMethod] @@ -40,10 +40,10 @@ public void ClientsUseConfiguredCallbackUrlsAndExpectedScopes() var clients = Config.GetClients(configuration).ToDictionary(client => client.ClientId); - CollectionAssert.Contains(clients["webapp"].RedirectUris.ToList(), "https://webapp.test/signin-oidc"); - CollectionAssert.Contains(clients["webhooksclient"].AllowedScopes.ToList(), "webhooks"); - CollectionAssert.Contains(clients["maui"].AllowedScopes.ToList(), "basket"); - CollectionAssert.Contains(clients["maui"].AllowedScopes.ToList(), "orders"); + Assert.Contains("https://webapp.test/signin-oidc", clients["webapp"].RedirectUris); + Assert.Contains("webhooks", clients["webhooksclient"].AllowedScopes); + Assert.Contains("basket", clients["maui"].AllowedScopes); + Assert.Contains("orders", clients["maui"].AllowedScopes); } [TestMethod] diff --git a/tests/Application.UnitTests/WebhookClientTests.cs b/tests/Application.UnitTests/WebhookClientTests.cs index 998a93573..c71ad4931 100644 --- a/tests/Application.UnitTests/WebhookClientTests.cs +++ b/tests/Application.UnitTests/WebhookClientTests.cs @@ -34,7 +34,7 @@ public async Task HooksRepositoryStoresHooksAndNotifiesActiveSubscribers() await repository.AddNew(hook); Assert.AreEqual(1, notifications); - CollectionAssert.Contains((await repository.GetAll()).ToList(), hook); + Assert.Contains(hook, await repository.GetAll()); } [TestMethod]