import { DialogTurnResult } from 'botbuilder-dialogs'; import { Storage, TeamsSSOTokenExchangeMiddleware, TurnContext, TokenResponse } from 'botbuilder'; import { BotAuthenticationBase } from './BotAuthenticationBase'; import { Application } from '../Application'; import { TurnState } from '../TurnState'; import { OAuthSettings } from './Authentication'; /** * @internal * * Handles authentication for Teams bots. * @template TState - The type of the turn state object. */ export declare class OAuthBotAuthentication extends BotAuthenticationBase { private _oauthPrompt; private _oauthSettings; /** * Initializes a new instance of the OAuthBotAuthentication class. * @param {Application} app - The application object. * @param {OAuthSettings} oauthSettings - The settings for OAuthPrompt. * @param {string} settingName - The name of the setting. * @param {Storage} storage - The storage object for storing state. */ constructor(app: Application, oauthSettings: OAuthSettings, // Child classes will have different types for this settingName: string, storage?: Storage); /** * Run or continue the OAuthPrompt dialog and returns the result. * @param {TurnContext} context - The turn context object. * @param {TState} state - The turn state object. * @param {string} dialogStateProperty - The name of the dialog state property. * @returns {Promise>} A promise that resolves to the dialog turn result containing the token response. */ runDialog(context: TurnContext, state: TState, dialogStateProperty: string): Promise>; /** * Continue the OAuthPrompt dialog and returns the result. * @param {TurnContext} context - The turn context object. * @param {TState} state - The turn state object. * @param {string} dialogStateProperty - The name of the dialog state property. * @returns {Promise>} A promise that resolves to the dialog turn result containing the token response. */ continueDialog(context: TurnContext, state: TState, dialogStateProperty: string): Promise>; /** * Creates a new DialogContext for OAuthPrompt. * @param {TurnContext} context - The turn context object. * @param {TState} state - The turn state object. * @param {string} dialogStateProperty - The name of the dialog state property. * @returns {Promise} A promise that resolves to the dialog context. */ private createDialogContext; /** * Creates an OAuthCard that will be sent to the user. * @param {TurnContext} context - The turn context. * @returns {Promise} The OAuthCard. */ private createOAuthCard; } /** * @internal * SSO Token Exchange Middleware for Teams that filters based on the connection name. */ export declare class FilteredTeamsSSOTokenExchangeMiddleware extends TeamsSSOTokenExchangeMiddleware { private readonly _oauthConnectionName; constructor(storage: Storage, oauthConnectionName: string); onTurn(context: TurnContext, next: () => Promise): Promise; } //# sourceMappingURL=OAuthBotAuthentication.d.ts.map