Bot 框架 - 隐藏文本 activity
Bot Framework - Hide text activity
可以从私有异步任务中隐藏文本 Activity(例如文本字段上的密码 属性)吗?
示例:
我把我的 id 放在机器人模拟器上:admin
->我的应用程序正在请求我的密码
当我写的时候希望它像这样显示:********
感谢您的帮助。
谢谢。
目前不是 Bot Framework 的功能。
考虑改用机器人身份验证工作流程。
机器人身份验证资源
身份验证 - .NET 示例
接下来,您可以研究这个代码示例,它演示了 Bot Framework 与 Active Directory 的集成。 https://github.com/MicrosoftDX/AuthBot
您还可以考虑查看登录卡示例,它也可用于通过 Web 登录对您的机器人进行身份验证。
代码示例:
- 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);
可以从私有异步任务中隐藏文本 Activity(例如文本字段上的密码 属性)吗?
示例:
我把我的 id 放在机器人模拟器上:admin
->我的应用程序正在请求我的密码
当我写的时候希望它像这样显示:********
感谢您的帮助。
谢谢。
目前不是 Bot Framework 的功能。
考虑改用机器人身份验证工作流程。
机器人身份验证资源
身份验证 - .NET 示例
接下来,您可以研究这个代码示例,它演示了 Bot Framework 与 Active Directory 的集成。 https://github.com/MicrosoftDX/AuthBot
您还可以考虑查看登录卡示例,它也可用于通过 Web 登录对您的机器人进行身份验证。
代码示例: - 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);