From e8e13e4b78dfdecc095903a59ffd5f68bed12a22 Mon Sep 17 00:00:00 2001 From: fangyangci <133664123+fangyangci@users.noreply.github.com> Date: Thu, 21 Dec 2023 21:49:25 +0800 Subject: [PATCH] fix: AseChannelValidation need throw when appid is not valid. (#6721) * fixUSGovSingleTenant * Add UT * AseChannelValidation * Add UT * Rollback AuthTenant Property Name * The Ctor do contains the old ones, Add Ctor to ApiCompatBaseline * fix a coding mistake --- .../Authentication/AseChannelValidation.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/Microsoft.Bot.Connector/Authentication/AseChannelValidation.cs b/libraries/Microsoft.Bot.Connector/Authentication/AseChannelValidation.cs index 923d7c0f0c..7cb54b5a27 100644 --- a/libraries/Microsoft.Bot.Connector/Authentication/AseChannelValidation.cs +++ b/libraries/Microsoft.Bot.Connector/Authentication/AseChannelValidation.cs @@ -190,7 +190,7 @@ public static async Task AuthenticateAseTokenAsync(string authHe if (!await _credentialProvider.IsValidAppIdAsync(appID).ConfigureAwait(false)) { - await Console.Out.WriteLineAsync(appID).ConfigureAwait(false); + throw new UnauthorizedAccessException($"AseChannelValidation Invalid AppId passed on token: {appID}"); } return identity;