TestAdapter.GetUserTokenAsync Metodo
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Overload
| Nome | Descrizione |
|---|---|
| GetUserTokenAsync(ITurnContext, AppCredentials, String, String, CancellationToken) |
Tenta di recuperare il token per un utente che si trova in un flusso di accesso usando AppCredentials personalizzato. |
| GetUserTokenAsync(ITurnContext, String, String, CancellationToken) |
Tenta di recuperare il token per un utente che si trova in un flusso di login, usando le AppCredentials del bot. |
GetUserTokenAsync(ITurnContext, AppCredentials, String, String, CancellationToken)
Tenta di recuperare il token per un utente che si trova in un flusso di accesso usando AppCredentials personalizzato.
public virtual System.Threading.Tasks.Task<Microsoft.Bot.Schema.TokenResponse> GetUserTokenAsync(Microsoft.Bot.Builder.ITurnContext turnContext, Microsoft.Bot.Connector.Authentication.AppCredentials oAuthAppCredentials, string connectionName, string magicCode, System.Threading.CancellationToken cancellationToken);
abstract member GetUserTokenAsync : Microsoft.Bot.Builder.ITurnContext * Microsoft.Bot.Connector.Authentication.AppCredentials * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Schema.TokenResponse>
override this.GetUserTokenAsync : Microsoft.Bot.Builder.ITurnContext * Microsoft.Bot.Connector.Authentication.AppCredentials * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Schema.TokenResponse>
Public Overridable Function GetUserTokenAsync (turnContext As ITurnContext, oAuthAppCredentials As AppCredentials, connectionName As String, magicCode As String, cancellationToken As CancellationToken) As Task(Of TokenResponse)
Parametri
- turnContext
- ITurnContext
Contesto per il turno di conversazione corrente con l'utente.
- oAuthAppCredentials
- AppCredentials
AppCredentials per OAuth.
- connectionName
- String
Nome della connessione di autenticazione da usare.
- magicCode
- String
(Facoltativo) Codice immesso dall'utente facoltativo da convalidare.
- cancellationToken
- CancellationToken
Token di annullamento.
Valori restituiti
Risposta del token o null se il token non è stato trovato.
Implementazioni
Si applica a
GetUserTokenAsync(ITurnContext, String, String, CancellationToken)
Tenta di recuperare il token per un utente che si trova in un flusso di login, usando le AppCredentials del bot.
public virtual System.Threading.Tasks.Task<Microsoft.Bot.Schema.TokenResponse> GetUserTokenAsync(Microsoft.Bot.Builder.ITurnContext turnContext, string connectionName, string magicCode, System.Threading.CancellationToken cancellationToken);
abstract member GetUserTokenAsync : Microsoft.Bot.Builder.ITurnContext * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Schema.TokenResponse>
override this.GetUserTokenAsync : Microsoft.Bot.Builder.ITurnContext * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Schema.TokenResponse>
Public Overridable Function GetUserTokenAsync (turnContext As ITurnContext, connectionName As String, magicCode As String, cancellationToken As CancellationToken) As Task(Of TokenResponse)
Parametri
- turnContext
- ITurnContext
Contesto per il turno di conversazione corrente con l'utente.
- connectionName
- String
Nome della connessione di autenticazione da usare.
- magicCode
- String
(Opzionale) codice inserito dall'utente per validare.
- cancellationToken
- CancellationToken
Token di annullamento.
Valori restituiti
Risposta del token o null se il token non è stato trovato.