Lingua

OAuthPrompt.GetUserTokenAsync(ITurnContext, CancellationToken) Metodo

Definizione

Tenta di ottenere il token dell'utente.

public System.Threading.Tasks.Task<Microsoft.Bot.Schema.TokenResponse> GetUserTokenAsync(Microsoft.Bot.Builder.ITurnContext turnContext, System.Threading.CancellationToken cancellationToken = default);
member this.GetUserTokenAsync : Microsoft.Bot.Builder.ITurnContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Schema.TokenResponse>
Public Function GetUserTokenAsync (turnContext As ITurnContext, Optional cancellationToken As CancellationToken = Nothing) As Task(Of TokenResponse)

Parametri

turnContext
ITurnContext

Contesto per il turno di conversazione corrente con l'utente.

cancellationToken
CancellationToken

Token di annullamento che può essere utilizzato da altri oggetti o thread per ricevere un avviso di annullamento.

Valori restituiti

Attività che rappresenta il lavoro in coda da eseguire.

Commenti

Se il compito ha successo e l'utente ha già un token o l'utente riesce ad accedere, il risultato contiene il token dell'utente.

Si applica a