From f1239fb249aaef879cb03eeead0368ea556b34c3 Mon Sep 17 00:00:00 2001 From: fangyangci Date: Mon, 18 Dec 2023 11:06:06 +0800 Subject: [PATCH 1/2] Rollback AuthTenant Property Name --- .../Authentication/AppCredentials.cs | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/libraries/Microsoft.Bot.Connector/Authentication/AppCredentials.cs b/libraries/Microsoft.Bot.Connector/Authentication/AppCredentials.cs index 8b618c4ee4..3377a3039c 100644 --- a/libraries/Microsoft.Bot.Connector/Authentication/AppCredentials.cs +++ b/libraries/Microsoft.Bot.Connector/Authentication/AppCredentials.cs @@ -36,8 +36,6 @@ public abstract class AppCredentials : ServiceClientCredentials private string _oAuthScope; - private string _channelAuthTenant; - /// /// Initializes a new instance of the class. /// @@ -80,9 +78,9 @@ public AppCredentials(string channelAuthTenant = null, HttpClient customHttpClie /// public virtual string ChannelAuthTenant { - get => string.IsNullOrEmpty(_channelAuthTenant) + get => string.IsNullOrEmpty(AuthTenant) ? DefaultChannelAuthTenant - : _channelAuthTenant; + : AuthTenant; set { // Advanced user only, see https://aka.ms/bots/tenant-restriction @@ -90,7 +88,7 @@ public virtual string ChannelAuthTenant if (Uri.TryCreate(endpointUrl, UriKind.Absolute, out _)) { - _channelAuthTenant = value; + AuthTenant = value; } else { @@ -125,6 +123,14 @@ public virtual string ChannelAuthTenant ? ToChannelFromBotOAuthScope : _oAuthScope; + /// + /// Gets or sets the channel auth token tenant for this credential. + /// + /// + /// The channel auth token tenant for this credential. + /// + protected string AuthTenant { get; set; } + /// /// Gets or sets the channel auth token tenant for this credential. /// From 9de52c84cbb17b4d3411496811d171526da4d4c4 Mon Sep 17 00:00:00 2001 From: fangyangci Date: Mon, 18 Dec 2023 11:08:08 +0800 Subject: [PATCH 2/2] The Ctor do contains the old ones, Add Ctor to ApiCompatBaseline --- ApiCompatBaseline.txt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ApiCompatBaseline.txt b/ApiCompatBaseline.txt index 0895775d4c..5f057c1b72 100644 --- a/ApiCompatBaseline.txt +++ b/ApiCompatBaseline.txt @@ -1,4 +1,12 @@ # These types are no longer supported in Microsoft.Bot.Builder.Azure: TypesMustExist : Type 'Microsoft.Bot.Builder.Azure.CosmosDbCustomClientOptions' does not exist in the implementation but it does exist in the contract. TypesMustExist : Type 'Microsoft.Bot.Builder.Azure.CosmosDbStorage' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'Microsoft.Bot.Builder.Azure.CosmosDbStorageOptions' does not exist in the implementation but it does exist in the contract. \ No newline at end of file +TypesMustExist : Type 'Microsoft.Bot.Builder.Azure.CosmosDbStorageOptions' does not exist in the implementation but it does exist in the contract. + +MembersMustExist : Member 'Microsoft.Bot.Connector.Authentication.MicrosoftAppCredentials..ctor(System.String, System.String)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'Microsoft.Bot.Connector.Authentication.MicrosoftAppCredentials..ctor(System.String, System.String, System.Net.Http.HttpClient)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'Microsoft.Bot.Connector.Authentication.MicrosoftAppCredentials..ctor(System.String, System.String, System.Net.Http.HttpClient, Microsoft.Extensions.Logging.ILogger)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'Microsoft.Bot.Connector.Authentication.MicrosoftAppCredentials..ctor(System.String, System.String, System.String, System.Net.Http.HttpClient)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'Microsoft.Bot.Connector.Authentication.MicrosoftAppCredentials..ctor(System.String, System.String, System.String, System.Net.Http.HttpClient, Microsoft.Extensions.Logging.ILogger)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'Microsoft.Bot.Connector.Authentication.MicrosoftGovernmentAppCredentials..ctor(System.String, System.String, System.Net.Http.HttpClient)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'Microsoft.Bot.Connector.Authentication.MicrosoftGovernmentAppCredentials..ctor(System.String, System.String, System.Net.Http.HttpClient, Microsoft.Extensions.Logging.ILogger)' does not exist in the implementation but it does exist in the contract.