ChannelValidation.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, HttpClient, String) |
Validate the incoming Auth Header as a token sent from the Bot Framework Service. |
AuthenticateChannelToken(String, ICredentialProvider, HttpClient, String, AuthenticationConfiguration) |
Validate the incoming Auth Header as a token sent from the Bot Framework Service. |
AuthenticateChannelToken(String, ICredentialProvider, String, HttpClient, String) |
Validate the incoming Auth Header as a token sent from the Bot Framework Service. |
AuthenticateChannelToken(String, ICredentialProvider, String, HttpClient, String, AuthenticationConfiguration) |
Validate the incoming Auth Header as a token sent from the Bot Framework Service. |
AuthenticateChannelToken(String, ICredentialProvider, HttpClient, String)
Validate the incoming Auth Header as a token sent from the Bot Framework Service.
public static System.Threading.Tasks.Task<System.Security.Claims.ClaimsIdentity> AuthenticateChannelToken (string authHeader, Microsoft.Bot.Connector.Authentication.ICredentialProvider credentials, System.Net.Http.HttpClient httpClient, string channelId);
static member AuthenticateChannelToken : string * Microsoft.Bot.Connector.Authentication.ICredentialProvider * System.Net.Http.HttpClient * string -> System.Threading.Tasks.Task<System.Security.Claims.ClaimsIdentity>
Public Shared Function AuthenticateChannelToken (authHeader As String, credentials As ICredentialProvider, 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.
- 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
A valid ClaimsIdentity.
Remarks
A token issued by the Bot Framework emulator will FAIL this check.
Applies to
AuthenticateChannelToken(String, ICredentialProvider, HttpClient, String, AuthenticationConfiguration)
Validate the incoming Auth Header as a token sent from the Bot Framework Service.
public static System.Threading.Tasks.Task<System.Security.Claims.ClaimsIdentity> AuthenticateChannelToken (string authHeader, Microsoft.Bot.Connector.Authentication.ICredentialProvider credentials, System.Net.Http.HttpClient httpClient, string channelId, Microsoft.Bot.Connector.Authentication.AuthenticationConfiguration authConfig);
static member AuthenticateChannelToken : string * Microsoft.Bot.Connector.Authentication.ICredentialProvider * 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, 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.
- 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
A valid ClaimsIdentity.
Remarks
A token issued by the Bot Framework emulator will FAIL this check.
Applies to
AuthenticateChannelToken(String, ICredentialProvider, String, HttpClient, String)
Validate the incoming Auth Header as a token sent from the Bot Framework Service.
public static System.Threading.Tasks.Task<System.Security.Claims.ClaimsIdentity> AuthenticateChannelToken (string authHeader, Microsoft.Bot.Connector.Authentication.ICredentialProvider credentials, string serviceUrl, System.Net.Http.HttpClient httpClient, string channelId);
static member AuthenticateChannelToken : string * Microsoft.Bot.Connector.Authentication.ICredentialProvider * string * System.Net.Http.HttpClient * string -> System.Threading.Tasks.Task<System.Security.Claims.ClaimsIdentity>
Public Shared Function AuthenticateChannelToken (authHeader As String, credentials As ICredentialProvider, 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.
- serviceUrl
- String
Service url.
- 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, String, HttpClient, String, AuthenticationConfiguration)
Validate the incoming Auth Header as a token sent from the Bot Framework Service.
public static System.Threading.Tasks.Task<System.Security.Claims.ClaimsIdentity> AuthenticateChannelToken (string authHeader, Microsoft.Bot.Connector.Authentication.ICredentialProvider credentials, string serviceUrl, System.Net.Http.HttpClient httpClient, string channelId, Microsoft.Bot.Connector.Authentication.AuthenticationConfiguration authConfig);
static member AuthenticateChannelToken : string * Microsoft.Bot.Connector.Authentication.ICredentialProvider * 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, 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.
- serviceUrl
- String
Service url.
- 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.