aimpress-chatbot/node_modules/botframework-connector/lib/auth/jwtTokenExtractor.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

57 lines
No EOL
2.6 KiB
TypeScript

/**
* @module botframework-connector
*/
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import { Algorithm, VerifyOptions } from 'jsonwebtoken';
import { ClaimsIdentity } from './claimsIdentity';
import { OpenIdMetadata } from './openIdMetadata';
import { ProxySettings } from '@azure/core-http';
/**
* A JWT token processing class that gets identity information and performs security token validation.
*/
export declare class JwtTokenExtractor {
private static openIdMetadataCache;
readonly tokenValidationParameters: VerifyOptions;
readonly openIdMetadata: OpenIdMetadata;
/**
* Initializes a new instance of the [JwtTokenExtractor](xref:botframework-connector.JwtTokenExtractor) class. Extracts relevant data from JWT Tokens.
*
* @param tokenValidationParameters Token validation parameters.
* @param metadataUrl Metadata Url.
* @param allowedSigningAlgorithms Allowed signing algorithms.
* @param proxySettings The proxy settings for the request.
*/
constructor(tokenValidationParameters: VerifyOptions, metadataUrl: string, allowedSigningAlgorithms: string[] | Algorithm[], proxySettings?: ProxySettings);
private static getOrAddOpenIdMetadata;
/**
* Gets the claims identity associated with a request.
*
* @param authorizationHeader The raw HTTP header in the format: "Bearer [longString]".
* @param channelId The Id of the channel being validated in the original request.
* @param requiredEndorsements The required JWT endorsements.
* @returns A `Promise` representation for either a [ClaimsIdentity](botframework-connector:module.ClaimsIdentity) or `null`.
*/
getIdentityFromAuthHeader(authorizationHeader: string, channelId: string, requiredEndorsements?: string[]): Promise<ClaimsIdentity | null>;
/**
* Gets the claims identity associated with a request.
*
* @param scheme The associated scheme.
* @param parameter The token.
* @param channelId The Id of the channel being validated in the original request.
* @param requiredEndorsements The required JWT endorsements.
* @returns A `Promise` representation for either a [ClaimsIdentity](botframework-connector:module.ClaimsIdentity) or `null`.
*/
getIdentity(scheme: string, parameter: string, channelId: string, requiredEndorsements?: string[]): Promise<ClaimsIdentity | null>;
/**
* @private
*/
private hasAllowedIssuer;
/**
* @private
*/
private validateToken;
}
//# sourceMappingURL=jwtTokenExtractor.d.ts.map