From e11f55b75da9dce94aabf590a8b4491f9a8d105e Mon Sep 17 00:00:00 2001 From: Frederik Prijck Date: Mon, 15 Feb 2021 09:13:51 +0100 Subject: [PATCH] Ensure await is using ConfigureAwait (#474) --- src/Auth0.AuthenticationApi/Tokens/IdTokenValidator.cs | 2 +- src/Auth0.AuthenticationApi/Tokens/JsonWebKeys.cs | 2 +- src/Auth0.Core/Exceptions/ApiException.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Auth0.AuthenticationApi/Tokens/IdTokenValidator.cs b/src/Auth0.AuthenticationApi/Tokens/IdTokenValidator.cs index 37ff09b0e..87b7c2f74 100644 --- a/src/Auth0.AuthenticationApi/Tokens/IdTokenValidator.cs +++ b/src/Auth0.AuthenticationApi/Tokens/IdTokenValidator.cs @@ -16,7 +16,7 @@ public async Task Assert(IdTokenRequirements requirements, string idToken, strin if (string.IsNullOrWhiteSpace(idToken)) throw new IdTokenValidationException("ID token is required but missing."); - var verifiedToken = await DecodeSignedToken(requirements, idToken, clientSecret); + var verifiedToken = await DecodeSignedToken(requirements, idToken, clientSecret).ConfigureAwait(false); IdTokenClaimValidator.AssertClaimsMeetRequirements(requirements, verifiedToken, pointInTime ?? DateTime.Now); } diff --git a/src/Auth0.AuthenticationApi/Tokens/JsonWebKeys.cs b/src/Auth0.AuthenticationApi/Tokens/JsonWebKeys.cs index ff813a8ce..2a47cd37b 100644 --- a/src/Auth0.AuthenticationApi/Tokens/JsonWebKeys.cs +++ b/src/Auth0.AuthenticationApi/Tokens/JsonWebKeys.cs @@ -11,7 +11,7 @@ static class JsonWebKeys public static async Task GetForIssuer(string issuer) { var metadataAddress = new UriBuilder(issuer) { Path = "/.well-known/openid-configuration" }.Uri.OriginalString; - var openIdConfiguration = await GetOpenIdConfiguration(metadataAddress); + var openIdConfiguration = await GetOpenIdConfiguration(metadataAddress).ConfigureAwait(false); return openIdConfiguration.JsonWebKeySet; } diff --git a/src/Auth0.Core/Exceptions/ApiException.cs b/src/Auth0.Core/Exceptions/ApiException.cs index 45d013519..8ac1bfce9 100644 --- a/src/Auth0.Core/Exceptions/ApiException.cs +++ b/src/Auth0.Core/Exceptions/ApiException.cs @@ -58,7 +58,7 @@ public static async Task CreateSpecificExceptionAsync(HttpResponse case 429: return RateLimitApiException.Create(response); default: - return await ErrorApiException.CreateAsync(response); + return await ErrorApiException.CreateAsync(response).ConfigureAwait(false); } } }