BotFrameworkAuthentication class
Represents a Cloud Environment used to authenticate Bot Framework Protocol network calls within this environment.
Methods
authenticate |
Authenticate Bot Framework Protocol request to Skills. |
authenticate |
Validate Bot Framework Protocol requests. |
authenticate |
Validate Bot Framework Protocol requests. |
create |
Creates a BotFrameworkClient for calling Skills. |
create |
Creates a ConnectorFactory that can be used to create ConnectorClients that can use credentials from this particular Cloud Environment. |
create |
Creates the appropriate UserTokenClient instance. |
get |
Gets the originating audience from Bot OAuth scope. |
Method Details
authenticateChannelRequest(string)
Authenticate Bot Framework Protocol request to Skills.
function authenticateChannelRequest(authHeader: string): Promise<ClaimsIdentity>
Parameters
- authHeader
-
string
The HTTP auth header in the skill request.
Returns
Promise<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>
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>
createBotFrameworkClient()
Creates a BotFrameworkClient for calling Skills.
function createBotFrameworkClient(): BotFrameworkClient
Returns
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
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.
getOriginatingAudience()
Gets the originating audience from Bot OAuth scope.
function getOriginatingAudience(): string
Returns
string
The originating audience.