botframework-connector
Version:
Bot Connector is autorest generated connector client.
101 lines • 5.74 kB
TypeScript
import { Activity } from 'botframework-schema';
import { AuthenticateRequestResult } from './authenticateRequestResult';
import type { AuthenticationConfiguration } from './authenticationConfiguration';
import { BotFrameworkAuthentication } from './botFrameworkAuthentication';
import { ConnectorClientOptions } from '../connectorApi/models';
import type { ConnectorFactory } from './connectorFactory';
import type { BotFrameworkClient } from '../skills';
import { ClaimsIdentity } from './claimsIdentity';
import type { ServiceClientCredentialsFactory } from './serviceClientCredentialsFactory';
import type { UserTokenClient } from './userTokenClient';
/**
* @internal
* Parameterized [BotFrameworkAuthentication](xref:botframework-connector.BotFrameworkAuthentication) used to authenticate Bot Framework Protocol network calls within this environment.
*/
export declare class ParameterizedBotFrameworkAuthentication extends BotFrameworkAuthentication {
private readonly validateAuthority;
private readonly toChannelFromBotLoginUrl;
private readonly toChannelFromBotOAuthScope;
private readonly toBotFromChannelTokenIssuer;
private readonly oAuthUrl;
private readonly toBotFromChannelOpenIdMetadataUrl;
private readonly toBotFromEmulatorOpenIdMetadataUrl;
private readonly callerId;
private readonly credentialsFactory;
private readonly authConfiguration;
private readonly botFrameworkClientFetch?;
private readonly connectorClientOptions;
/**
* @param validateAuthority The validate authority value to use.
* @param toChannelFromBotLoginUrl The to Channel from bot login url.
* @param toChannelFromBotOAuthScope The to Channel from bot oauth scope.
* @param toBotFromChannelTokenIssuer The to bot from Channel Token Issuer.
* @param oAuthUrl The OAuth url.
* @param toBotFromChannelOpenIdMetadataUrl The to bot from Channel Open Id Metadata url.
* @param toBotFromEmulatorOpenIdMetadataUrl The to bot from Emulator Open Id Metadata url.
* @param callerId The callerId set on an authenticated [Activities](xref:botframework-schema.Activity).
* @param credentialsFactory The [ServiceClientCredentialsFactory](xref:botframework-connector.ServiceClientCredentialsFactory) to use to create credentials.
* @param authConfiguration The [AuthenticationConfiguration](xref:botframework-connector.AuthenticationConfiguration) to use.
* @param botFrameworkClientFetch The fetch to use in BotFrameworkClient.
* @param connectorClientOptions The [ConnectorClientOptions](xref:botframework-connector.ConnectorClientOptions) to use when creating ConnectorClients.
*/
constructor(validateAuthority: boolean, toChannelFromBotLoginUrl: string, toChannelFromBotOAuthScope: string, toBotFromChannelTokenIssuer: string, oAuthUrl: string, toBotFromChannelOpenIdMetadataUrl: string, toBotFromEmulatorOpenIdMetadataUrl: string, callerId: string, credentialsFactory: ServiceClientCredentialsFactory, authConfiguration: AuthenticationConfiguration, botFrameworkClientFetch?: (input: RequestInfo, init?: RequestInit) => Promise<Response>, connectorClientOptions?: ConnectorClientOptions);
/**
* Gets the originating audience from Bot OAuth scope.
*
* @returns The originating audience.
*/
getOriginatingAudience(): string;
/**
* @param authHeader The http auth header received in the skill request.
* @returns The identity validation result.
*/
authenticateChannelRequest(authHeader: string): Promise<ClaimsIdentity>;
/**
* Validate Bot Framework Protocol requests.
*
* @param activity The inbound Activity.
* @param authHeader The http auth header received in the skill request.
* @returns Promise with AuthenticateRequestResult.
*/
authenticateRequest(activity: Activity, authHeader: string): Promise<AuthenticateRequestResult>;
/**
* Validate Bot Framework Protocol requests.
*
* @param authHeader The http auth header received in the skill request.
* @param channelIdHeader The channel Id HTTP header.
* @returns Promise with AuthenticateRequestResult.
*/
authenticateStreamingRequest(authHeader: string, channelIdHeader: string): Promise<AuthenticateRequestResult>;
/**
* Creates the appropriate UserTokenClient instance.
*
* @param claimsIdentity The inbound Activity's ClaimsIdentity.
* @returns Promise with UserTokenClient instance.
*/
createUserTokenClient(claimsIdentity: ClaimsIdentity): Promise<UserTokenClient>;
/**
* Creates a ConnectorFactory that can be used to create ConnectorClients that can use credentials from this particular Cloud Environment.
*
* @param claimsIdentity The inbound Activity's ClaimsIdentity.
* @returns A ConnectorFactory.
*/
createConnectorFactory(claimsIdentity: ClaimsIdentity): ConnectorFactory;
/**
* Creates a BotFrameworkClient used for calling Skills.
*
* @returns A BotFrameworkClient instance to call Skills.
*/
createBotFrameworkClient(): BotFrameworkClient;
private JwtTokenValidation_authenticateRequest;
private JwtTokenValidation_validateAuthHeader;
private JwtTokenValidation_validateClaims;
private JwtTokenValidation_authenticateToken;
private SkillValidation_authenticateChannelToken;
private SkillValidation_ValidateIdentity;
private EmulatorValidation_authenticateEmulatorToken;
private ChannelValidation_authenticateChannelToken;
private ChannelValidation_GetTokenValidationParameters;
private governmentChannelValidation_ValidateIdentity;
}
//# sourceMappingURL=parameterizedBotFrameworkAuthentication.d.ts.map