3 changed files
WPE.App.Authentication.Maui | ||
Business | ||
AuthorizationMessageHandler.cs | ||
SubscriptionKeyHandler.cs | ||
WPE.App.Authentication.Maui.csproj | ||
AuthorizationMessageHandler.cs
/WPE.App.Authentication.Maui/Business/AuthorizationMessageHandler.cs-7+2/WPE.App.Authentication.Maui/Business/AuthorizationMessageHandler.cs
Add comment 3
Add comment 4 namespace Infsoft.WPE.App.Authentication.Maui.Business
Add comment 5 {
Add comment 6 Minus internal class AuthorizationMessageHandler(ITokenManager TokenManager) : DelegatingHandler, IDisposable
Add comment 6 Plus internal partial class AuthorizationMessageHandler(ITokenManager TokenManager) : DelegatingHandler
Add comment 7 {
Add comment 8 private AuthenticationHeaderValue? cachedHeader;
Add comment 9 private AccessToken? lastToken = null;
Add comment 34 return await base.SendAsync(request, cancellationToken);
Add comment 35 }
Add comment 36
Add comment 37 Minus void IDisposable.Dispose()
Add comment 38 Minus {
Add comment 39 Minus Dispose(disposing: true);
Add comment 40 Minus }
Add comment 41 Minus
Add comment 42 Minus private class AccessToken
Add comment 37 Plus private sealed class AccessToken
Add comment 43 38 {
Add comment 44 39 public required DateTime Expiry { get; set; }
Add comment 45 40 public required string Token { get; set; }
SubscriptionKeyHandler.cs
/WPE.App.Authentication.Maui/Business/SubscriptionKeyHandler.cs-1+1/WPE.App.Authentication.Maui/Business/SubscriptionKeyHandler.cs
Add comment 3
Add comment 4 namespace Infsoft.WPE.App.Authentication.Maui.Business
Add comment 5 {
Add comment 6 Minus internal class SubscriptionKeyHandler(IOptions<SubscriptionKeyConfiguration> Options) : DelegatingHandler
Add comment 6 Plus internal partial class SubscriptionKeyHandler(IOptions<SubscriptionKeyConfiguration> Options) : DelegatingHandler
Add comment 7 {
Add comment 8 /// <inheritdoc />
Add comment 9 protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
WPE.App.Authentication.Maui.csproj
/WPE.App.Authentication.Maui/WPE.App.Authentication.Maui.csproj/WPE.App.Authentication.Maui/WPE.App.Authentication.Maui.csproj