次の方法で共有


BotSsoExecutionActivityHandler interface

Interface for user to customize SSO execution activity handler

Remarks

Bot SSO execution activity handler is to handle SSO login process and trigger SSO command using BotSsoExecutionDialog. You can use this interface to implement your own SSO execution dialog, and pass it to ConversationBot options:

export const commandBot = new ConversationBot({
  ...
  ssoConfig: {
    ...
    dialog: {
      CustomBotSsoExecutionActivityHandler: YourCustomBotSsoExecutionActivityHandler,
    }
  },
   ...
});

For details information about how to implement a BotSsoExecutionActivityHandler, please refer DefaultBotSsoExecutionActivityHandler class source code: https://aka.ms/teamsfx-default-sso-execution-activity-handler

Methods

addCommand(BotSsoExecutionDialogHandler, TriggerPatterns)

Add TeamsFxBotSsoCommandHandler instance to BotSsoExecutionDialog

handleTeamsSigninTokenExchange(TurnContext, SigninStateVerificationQuery)

Receives invoke activities with Activity name of 'signin/tokenExchange'

handleTeamsSigninVerifyState(TurnContext, SigninStateVerificationQuery)

Receives invoke activities with Activity name of 'signin/verifyState'.

run(TurnContext)

Called to initiate the event emission process.

Method Details

addCommand(BotSsoExecutionDialogHandler, TriggerPatterns)

Add TeamsFxBotSsoCommandHandler instance to BotSsoExecutionDialog

function addCommand(handler: BotSsoExecutionDialogHandler, triggerPatterns: TriggerPatterns)

Parameters

triggerPatterns
TriggerPatterns

The trigger pattern

Remarks

This function is used to add SSO command to BotSsoExecutionDialog instance.

handleTeamsSigninTokenExchange(TurnContext, SigninStateVerificationQuery)

Receives invoke activities with Activity name of 'signin/tokenExchange'

function handleTeamsSigninTokenExchange(context: TurnContext, query: SigninStateVerificationQuery): Promise<void>

Parameters

context

TurnContext

A context object for this turn.

query

SigninStateVerificationQuery

Signin state (part of signin action auth flow) verification invoke query

Returns

Promise<void>

A promise that represents the work queued.

Remarks

It should trigger BotSsoExecutionDialog instance to handle signin process

handleTeamsSigninVerifyState(TurnContext, SigninStateVerificationQuery)

Receives invoke activities with Activity name of 'signin/verifyState'.

function handleTeamsSigninVerifyState(context: TurnContext, query: SigninStateVerificationQuery): Promise<void>

Parameters

context

TurnContext

A context object for this turn.

query

SigninStateVerificationQuery

Signin state (part of signin action auth flow) verification invoke query.

Returns

Promise<void>

A promise that represents the work queued.

Remarks

It should trigger BotSsoExecutionDialog instance to handle signin process

run(TurnContext)

Called to initiate the event emission process.

function run(context: TurnContext): Promise<void>

Parameters

context

TurnContext

The context object for the current turn.

Returns

Promise<void>