Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/origin/fixUSGovSingleTenant'
Browse files Browse the repository at this point in the history
  • Loading branch information
fangyangci committed Dec 18, 2023
2 parents 8da0eae + 79be232 commit a71dbf4
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
11 changes: 10 additions & 1 deletion ApiCompatBaseline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,18 @@ TypesMustExist : Type 'Microsoft.Bot.Builder.Azure.CosmosDbCustomClientOptions'
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.

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.

TypesMustExist : Type 'Microsoft.Bot.Connector.Authentication.AdalAuthenticator' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'Microsoft.Bot.Connector.Authentication.AppCredentials.BuildAuthenticator()' does not exist in the implementation but it does exist in the contract.
CannotAddAbstractMembers : Member 'Microsoft.Bot.Connector.Authentication.AppCredentials.BuildIAuthenticator()' is abstract in the implementation but is missing in the contract.
MembersMustExist : Member 'Microsoft.Bot.Connector.Authentication.CertificateAppCredentials..ctor(Microsoft.IdentityModel.Clients.ActiveDirectory.ClientAssertionCertificate, 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.CertificateAppCredentials.BuildAuthenticator()' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'Microsoft.Bot.Connector.Authentication.MicrosoftAppCredentials.BuildAuthenticator()' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'Microsoft.Bot.Connector.Authentication.MicrosoftAppCredentials.BuildAuthenticator()' does not exist in the implementation but it does exist in the contract.

16 changes: 11 additions & 5 deletions libraries/Microsoft.Bot.Connector/Authentication/AppCredentials.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ public abstract class AppCredentials : ServiceClientCredentials

private string _oAuthScope;

private string _channelAuthTenant;

/// <summary>
/// Initializes a new instance of the <see cref="AppCredentials"/> class.
/// </summary>
Expand Down Expand Up @@ -80,17 +78,17 @@ public AppCredentials(string channelAuthTenant = null, HttpClient customHttpClie
/// </value>
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
var endpointUrl = string.Format(CultureInfo.InvariantCulture, ToChannelFromBotLoginUrlTemplate, value);

if (Uri.TryCreate(endpointUrl, UriKind.Absolute, out _))
{
_channelAuthTenant = value;
AuthTenant = value;
}
else
{
Expand Down Expand Up @@ -125,6 +123,14 @@ public virtual string ChannelAuthTenant
? ToChannelFromBotOAuthScope
: _oAuthScope;

/// <summary>
/// Gets or sets the channel auth token tenant for this credential.
/// </summary>
/// <value>
/// The channel auth token tenant for this credential.
/// </value>
protected string AuthTenant { get; set; }

/// <summary>
/// Gets or sets the channel auth token tenant for this credential.
/// </summary>
Expand Down

0 comments on commit a71dbf4

Please sign in to comment.