TestAdapter.GetAadTokensAsync 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
GetAadTokensAsync(ITurnContext, String, String[], String, CancellationToken) |
使用机器人的 AppCredentials 返回资源 URL 的 TokenRespons 的字典。 |
GetAadTokensAsync(ITurnContext, AppCredentials, String, String[], String, CancellationToken) |
使用自定义 AppCredentials 返回资源 URL 的 TokenRespons 的字典。 |
GetAadTokensAsync(ITurnContext, String, String[], String, CancellationToken)
使用机器人的 AppCredentials 返回资源 URL 的 TokenRespons 的字典。
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 资源 URL 的列表。
- userId
- String
用户 ID。
- cancellationToken
- CancellationToken
cancellationToken。
返回
每个资源 URL 的 TokenResponses 字典。
实现
适用于
GetAadTokensAsync(ITurnContext, AppCredentials, String, String[], String, CancellationToken)
使用自定义 AppCredentials 返回资源 URL 的 TokenRespons 的字典。
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 资源 URL 的列表。
- userId
- String
用户 ID。
- cancellationToken
- CancellationToken
cancellationToken。
返回
每个资源 URL 的 TokenResponses 字典。