Udostępnij za pośrednictwem


BotFrameworkAdapter.GetAadTokensAsync Metoda

Definicja

Przeciążenia

GetAadTokensAsync(ITurnContext, String, String[], String, CancellationToken)

Pobiera tokeny usługi Azure Active Directory dla określonych zasobów w skonfigurowanym połączeniu przy użyciu obiektów AppCredentials bota.

GetAadTokensAsync(ITurnContext, AppCredentials, String, String[], String, CancellationToken)

Pobiera tokeny usługi Azure Active Directory dla określonych zasobów w skonfigurowanym połączeniu przy użyciu dostosowanych obiektów AppCredentials.

GetAadTokensAsync(ITurnContext, String, String[], String, CancellationToken)

Pobiera tokeny usługi Azure Active Directory dla określonych zasobów w skonfigurowanym połączeniu przy użyciu obiektów AppCredentials bota.

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))

Parametry

context
ITurnContext

Kontekst bieżącej rozmowy z użytkownikiem.

connectionName
String

Nazwa połączenia usługi Azure Active Directory skonfigurowanego za pomocą tego bota.

resourceUrls
String[]

Lista adresów URL zasobów do pobrania tokenów.

userId
String

Identyfikator użytkownika, dla którego są pobierane tokeny. W przypadku przekazania wartości null identyfikator userId jest pobierany z działania w obiekcie ITurnContext.

cancellationToken
CancellationToken

Token anulowania operacji asynchronicznych.

Zwraca

Słownik zasobówUrl do odpowiedniego TokenResponse.

Implementuje

Dotyczy

GetAadTokensAsync(ITurnContext, AppCredentials, String, String[], String, CancellationToken)

Pobiera tokeny usługi Azure Active Directory dla określonych zasobów w skonfigurowanym połączeniu przy użyciu dostosowanych obiektów 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))

Parametry

context
ITurnContext

Kontekst bieżącej rozmowy z użytkownikiem.

oAuthAppCredentials
AppCredentials

AppCredentials dla protokołu OAuth.

connectionName
String

Nazwa połączenia usługi Azure Active Directory skonfigurowanego za pomocą tego bota.

resourceUrls
String[]

Lista adresów URL zasobów do pobrania tokenów.

userId
String

Identyfikator użytkownika, dla którego są pobierane tokeny. W przypadku przekazania wartości null identyfikator userId jest pobierany z działania w obiekcie ITurnContext.

cancellationToken
CancellationToken

Token anulowania operacji asynchronicznych.

Zwraca

Słownik zasobówUrl do odpowiedniego TokenResponse.

Implementuje

Dotyczy