ConfigurationBotFrameworkAuthentication class
Creates a BotFrameworkAuthentication instance from an object with the authentication values or a Configuration instance.
- Extends
-
BotFrameworkAuthentication
Constructors
Methods
authenticate |
Authenticate Bot Framework Protocol requests 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. |
Inherited Methods
get |
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
- botFrameworkAuthConfig
- ConfigurationBotFrameworkAuthenticationOptions
- 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>
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
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
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