- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我们计划将 BoT 部署为一种帮助台,以根据用户的文本接受查询并提出支持请求。我们希望将我们的 BoT 与我们自己的 AD 集成以进行身份验证。如果 AD 身份验证不起作用,那么我们的计划 B 是说我们将 BoT 作为网络聊天 BoT 托管在我们的网页内,并且所有身份验证都在 Web 应用程序中完成。但是当我们想代表他提出一些支持票时,我们仍然需要捕获登录到 Web 应用程序的用户。知道如何将登录的用户详细信息从托管网页传递到 BoT。托管网页可以是 Azure 或本地实现。
AuthBoT 是唯一的出路,使用该方法将用户重定向到 Web 应用程序进行登录,并使用魔术代码进行身份验证并将 BoT 发回。我们是否有一种无缝的身份验证方式,无需重定向到另一个网页进行身份验证?
我的客户不想转到另一个网页并在此处输入他的凭据以进行身份验证。他想要更无缝的身份验证。从某种意义上说,他是对的,因为他已经对自己进行了身份验证并登录了网页,而 BoT 是他网页中的另一个片段。他的观点是为什么我们需要再次登录,为什么 BoT 不能从托管网页中获取身份验证/ token 。这里有什么建议吗?
最佳答案
有几种方法可以解决您的情况。
据我了解,当客户端到达带有聊天机器人小部件的网页时,用户已经通过网页对您的网站进行了身份验证。
编辑:我添加了第三种方法,它是在网页和嵌入式 WebChat 框之间进行通信的首选方式。
方法一:
将用户凭据(身份验证 token )传输到页面内的聊天机器人的一种方法是到 使用来自服务器身份验证端点的凭据开始与用户的新对话。
但是,为了使其正常工作,您需要用户的 IAddress .换句话说,用户之前必须与您的机器人进行过对话,而您必须将其存储在某个地方,可能是在数据库中。
例如,这里是您的服务器代码(这是在 NodeJS 中):
//where user is sent after authenticating through web page
server.post("/authenticated", function(req, res){
//get user iaddress from database using credentials
//(you will need the Iaddress of the user to begin a dialog)
var address = getAddressFromDB(req.body.credentials)
//then use beginDialog to start a new dialog with the user you just authenticated
//(this dialog route will only be accessible from here to guarantee authentication)
bot.beginDialog(address, "/authenticated", { userAuthToken: auth_token });
//success
res.status(200);
res.end();
});
//user is sent here from the above bot.beginDialog() call
bot.dialog("/authenticated", function(session, args){
//extract credentials (auth token) from args
var authToken = args.userAuthToken;
//use auth token here.......
});
authToken
内
session
对象,如果在以后的对话路由中需要它。
session.userData.authToken = authToken;
//begin user authentication here
bot.dialog("/get_username", [
function(session){
//prompt user for username here
botbuilder.Prompts.text(session, "Hello, what is your username?");
},
function(session, results){
//store username
session.userData.username = results.response;
//begin new dialogue
session.beginDialog("/get_password");
}
]);
bot.dialog("/get_password", [
function(session){
//prompt user for password here
botbuilder.Prompts.text(session, "What is your password?");
},
function(session, results){
//store password
session.userData.password = results.response;
//check credentials
if(checkCredentials(session.userData.username, session.userData.password){
//good credentials, send to post-authentication dialog
session.beginDialog("/authenticated");
} else {
//bad credentials
//reset user data and retry
session.userData.username = "";
session.userData.password = "";
session.beginDialog("/get_username");
}
}
]);
关于botframework - MS BoT 框架中的 BoT 认证,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41458114/
我在 C# 中为我的聊天机器人使用 botframework channel 直达线,最近我添加了 Bing 语音,用于文本到语音,反之亦然,但是当用户说话时,除了纯文本之外,是否还有音频文件作为消息
我有一个来自用户上传图片的字节数组。我需要使用 Bot-framework 在 Skype 和其他 channel 上将此字节数组呈现为图像 最佳答案 图像可以作为 base64 编码发送:
我正在使用自定义的 Microsoft Bot 框架 WebChat Client .当我的机器人无法为用户提供解决方案时,它能够与代理进行实时聊天服务。 我需要允许代理“先睹为快”当前正在输入 We
我正在运行 Windows 10 并想安装 BotFramework-Emulator。 链接 here说 Download packages for Mac, Windows, and Linux
我有一个机器人,它具有消息传递扩展功能。我遵循了一个例子 here .但是我没有使用卡片 View ,而是使用嵌入式 Web View 来显示我的自定义 UI(这是一个托管在 S3 中的 React
我需要维护聊天历史记录,并在页面刷新或关闭并打开窗口后将它们加载回窗口中。 问题:按钮/轮播/自适应卡/英雄卡事件/属性未加载(即,当我单击按钮或任何事件时,操作未发生)。描述:为了达到要求,我有两个
我正在尝试 Microsoft 的新 Botframework。使用 \n 发送消息时,消息中没有换行符。我该如何解决? 在 Telegram API 中有一个名为 parse_mode (https
我发布了一个使用机器人框架构建的机器人,但我不知道如何将它连接到企业内部网络上的 Skype for Business。 有谁知道是什么流程吗? ----- 埃德 最佳答案 尚不支持 Skype fo
我已经在 .Net Framework WebAPI 中使用 Microsoft.BotFramework 实现了一个聊天机器人,它正在运行,现在我想将它移植到 .Net Core 2,与其他项目共享
关闭。这个问题需要更多focused .它目前不接受答案。 想改善这个问题吗?更新问题,使其仅关注一个问题 editing this post . 9 个月前关闭。 Improve this ques
我在英雄卡中使用粗体文本时遇到了一些问题,目前我是这样构建我的英雄卡的: var workloadCard = new HeroCard { Title = $
nodejs中bot框架的输入指示器 你好, 我正在使用 microsoft bot framework v4, node js,我需要在聊天机器人中实现输入。在发送原始响应之前,机器人应该响应 li
我正在创建一个在电报 chanel 上运行的机器人。当用户与机器人聊天时,它需要知道谁在聊天。所以他们必须在我的服务器上进行身份验证。 我想机器人会发送一个按钮,其中包含我的身份验证端点的链接(例如:
我正在打开(使用 OpenUrl)我控制的外部网页。在加载此网页期间,我希望从服务器直接关闭团队模式,或者通过调用团队客户端重新发送带有参数的消息,以便机器人可以以关闭响应进行响应(我正在工作)。 我
我正在尝试发送 Teams notification与 hero card或 Adaptive Card .我可以发送一条简单的短信作为 notification . 我不知道如何包装 Hero ca
我创建了一个简单的 android 应用程序,它使用 restfull jersey WS 通过 JSON 格式发送消息 我应该在连接机器人的应用程序中输入哪个 URL? 该机器人如何接收消息并发回响
我正在创建一个允许用户与现有 Web 服务交互的机器人。我希望用户能够与我的机器人开始对话并检索针对他们的个性化信息。 如何将机器人用户与其现有帐户相匹配?并非所有 channel 都使用电子邮件地址
我用我的机器人尝试了这种电子邮件模式,但是在Skype上发布时不起作用。它总是拒绝任何正常的有效电子邮件。 [Describe("email "), Prompt(QuestionWhatIsYour
我有一个名为“表单搜索”的对话框,它有一个自适应卡片。当我单击提交按钮时,控件不会转到下一个流程,而是以错误结束。但如果使用英雄卡,按钮点击会触发下一个流程。可能是什么问题。 session.mess
我开发了一个聊天机器人并将其部署在 Skype 上。我有一件新东西要添加到机器人中。 如果用户在 bot 中请求办公室出租车,则 bot 必须接受用户输入(如目的地、emp-name 等)并向特定邮件
我是一名优秀的程序员,十分优秀!