【问题标题】:Bot Framework - Hide text activityBot Framework - 隐藏文本活动
【发布时间】:2017-06-27 07:17:19
【问题描述】:

是否可以从私有异步任务中隐藏文本活动(如文本字段上的密码属性)?

例子:

我把我的 id 放在 bot 模拟器上:admin

->我的应用正在请求我的密码

当我写的时候希望它显示如下:********

感谢您的帮助。

谢谢。

【问题讨论】:

  • 你在用什么渠道?无论如何,我认为这是不可能的。让机器人要求输入密码可能是一个糟糕的设计

标签: c# bots botframework


【解决方案1】:

目前不是 Bot Framework 的功能。

考虑改用机器人身份验证工作流程。

机器人身份验证资源

https://blogs.msdn.microsoft.com/richard_dizeregas_blog/2017/05/15/bot-authentication-in-the-bot-framework/

身份验证 - .NET 示例

您可能想从观看此视频开始:https://channel9.msdn.com/Shows/Office-Dev-Show/Office-Dev-Show-Episode-34-Getting-Started-with-Bots-and-the-Microsoft-Graph

接下来,您可以研究此代码示例,该示例演示了 Bot Framework 与 Active Directory 的集成。 https://github.com/MicrosoftDX/AuthBot

您还可以考虑查看登录卡示例,该示例还可用于通过网络登录验证您的机器人。

文档: - https://docs.microsoft.com/en-us/bot-framework/dotnet/bot-builder-dotnet-add-rich-card-attachments#add-a-sign-in-card-to-a-message

代码示例: - 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);

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-05-13
    相关资源
    最近更新 更多