ConfigurationBotFrameworkAuthentication class

Creates a BotFrameworkAuthentication instance from an object with the authentication values or a Configuration instance.

Extends

BotFrameworkAuthentication

Constructors

ConfigurationBotFrameworkAuthentication(ConfigurationBotFrameworkAuthenticationOptions, ServiceClientCredentialsFactory, AuthenticationConfiguration, (input: RequestInfo, init?: RequestInit) => Promise<Response>, ConnectorClientOptions)

Initializes a new instance of the ConfigurationBotFrameworkAuthentication class.

Methods

authenticateChannelRequest(string)

Authenticate Bot Framework Protocol requests to Skills.

authenticateRequest(Activity, string)

Validate Bot Framework Protocol requests.

authenticateStreamingRequest(string, string)

Validate Bot Framework Protocol requests.

createBotFrameworkClient()

Creates a BotFrameworkClient for calling Skills.

createConnectorFactory(ClaimsIdentity)

Creates a ConnectorFactory that can be used to create ConnectorClients that can use credentials from this particular Cloud Environment.

createUserTokenClient(ClaimsIdentity)

Creates the appropriate UserTokenClient instance.

Inherited Methods

getOriginatingAudience()

Gets the originating audience from Bot OAuth scope.

Constructor Details

ConfigurationBotFrameworkAuthentication(ConfigurationBotFrameworkAuthenticationOptions, ServiceClientCredentialsFactory, AuthenticationConfiguration, (input: RequestInfo, init?: RequestInit) => Promise<Response>, ConnectorClientOptions)

Initializes a new instance of the ConfigurationBotFrameworkAuthentication class.

new ConfigurationBotFrameworkAuthentication(botFrameworkAuthConfig?: ConfigurationBotFrameworkAuthenticationOptions, credentialsFactory?: ServiceClientCredentialsFactory, authConfiguration?: AuthenticationConfiguration, botFrameworkClientFetch?: (input: RequestInfo, init?: RequestInit) => Promise<Response>, connectorClientOptions?: ConnectorClientOptions)

Parameters

credentialsFactory

ServiceClientCredentialsFactory

A ServiceClientCredentialsFactory instance.

authConfiguration

AuthenticationConfiguration

A Configuration object.

botFrameworkClientFetch

(input: RequestInfo, init?: RequestInit) => Promise<Response>

A custom Fetch implementation to be used in the BotFrameworkClient.

connectorClientOptions

ConnectorClientOptions

A ConnectorClientOptions object.

Method Details

authenticateChannelRequest(string)

Authenticate Bot Framework Protocol requests to Skills.

function authenticateChannelRequest(authHeader: string): Promise<ClaimsIdentity>

Parameters

authHeader

string

The http auth header received in the skill request.

Returns

Promise<ClaimsIdentity>

A ClaimsIdentity.

authenticateRequest(Activity, string)

Validate Bot Framework Protocol requests.

function authenticateRequest(activity: Activity, authHeader: string): Promise<AuthenticateRequestResult>

Parameters

activity

Activity

The inbound Activity.

authHeader

string

The HTTP auth header.

Returns

Promise<AuthenticateRequestResult>

An AuthenticateRequestResult.

authenticateStreamingRequest(string, string)

Validate Bot Framework Protocol requests.

function authenticateStreamingRequest(authHeader: string, channelIdHeader: string): Promise<AuthenticateRequestResult>

Parameters

authHeader

string

The HTTP auth header.

channelIdHeader

string

The channel ID HTTP header.

Returns

Promise<AuthenticateRequestResult>

An AuthenticateRequestResult.

createBotFrameworkClient()

Creates a BotFrameworkClient for calling Skills.

function createBotFrameworkClient(): BotFrameworkClient

Returns

BotFrameworkClient

A BotFrameworkClient.

createConnectorFactory(ClaimsIdentity)

Creates a ConnectorFactory that can be used to create ConnectorClients that can use credentials from this particular Cloud Environment.

function createConnectorFactory(claimsIdentity: ClaimsIdentity): ConnectorFactory

Parameters

claimsIdentity

ClaimsIdentity

The inbound Activity's ClaimsIdentity.

Returns

ConnectorFactory

A ConnectorFactory.

createUserTokenClient(ClaimsIdentity)

Creates the appropriate UserTokenClient instance.

function createUserTokenClient(claimsIdentity: ClaimsIdentity): Promise<UserTokenClient>

Parameters

claimsIdentity

ClaimsIdentity

The inbound Activity's ClaimsIdentity.

Returns

Promise<UserTokenClient>

An UserTokenClient.

Inherited Method Details

getOriginatingAudience()

Gets the originating audience from Bot OAuth scope.

function getOriginatingAudience(): string

Returns

string

The originating audience.

Inherited From BotFrameworkAuthentication.getOriginatingAudience