TestAdapter.GetAadTokensAsync 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| GetAadTokensAsync(ITurnContext, String, String[], String, CancellationToken) |
利用機器人的 AppCredentials 回傳資源 URL 的 TokenResponses 字典。 |
| GetAadTokensAsync(ITurnContext, AppCredentials, String, String[], String, CancellationToken) |
回傳資源網址的 TokenResponses 字典,並使用自訂的 AppCredentials。 |
GetAadTokensAsync(ITurnContext, String, String[], String, CancellationToken)
利用機器人的 AppCredentials 回傳資源 URL 的 TokenResponses 字典。
public virtual System.Threading.Tasks.Task<System.Collections.Generic.Dictionary<string,Microsoft.Bot.Schema.TokenResponse>> GetAadTokensAsync(Microsoft.Bot.Builder.ITurnContext context, string connectionName, string[] resourceUrls, string userId = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetAadTokensAsync : Microsoft.Bot.Builder.ITurnContext * string * string[] * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.Dictionary<string, Microsoft.Bot.Schema.TokenResponse>>
override this.GetAadTokensAsync : Microsoft.Bot.Builder.ITurnContext * string * string[] * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.Dictionary<string, Microsoft.Bot.Schema.TokenResponse>>
Public Overridable Function GetAadTokensAsync (context As ITurnContext, connectionName As String, resourceUrls As String(), Optional userId As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Dictionary(Of String, TokenResponse))
參數
- context
- ITurnContext
TurnContext。
- connectionName
- String
connectionName。
- resourceUrls
- String[]
AAD 資源網址列表。
- userId
- String
用戶標識碼。
- cancellationToken
- CancellationToken
取消代幣。
傳回
每個資源網址的 TokenResponses 字典。
實作
適用於
GetAadTokensAsync(ITurnContext, AppCredentials, String, String[], String, CancellationToken)
回傳資源網址的 TokenResponses 字典,並使用自訂的 AppCredentials。
public virtual System.Threading.Tasks.Task<System.Collections.Generic.Dictionary<string,Microsoft.Bot.Schema.TokenResponse>> GetAadTokensAsync(Microsoft.Bot.Builder.ITurnContext context, Microsoft.Bot.Connector.Authentication.AppCredentials oAuthAppCredentials, string connectionName, string[] resourceUrls, string userId = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetAadTokensAsync : Microsoft.Bot.Builder.ITurnContext * Microsoft.Bot.Connector.Authentication.AppCredentials * string * string[] * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.Dictionary<string, Microsoft.Bot.Schema.TokenResponse>>
override this.GetAadTokensAsync : Microsoft.Bot.Builder.ITurnContext * Microsoft.Bot.Connector.Authentication.AppCredentials * string * string[] * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.Dictionary<string, Microsoft.Bot.Schema.TokenResponse>>
Public Overridable Function GetAadTokensAsync (context As ITurnContext, oAuthAppCredentials As AppCredentials, connectionName As String, resourceUrls As String(), Optional userId As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Dictionary(Of String, TokenResponse))
參數
- context
- ITurnContext
TurnContext。
- oAuthAppCredentials
- AppCredentials
適用於 OAuth 的 AppCredentials。
- connectionName
- String
connectionName。
- resourceUrls
- String[]
AAD 資源網址列表。
- userId
- String
用戶標識碼。
- cancellationToken
- CancellationToken
取消代幣。
傳回
每個資源網址的 TokenResponses 字典。