Langue

UserAuthorization Class

Definition

UserAuthorization supports and extensible number of OAuth flows.

Auto Sign In: If enabled in UserAuthorizationOptions, sign in starts automatically after the first Message the user sends. When the sign in is complete, the turn continues with the original message. On failure, OnUserSignInFailure(AuthorizationFailure) is called.

public class UserAuthorization
type UserAuthorization = class
Public Class UserAuthorization
Inheritance
UserAuthorization

Remarks

This is always executed in the context of a turn for the user in Activity.

Constructors

Name Description
UserAuthorization(AgentApplication, UserAuthorizationOptions)

Properties

Name Description
DefaultHandlerName

Methods

Name Description
ExchangeTurnTokenAsTokenCredential(ITurnContext, String, String, IList<String>)

Creates a token credential that exchanges the user token for scopes requested during the current turn.

ExchangeTurnTokenAsync(ITurnContext, String, String, IList<String>, CancellationToken)
GetTurnToken(String)
Obsolete.

Return a previously acquired token.

GetTurnTokenAsTokenCredential(ITurnContext, String)

Creates a token credential backed by the user token for the current turn.

GetTurnTokenAsync(ITurnContext, String, CancellationToken)

Return a previously acquired token.

GetTurnTokens()
OnUserSignInFailure(AuthorizationFailure)

The handler function is called when the user sign in flow fails

SignOutUserAsync(ITurnContext, ITurnState, String, CancellationToken)

Applies to