From e6c9f19f7df236cf80665ac20b5d417c2a657591 Mon Sep 17 00:00:00 2001 From: Andreas Mueller Date: Sun, 7 Aug 2022 20:37:10 +0200 Subject: [PATCH] Added cancellation token to BasicAuthenticationValidator --- .../BasicAuthentication/IBasicAuthenticationValidator.cs | 4 +++- CHANGELOG.md | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/AMWD.Common.AspNetCore/BasicAuthentication/IBasicAuthenticationValidator.cs b/AMWD.Common.AspNetCore/BasicAuthentication/IBasicAuthenticationValidator.cs index b335966..47fd1ef 100644 --- a/AMWD.Common.AspNetCore/BasicAuthentication/IBasicAuthenticationValidator.cs +++ b/AMWD.Common.AspNetCore/BasicAuthentication/IBasicAuthenticationValidator.cs @@ -1,5 +1,6 @@ using System.Net; using System.Security.Claims; +using System.Threading; using System.Threading.Tasks; namespace AMWD.Common.AspNetCore.BasicAuthentication @@ -20,7 +21,8 @@ namespace AMWD.Common.AspNetCore.BasicAuthentication /// A username. /// A password. /// The remote client's IP address. + /// A cancellation token. /// The validated user principal or null. - Task ValidateAsync(string username, string password, IPAddress remoteAddress); + Task ValidateAsync(string username, string password, IPAddress remoteAddress, CancellationToken cancellationToken = default); } } diff --git a/CHANGELOG.md b/CHANGELOG.md index e07cd74..715414e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `IPNetworkArrayFormatter` to serialize arrays of `Microsoft.AspNetCore.HttpOverrides.IPNetwork` - `IPNetworkListFormatter` to serialize lists of `Microsoft.AspNetCore.HttpOverrides.IPNetwork` +### Changed +- `IBasicAuthenticationValidator` has the possibillity to cancel the operation + ## [v1.7.0](https://git.am-wd.de/AM.WD/common/compare/v1.6.1...v1.7.0) - 2022-07-24 ### Added