UNPKG

botframework-connector

Version:

Bot Connector is autorest generated connector client.

40 lines 2.11 kB
/** * @module botframework-connector */ /** * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. */ import { ClaimsIdentity } from './claimsIdentity'; import { AuthenticationConfiguration } from './authenticationConfiguration'; import { ICredentialProvider } from './credentialProvider'; /** * @deprecated Use `ConfigurationBotFrameworkAuthentication` instead to perform emulator validation. * Validates and Examines JWT tokens from the Bot Framework Emulator */ export declare namespace EmulatorValidation { /** * TO BOT FROM EMULATOR: Token validation parameters when connecting to a channel. */ const ToBotFromEmulatorTokenValidationParameters: import("jsonwebtoken").VerifyOptions; /** * Determines if a given Auth header is from the Bot Framework Emulator * * @param {string} authHeader Bearer Token, in the "Bearer [Long String]" Format. * @returns {boolean} True, if the token was issued by the Emulator. Otherwise, false. */ function isTokenFromEmulator(authHeader: string): boolean; /** * Validate the incoming Auth Header as a token sent from the Bot Framework Emulator. * A token issued by the Bot Framework will FAIL this check. Only Emulator tokens will pass. * * @param {string} authHeader The raw HTTP header in the format: "Bearer [longString]" * @param {ICredentialProvider} credentials The user defined set of valid credentials, such as the AppId. * @param {string} channelService The channelService value that distinguishes public Azure from US Government Azure. * @param {string} channelId The ID of the channel to validate. * @param {AuthenticationConfiguration} authConfig The authentication configuration. * @returns {Promise<ClaimsIdentity>} A valid ClaimsIdentity. */ function authenticateEmulatorToken(authHeader: string, credentials: ICredentialProvider, channelService: string, channelId: string, authConfig?: AuthenticationConfiguration): Promise<ClaimsIdentity>; } //# sourceMappingURL=emulatorValidation.d.ts.map