团队机器人的登录卡

任何人都可以告诉我在哪里可以获得Teams bot的microsoft Sigin卡的JSON以及如何在可视化器中查看它以及可以将其用于屏蔽密码。

leijian_113 回答:团队机器人的登录卡

这是OauthCard.cs文件:

// <auto-generated>
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>

namespace Microsoft.Bot.Schema
{
    using Newtonsoft.Json;
    using System.Collections;
    using System.Collections.Generic;
    using System.Linq;

    /// <summary>
    /// A card representing a request to perform a sign in via OAuth
    /// </summary>
    public partial class OAuthCard
    {
        /// <summary>
        /// Initializes a new instance of the OAuthCard class.
        /// </summary>
        public OAuthCard()
        {
            CustomInit();
        }

        /// <summary>
        /// Initializes a new instance of the OAuthCard class.
        /// </summary>
        /// <param name="text">Text for signin request</param>
        /// <param name="connectionName">The name of the registered
        /// connection</param>
        /// <param name="buttons">Action to use to perform signin</param>
        public OAuthCard(string text = default(string),string connectionName = default(string),IList<CardAction> buttons = default(IList<CardAction>))
        {
            Text = text;
            ConnectionName = connectionName;
            Buttons = buttons;
            CustomInit();
        }

        /// <summary>
        /// An initialization method that performs custom operations like setting defaults
        /// </summary>
        partial void CustomInit();

        /// <summary>
        /// Gets or sets text for signin request
        /// </summary>
        [JsonProperty(PropertyName = "text")]
        public string Text { get; set; }

        /// <summary>
        /// Gets or sets the name of the registered connection
        /// </summary>
        [JsonProperty(PropertyName = "connectionName")]
        public string ConnectionName { get; set; }

        /// <summary>
        /// Gets or sets action to use to perform signin
        /// </summary>
        [JsonProperty(PropertyName = "buttons")]
        public IList<CardAction> Buttons { get; set; }

    }
}

可以找到here。话虽这么说,但AFAIK并没有可视化工具,它不在JSON中,也没有可屏蔽的东西。

,

您可以在c#中创建登录卡

 SigninCard signincard = new SigninCard()
        {
            Text = "Click here to sign in",Buttons = new List<CardAction>() {
                    new CardAction()
                    {
                        Title = "Authentication Required",Type = ActionTypes.OpenUrl,Value = $"{authenticationUrl}?{encodedCookie}"
                    }
                }
        };

请尝试一下。

本文链接:https://www.f2er.com/3109561.html

大家都在问