@microsoft/teams-ai
Version:
SDK focused on building AI based applications for Microsoft Teams.
42 lines • 1.99 kB
TypeScript
import { TokenResponse, TurnContext } from 'botbuilder';
import { MessageExtensionAuthenticationBase } from './MessageExtensionAuthenticationBase';
import { OAuthSettings } from './Authentication';
/**
* @internal
*
* Handles authentication for Teams Message Extension.
*/
export declare class OAuthPromptMessageExtensionAuthentication extends MessageExtensionAuthenticationBase {
private readonly settings;
/**
* Creates a new instance of OAuthPromptMessageExtensionAuthentication.
* @param {OAuthSettings} settings The OAuthPromptSettings.
*/
constructor(settings: OAuthSettings);
/**
* Handles the SSO token exchange.
* @param {TurnContext} context The turn context.
* @returns {Promise<TokenResponse | undefined>} A promise that resolves to the token response or undefined if token exchange failed.
*/
handleSsoTokenExchange(context: TurnContext): Promise<TokenResponse | undefined>;
/**
* Handles the signin/verifyState activity.
* @param {TurnContext} context The turn context.
* @param {string} magicCode The magic code from sign-in.
* @returns {Promise<TokenResponse | undefined>} A promise that resolves to undefined. The parent class will trigger silentAuth again.
*/
handleUserSignIn(context: TurnContext, magicCode: string): Promise<TokenResponse | undefined>;
/**
* Gets the sign-in link for the user.
* @param {TurnContext} context The turn context.
* @returns {Promise<string | undefined>} A promise that resolves to the sign-in link or undefined if no sign-in link available.
*/
getSignInLink(context: TurnContext): Promise<string | undefined>;
/**
* Should sign in using SSO flow.
* @param {TurnContext} context - The turn context.
* @returns {boolean} - A boolean indicating if the sign-in should use SSO flow.
*/
isSsoSignIn(context: TurnContext): boolean;
}
//# sourceMappingURL=OAuthMessageExtensionAuthentication.d.ts.map