【发布时间】:2017-06-27 07:17:19
【问题描述】:
是否可以从私有异步任务中隐藏文本活动(如文本字段上的密码属性)?
例子:
我把我的 id 放在 bot 模拟器上:admin
->我的应用正在请求我的密码
当我写的时候希望它显示如下:********
感谢您的帮助。
谢谢。
【问题讨论】:
-
你在用什么渠道?无论如何,我认为这是不可能的。让机器人要求输入密码可能是一个糟糕的设计
标签: c# bots botframework
是否可以从私有异步任务中隐藏文本活动(如文本字段上的密码属性)?
例子:
我把我的 id 放在 bot 模拟器上:admin
->我的应用正在请求我的密码
当我写的时候希望它显示如下:********
感谢您的帮助。
谢谢。
【问题讨论】:
标签: c# bots botframework
目前不是 Bot Framework 的功能。
考虑改用机器人身份验证工作流程。
接下来,您可以研究此代码示例,该示例演示了 Bot Framework 与 Active Directory 的集成。 https://github.com/MicrosoftDX/AuthBot
您还可以考虑查看登录卡示例,该示例还可用于通过网络登录验证您的机器人。
代码示例: - https://github.com/Microsoft/BotBuilder-Samples/tree/master/CSharp/cards-RichCards
签到卡:
Activity replyToConversation = message.CreateReply("Should go to conversation");
replyToConversation.Attachments = new List<Attachment>();
List<CardAction> cardButtons = new List<CardAction>();
CardAction plButton = new CardAction()
{
Value = $"https://<OAuthSignInURL",
Type = "signin",
Title = "Connect"
};
cardButtons.Add(plButton);
SigninCard plCard = new SigninCard(title: "You need to authorize me", button: plButton);
Attachment plAttachment = plCard.ToAttachment();
replyToConversation.Attachments.Add(plAttachment);
var reply = await connector.Conversations.SendToConversationAsync(replyToConversation);
【讨论】: