简体   繁体   English

如何在没有 Azure Bot 服务的情况下向 Bot Framework v4 项目添加身份验证?

[英]How to add authentication to a Bot Framework v4 project without Azure Bot Service?

I'm working on an bot with Bot Framework SDK v4.我正在使用 Bot Framework SDK v4 开发一个机器人。 The plan is to host it on a local server.计划是将其托管在本地服务器上。 I've been trying to add authentication with Azure AD to it but I don't want to use the Azure Bot Service.我一直在尝试向其添加使用 Azure AD 的身份验证,但我不想使用 Azure Bot 服务。 This guide explains how to add authentication but it uses the Azure Bot Service that generates the MicrosoftAppPassword value for the appsettings.json configuration which I need. 本指南说明了如何添加身份验证,但它使用 Azure Bot 服务为我需要的appsettings.json配置生成MicrosoftAppPassword值。

What is making me think that using Azure Bot Service is not required is the Bot Framework website where I can register my bot.让我认为不需要使用 Azure Bot Service 的是Bot Framework网站,我可以在其中注册我的机器人。 But I'm not quite sure how to exactly get this to work both with Azure Portal and with the code.但我不太确定如何让它与 Azure 门户和代码一起工作。

Is there any way to add authentication to a bot for Microsoft Teams without using Azure Bot Service?有没有办法在不使用 Azure 机器人服务的情况下为 Microsoft Teams 的机器人添加身份验证?

This blog post might help to explain how the Bot Framework and Bot Framework Services fit into the picture: https://hilton.giesenow.com/how-bot-calls-actually-work这篇博文可能有助于解释 Bot Framework 和 Bot Framework Services 如何融入图片: https ://hilton.giesenow.com/how-bot-calls-actually-work

In essence, you definitely can't run a Bot Framework bot without the 'Services' part behind the scenes, but that does NOT include the hosting - you can host your bot anywhere you like.从本质上讲,如果没有幕后的“服务”部分,你肯定无法运行 Bot Framework 机器人,但这不包括托管——你可以在任何你喜欢的地方托管你的机器人。 In the Azure portal, there are various options when creating a bot (I'm not sure what they're called now, it's a few months since I looked), but one used to be called "Bot Channels Registration", which was basically just the registration in the Bot Framework Services, and the other was "Web App Bot", which included both the registration as well as a hosting model, using Azure Web Apps <- this is NOT required and the other option is perfectly fine, allowing you to host wherever you like, provided it's an httpS web-addressable endpoint.在 Azure 门户中,创建 bot 时有多种选项(我不知道它们现在叫什么,我看了几个月了),但以前称为“Bot Channels Registration”,基本上是只是在 Bot Framework Services 中的注册,另一个是“Web App Bot”,其中包括注册托管模型,使用 Azure Web Apps <- 这不是必需的,另一个选项非常好,允许你可以在任何你喜欢的地方托管,只要它是一个 httpS 网络可寻址端点。

With that in mind, you can host the bot anywhere you like, but still tap in to the authentication/SSO/etc.考虑到这一点,您可以在任何您喜欢的地方托管机器人,但仍然可以访问身份验证/SSO/等。 that the framework + services provide.框架+服务提供。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM