EnterpriseChannelValidation.AuthenticateChannelToken Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
AuthenticateChannelToken(String, ICredentialProvider, IChannelProvider, String, HttpClient, String) |
Validate the incoming Auth Header as a token sent from a Bot Framework Channel Service. |
AuthenticateChannelToken(String, ICredentialProvider, IChannelProvider, String, HttpClient, String, AuthenticationConfiguration) |
Validate the incoming Auth Header as a token sent from a Bot Framework Channel Service. |
AuthenticateChannelToken(String, ICredentialProvider, IChannelProvider, String, HttpClient, String)
Validate the incoming Auth Header as a token sent from a Bot Framework Channel Service.
public static System.Threading.Tasks.Task<System.Security.Claims.ClaimsIdentity> AuthenticateChannelToken (string authHeader, Microsoft.Bot.Connector.Authentication.ICredentialProvider credentials, Microsoft.Bot.Connector.Authentication.IChannelProvider channelProvider, string serviceUrl, System.Net.Http.HttpClient httpClient, string channelId);
static member AuthenticateChannelToken : string * Microsoft.Bot.Connector.Authentication.ICredentialProvider * Microsoft.Bot.Connector.Authentication.IChannelProvider * string * System.Net.Http.HttpClient * string -> System.Threading.Tasks.Task<System.Security.Claims.ClaimsIdentity>
Public Shared Function AuthenticateChannelToken (authHeader As String, credentials As ICredentialProvider, channelProvider As IChannelProvider, serviceUrl As String, httpClient As HttpClient, channelId As String) As Task(Of ClaimsIdentity)
Parameters
- authHeader
- String
The raw HTTP header in the format: "Bearer [longString]".
- credentials
- ICredentialProvider
The user defined set of valid credentials, such as the AppId.
- channelProvider
- IChannelProvider
The user defined configuration for the channel.
- serviceUrl
- String
The service url from the request.
- httpClient
- HttpClient
Authentication of tokens requires calling out to validate Endorsements and related documents. The HttpClient is used for making those calls. Those calls generally require TLS connections, which are expensive to setup and teardown, so a shared HttpClient is recommended.
- channelId
- String
The ID of the channel to validate.
Returns
ClaimsIdentity.
Applies to
AuthenticateChannelToken(String, ICredentialProvider, IChannelProvider, String, HttpClient, String, AuthenticationConfiguration)
Validate the incoming Auth Header as a token sent from a Bot Framework Channel Service.
public static System.Threading.Tasks.Task<System.Security.Claims.ClaimsIdentity> AuthenticateChannelToken (string authHeader, Microsoft.Bot.Connector.Authentication.ICredentialProvider credentials, Microsoft.Bot.Connector.Authentication.IChannelProvider channelProvider, string serviceUrl, System.Net.Http.HttpClient httpClient, string channelId, Microsoft.Bot.Connector.Authentication.AuthenticationConfiguration authConfig);
static member AuthenticateChannelToken : string * Microsoft.Bot.Connector.Authentication.ICredentialProvider * Microsoft.Bot.Connector.Authentication.IChannelProvider * string * System.Net.Http.HttpClient * string * Microsoft.Bot.Connector.Authentication.AuthenticationConfiguration -> System.Threading.Tasks.Task<System.Security.Claims.ClaimsIdentity>
Public Shared Function AuthenticateChannelToken (authHeader As String, credentials As ICredentialProvider, channelProvider As IChannelProvider, serviceUrl As String, httpClient As HttpClient, channelId As String, authConfig As AuthenticationConfiguration) As Task(Of ClaimsIdentity)
Parameters
- authHeader
- String
The raw HTTP header in the format: "Bearer [longString]".
- credentials
- ICredentialProvider
The user defined set of valid credentials, such as the AppId.
- channelProvider
- IChannelProvider
The user defined configuration for the channel.
- serviceUrl
- String
The service url from the request.
- httpClient
- HttpClient
Authentication of tokens requires calling out to validate Endorsements and related documents. The HttpClient is used for making those calls. Those calls generally require TLS connections, which are expensive to setup and teardown, so a shared HttpClient is recommended.
- channelId
- String
The ID of the channel to validate.
- authConfig
- AuthenticationConfiguration
The authentication configuration.
Returns
ClaimsIdentity.