[英]What's the difference between the Directline API and OAuth2 in Microsoft Bot Framework .Net?
I'm thinking of how to implement Authentication in my Bot Project.我正在考虑如何在我的 Bot 项目中实现身份验证。 My Boss wants Directline API from Azure as our go-to but there is no useful documentation provided by the Microsoft team.
我的老板想要 Azure 的 Directline API 作为我们的首选,但微软团队没有提供有用的文档。 Another authentication is OAuth2 from Azure.
另一种身份验证是来自 Azure 的 OAuth2。 Are these two similar?
这两个相似吗? I know they both provide an Authentication token.
我知道他们都提供了一个身份验证令牌。 But I would like to hear any suggestions from you guys.
但我想听听你们的任何建议。
I need to embed my Bot to the React Web-App.我需要将我的 Bot 嵌入到 React Web-App。 My plan is to only use the Bot if the user is logged-in within the App.
我的计划是仅当用户在应用程序中登录时才使用机器人。 So if it does whenever the user type/send message to the Bot.
因此,只要用户键入/向 Bot 发送消息,它就会这样做。 I need to authenticate that request and so on.
我需要验证那个请求等等。
The Direct Line service (along with other channel connectors) in the bot framework utilizes Oauth .机器人框架中的 Direct Line 服务(以及其他通道连接器) 使用 Oauth 。 The connector service lives (and handles communication) between the chat client and the bot (your code).
连接器服务在聊天客户端和机器人(您的代码)之间存在(并处理通信)。 This is related to authenticating and handling communication between these endpoints.
这与验证和处理这些端点之间的通信有关。 The bot resource (
bot channels registration
or web app bot
) actually is dependent on an Azure AAD application that gets created along with that resource (uses client secret, etc).机器人资源(
bot channels registration
或web app bot
)实际上依赖于与该资源一起创建的 Azure AAD 应用程序(使用客户端密码等)。
Additionally, user authentication can be done, and there are bot framework SDK samples on how to implement that (let me know if you need examples).此外,可以进行用户身份验证,并且有 bot 框架 SDK 示例说明如何实现该示例(如果您需要示例,请告诉我)。
Samples:样品:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.