UNPKG

botframework-connector

Version:

Bot Connector is autorest generated connector client.

54 lines (53 loc) 3.1 kB
/** * @module botframework-connector */ /** * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. */ import { VerifyOptions } from 'jsonwebtoken'; import { AuthenticationConfiguration } from './authenticationConfiguration'; import { ClaimsIdentity } from './claimsIdentity'; import { ICredentialProvider } from './credentialProvider'; /** * @deprecated Use `ConfigurationBotFrameworkAuthentication` instead to perform enterprise channel validation. */ export declare namespace EnterpriseChannelValidation { /** * TO BOT FROM CHANNEL: Token validation parameters when connecting to a bot */ const ToBotFromEnterpriseChannelTokenValidationParameters: VerifyOptions; /** * Validate the incoming Auth Header as a token sent from the Bot Framework Service. * A token issued by the Bot Framework emulator will FAIL this check. * * @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} serviceUrl The ServiceUrl Claim value that must match in the identity. * @param channelId The ID of the channel to validate. * @param channelService The channelService value that distinguishes public Azure from US Government Azure. * @returns {Promise<ClaimsIdentity>} A valid ClaimsIdentity. */ function authenticateChannelTokenWithServiceUrl(authHeader: string, credentials: ICredentialProvider, serviceUrl: string, channelId: string, channelService: string): Promise<ClaimsIdentity>; /** * Validate the incoming Auth Header as a token sent from the Bot Framework Service. * A token issued by the Bot Framework emulator will FAIL this check. * * @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 channelId The ID of the channel to validate. * @param channelService The channelService value that distinguishes public Azure from US Government Azure. * @param authConfig The authentication configuration. * @returns {Promise<ClaimsIdentity>} A valid ClaimsIdentity. */ function authenticateChannelToken(authHeader: string, credentials: ICredentialProvider, channelId: string, channelService: string, authConfig?: AuthenticationConfiguration): Promise<ClaimsIdentity>; /** * Validate the ClaimsIdentity to ensure it came from the channel service. * * @param {ClaimsIdentity} identity The identity to validate * @param {ICredentialProvider} credentials The user defined set of valid credentials, such as the AppId. * @returns {Promise<ClaimsIdentity>} A valid ClaimsIdentity. */ function validateIdentity(identity: ClaimsIdentity, credentials: ICredentialProvider): Promise<ClaimsIdentity>; } //# sourceMappingURL=enterpriseChannelValidation.d.ts.map