Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#6826] Add CloudAdapter for WebApi #6827

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
718 changes: 717 additions & 1 deletion Microsoft.Bot.Builder.sln

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Bot.Builder.Skills;
using Microsoft.Bot.Connector.Authentication;
using Microsoft.Bot.Schema;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;

namespace Microsoft.Bot.Builder.Integration.AspNet.Core
namespace Microsoft.Bot.Connector.Authentication
{
/// <summary>
/// Creates a <see cref="BotFrameworkAuthentication"/> instance from configuration.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Bot.Connector.Authentication;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
using Microsoft.Rest;

namespace Microsoft.Bot.Builder.Integration.AspNet.Core
namespace Microsoft.Bot.Connector.Authentication
{
internal enum MicrosoftAppType
{
Expand All @@ -31,7 +30,7 @@ internal enum MicrosoftAppType
}

/// <summary>
/// Credential provider which uses <see cref="Microsoft.Extensions.Configuration.IConfiguration"/> to lookup app credentials.
/// Credential provider which uses <see cref="IConfiguration"/> to lookup app credentials.
/// </summary>
public class ConfigurationServiceClientCredentialFactory : ServiceClientCredentialsFactory
{
Expand Down Expand Up @@ -95,7 +94,7 @@ public ConfigurationServiceClientCredentialFactory(IConfiguration configuration,
break;

default: // MultiTenant
_inner = new PasswordServiceClientCredentialFactory(appId, password, tenantId: string.Empty, httpClient, logger);
_inner = new PasswordServiceClientCredentialFactory(appId, password, tenantId: string.Empty, httpClient, logger);
break;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
<ItemGroup>
<ProjectReference Include="..\..\Microsoft.Bot.Builder\Microsoft.Bot.Builder.csproj" />
<ProjectReference Include="..\..\Microsoft.Bot.Configuration\Microsoft.Bot.Configuration.csproj" />
<ProjectReference Include="..\..\Microsoft.Bot.Connector\Microsoft.Bot.Connector.csproj" />
<ProjectReference Include="..\..\Microsoft.Bot.Connector.Streaming\Microsoft.Bot.Connector.Streaming.csproj" />
<ProjectReference Include="..\..\Microsoft.Bot.Streaming\Microsoft.Bot.Streaming.csproj" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using System.Runtime.CompilerServices;
using Microsoft.Bot.Connector.Authentication;

// These classes were moved from Microsoft.Bot.Builder.Integration.AspNet.Core to
// Microsoft.Bot.Connector. To avoid breaking changes in any bot that could be referencing
// the classes, we are adding these TypeForwardedTo attributes.

[assembly: TypeForwardedTo(typeof(ConfigurationBotFrameworkAuthentication))]
[assembly: TypeForwardedTo(typeof(ConfigurationServiceClientCredentialFactory))]

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using System;
using System.Configuration;
using Microsoft.Bot.Connector.Authentication;

Expand All @@ -14,6 +15,7 @@ namespace Microsoft.Bot.Builder.BotFramework
///
/// NOTE: if the keys are not present, a <c>null</c> value will be used.
/// </remarks>
[Obsolete("Use `ConfigurationBotFrameworkAuthentication` instead to configure channel.", false)]
public sealed class ConfigurationChannelProvider : SimpleChannelProvider
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using System;
using System.Configuration;
using Microsoft.Bot.Connector.Authentication;

Expand All @@ -15,6 +16,7 @@ namespace Microsoft.Bot.Builder.BotFramework
///
/// NOTE: if the keys are not present, a <c>null</c> value will be used.
/// </remarks>
[Obsolete("Use `ConfigurationBotFrameworkAuthentication` instead to configure credentials.", false)]
public sealed class ConfigurationCredentialProvider : SimpleCredentialProvider
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ private static async Task ConnectAsync(bool automaticallyReconnect = false, bool
}
else
{
var url = AskUser("Bot url:");
var url = AskUser("Bot url (e.g ws://localhost:3978/api/messages):");
var appId = AskUser("Bot app id:");
var appPassword = AskUser("Bot app password:");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using Microsoft.Extensions.Configuration.Memory;
using Xunit;

namespace Microsoft.Bot.Builder.Integration.AspNet.Core.Tests
namespace Microsoft.Bot.Connector.Tests.Authentication
{
public class ConfigurationServiceClientCredentialFactoryTests
{
Expand Down
Loading
Loading