ParameterizedBotFrameworkAuthentication class

Extends

Constructors

ParameterizedBotFrameworkAuthentication(boolean, string, string, string, string, string, string, string, ServiceClientCredentialsFactory, AuthenticationConfiguration, (input: RequestInfo, init?: RequestInit) => Promise<Response>, ConnectorClientOptions)

Methods

authenticateChannelRequest(string)
authenticateRequest(Activity, string)

Validate Bot Framework Protocol requests.

authenticateStreamingRequest(string, string)

Validate Bot Framework Protocol requests.

createBotFrameworkClient()

Creates a BotFrameworkClient used 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.

getOriginatingAudience()

Gets the originating audience from Bot OAuth scope.

Constructor Details

ParameterizedBotFrameworkAuthentication(boolean, string, string, string, string, string, string, string, ServiceClientCredentialsFactory, AuthenticationConfiguration, (input: RequestInfo, init?: RequestInit) => Promise<Response>, ConnectorClientOptions)

new ParameterizedBotFrameworkAuthentication(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)

Parameters

validateAuthority

boolean

The validate authority value to use.

toChannelFromBotLoginUrl

string

The to Channel from bot login url.

toChannelFromBotOAuthScope

string

The to Channel from bot oauth scope.

toBotFromChannelTokenIssuer

string

The to bot from Channel Token Issuer.

oAuthUrl

string

The OAuth url.

toBotFromChannelOpenIdMetadataUrl

string

The to bot from Channel Open Id Metadata url.

toBotFromEmulatorOpenIdMetadataUrl

string

The to bot from Emulator Open Id Metadata url.

callerId

string

The callerId set on an authenticated Activities.

credentialsFactory
ServiceClientCredentialsFactory

The ServiceClientCredentialsFactory to use to create credentials.

botFrameworkClientFetch

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

The fetch to use in BotFrameworkClient.

connectorClientOptions
ConnectorClientOptions

The ConnectorClientOptions to use when creating ConnectorClients.

Method Details

authenticateChannelRequest(string)

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

Parameters

authHeader

string

The http auth header received in the skill request.

Returns

Promise<ClaimsIdentity>

The identity validation result.

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 received in the skill request.

Returns

Promise with AuthenticateRequestResult.

authenticateStreamingRequest(string, string)

Validate Bot Framework Protocol requests.

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

Parameters

authHeader

string

The http auth header received in the skill request.

channelIdHeader

string

The channel Id HTTP header.

Returns

Promise with AuthenticateRequestResult.

createBotFrameworkClient()

Creates a BotFrameworkClient used for calling Skills.

function createBotFrameworkClient(): BotFrameworkClient

Returns

A BotFrameworkClient instance to call Skills.

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

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>

Promise with UserTokenClient instance.

getOriginatingAudience()

Gets the originating audience from Bot OAuth scope.

function getOriginatingAudience(): string

Returns

string

The originating audience.