diff options
author | vnugent <public@vaughnnugent.com> | 2023-04-12 21:18:05 -0400 |
---|---|---|
committer | vnugent <public@vaughnnugent.com> | 2023-04-12 21:18:05 -0400 |
commit | de7860f1b91ec72a5d0e66aba7f7a7a04a87d038 (patch) | |
tree | 3468a0a25a0424486225cea963c7c357fa8f388e /lib/Net.Rest.Client/src/OAuth2 | |
parent | 228e1b59a2fc24c2e4ce57aa8171a13a1a18c199 (diff) |
RestSharp update, defer plugin configuration to consumer
Diffstat (limited to 'lib/Net.Rest.Client/src/OAuth2')
3 files changed, 5 insertions, 8 deletions
diff --git a/lib/Net.Rest.Client/src/OAuth2/O2ErrorResponseMessage.cs b/lib/Net.Rest.Client/src/OAuth2/O2ErrorResponseMessage.cs index 151c575..f2ffbaa 100644 --- a/lib/Net.Rest.Client/src/OAuth2/O2ErrorResponseMessage.cs +++ b/lib/Net.Rest.Client/src/OAuth2/O2ErrorResponseMessage.cs @@ -1,5 +1,5 @@ /* -* Copyright (c) 2022 Vaughn Nugent +* Copyright (c) 2023 Vaughn Nugent * * Library: VNLib * Package: VNLib.Net.Rest.Client @@ -56,7 +56,7 @@ namespace VNLib.Net.Rest.Client.OAuth2 /// <param name="description">The OAuth2 error description</param> public O2ErrorResponseMessage(string code, string description) { - this.ErrorCode = code; + ErrorCode = code; ErrorDescription = description; } diff --git a/lib/Net.Rest.Client/src/OAuth2/OAuth2AuthenticationException.cs b/lib/Net.Rest.Client/src/OAuth2/OAuth2AuthenticationException.cs index 7176093..96242f2 100644 --- a/lib/Net.Rest.Client/src/OAuth2/OAuth2AuthenticationException.cs +++ b/lib/Net.Rest.Client/src/OAuth2/OAuth2AuthenticationException.cs @@ -1,5 +1,5 @@ /* -* Copyright (c) 2022 Vaughn Nugent +* Copyright (c) 2023 Vaughn Nugent * * Library: VNLib * Package: VNLib.Net.Rest.Client diff --git a/lib/Net.Rest.Client/src/OAuth2/OAuth2Authenticator.cs b/lib/Net.Rest.Client/src/OAuth2/OAuth2Authenticator.cs index b978404..61af299 100644 --- a/lib/Net.Rest.Client/src/OAuth2/OAuth2Authenticator.cs +++ b/lib/Net.Rest.Client/src/OAuth2/OAuth2Authenticator.cs @@ -1,5 +1,5 @@ /* -* Copyright (c) 2022 Vaughn Nugent +* Copyright (c) 2023 Vaughn Nugent * * Library: VNLib * Package: VNLib.Net.Rest.Client @@ -23,7 +23,6 @@ */ using System; -using System.Net; using System.Text.Json; using System.Threading; using System.Threading.Tasks; @@ -34,8 +33,6 @@ using RestSharp.Authenticators; using VNLib.Utils; using VNLib.Utils.Extensions; -#nullable enable - namespace VNLib.Net.Rest.Client.OAuth2 { /// <summary> @@ -72,7 +69,7 @@ namespace VNLib.Net.Rest.Client.OAuth2 _tokenLock = new(1, 1); } - async ValueTask IAuthenticator.Authenticate(RestClient client, RestRequest request) + async ValueTask IAuthenticator.Authenticate(IRestClient client, RestRequest request) { //Wait for access to the token incase another thread is updating it using SemSlimReleaser releaser = await _tokenLock.GetReleaserAsync(CancellationToken.None); |