// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using System.Text.Json.Serialization;
using Microsoft.Teams.Apps.Schema;
using Microsoft.Teams.Core;
namespace Microsoft.Teams.Apps.OAuth;
///
/// Represents an OAuthCard used to initiate an OAuth sign-in flow.
///
public class OAuthCard
{
///
/// The text displayed on the card.
///
[JsonPropertyName("text")]
public string? Text { get; set; }
///
/// The OAuth connection name configured on the bot.
///
[JsonPropertyName("connectionName")]
public string? ConnectionName { get; set; }
///
/// The sign-in action buttons.
///
[JsonPropertyName("buttons")]
public IList? Buttons { get; set; }
///
/// The token exchange resource for SSO.
/// When present, the Teams client attempts a silent token exchange before showing the sign-in button.
///
[JsonPropertyName("tokenExchangeResource")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public TokenExchangeResource? TokenExchangeResource { get; set; }
///
/// The token post resource for posting the token back after sign-in.
///
[JsonPropertyName("tokenPostResource")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public TokenPostResource? TokenPostResource { get; set; }
}