Jaa


ActivityHandler.OnTokenResponseEventAsync Method

Definition

Invoked when a tokens/response event is received when the base behavior of OnEventActivityAsync(ITurnContext<IEventActivity>, CancellationToken) is used. If using an OAuthPrompt, override this method to forward this Activity to the current dialog. By default, this method does nothing.

protected virtual System.Threading.Tasks.Task OnTokenResponseEventAsync (Microsoft.Bot.Builder.ITurnContext<Microsoft.Bot.Schema.IEventActivity> turnContext, System.Threading.CancellationToken cancellationToken);
abstract member OnTokenResponseEventAsync : Microsoft.Bot.Builder.ITurnContext<Microsoft.Bot.Schema.IEventActivity> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.OnTokenResponseEventAsync : Microsoft.Bot.Builder.ITurnContext<Microsoft.Bot.Schema.IEventActivity> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Protected Overridable Function OnTokenResponseEventAsync (turnContext As ITurnContext(Of IEventActivity), cancellationToken As CancellationToken) As Task

Parameters

turnContext
ITurnContext<IEventActivity>

A strongly-typed context object for this turn.

cancellationToken
CancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns

A task that represents the work queued to execute.

Remarks

When the OnEventActivityAsync(ITurnContext<IEventActivity>, CancellationToken) method receives an event with a Name of `tokens/response`, it calls this method.

If your bot uses the OAuthPrompt, forward the incoming Activity to the current dialog.

Applies to

See also