aimpress-chatbot/node_modules/botframework-connector/lib/auth/enterpriseChannelValidation.d.ts
“SamoilenkoVadym” 55445dbc86
Some checks failed
Build and deploy Node.js app to Azure Web App - ChatBot2222 / build (push) Has been cancelled
Build and deploy Node.js app to Azure Web App - ChatBot2222 / deploy (push) Has been cancelled
Deploy bot to Azure
2025-04-27 19:55:19 +01:00

53 lines
No EOL
3 KiB
TypeScript

/**
* @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