microsoft/teams.net

Public

mirrored fromhttps://github.com/microsoft/teams.netAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
docs/update-release-process

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

core/src/Microsoft.Teams.Apps/OAuth/OAuthCard.cs

47lines · modecode

1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT License.
3
4using System.Text.Json.Serialization;
5using Microsoft.Teams.Apps.Schema;
6using Microsoft.Teams.Core;
7
8namespace Microsoft.Teams.Apps.OAuth;
9
10/// <summary>
11/// Represents an OAuthCard used to initiate an OAuth sign-in flow.
12/// </summary>
13public class OAuthCard
14{
15 /// <summary>
16 /// The text displayed on the card.
17 /// </summary>
18 [JsonPropertyName("text")]
19 public string? Text { get; set; }
20
21 /// <summary>
22 /// The OAuth connection name configured on the bot.
23 /// </summary>
24 [JsonPropertyName("connectionName")]
25 public string? ConnectionName { get; set; }
26
27 /// <summary>
28 /// The sign-in action buttons.
29 /// </summary>
30 [JsonPropertyName("buttons")]
31 public IList<SuggestedAction>? Buttons { get; set; }
32
33 /// <summary>
34 /// The token exchange resource for SSO.
35 /// When present, the Teams client attempts a silent token exchange before showing the sign-in button.
36 /// </summary>
37 [JsonPropertyName("tokenExchangeResource")]
38 [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
39 public TokenExchangeResource? TokenExchangeResource { get; set; }
40
41 /// <summary>
42 /// The token post resource for posting the token back after sign-in.
43 /// </summary>
44 [JsonPropertyName("tokenPostResource")]
45 [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
46 public TokenPostResource? TokenPostResource { get; set; }
47}
48