Share via


GovernmentChannelValidation.AuthenticateChannelToken Method

Definition

Overloads

AuthenticateChannelToken(String, ICredentialProvider, String, HttpClient, String)

Validate the incoming Auth Header as a token sent from a Bot Framework Government Channel Service.

AuthenticateChannelToken(String, ICredentialProvider, String, HttpClient, String, AuthenticationConfiguration)

Validate the incoming Auth Header as a token sent from a Bot Framework Government Channel Service.

AuthenticateChannelToken(String, ICredentialProvider, String, HttpClient, String)

Validate the incoming Auth Header as a token sent from a Bot Framework Government Channel 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

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, String, HttpClient, String, AuthenticationConfiguration)

Validate the incoming Auth Header as a token sent from a Bot Framework Government Channel 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

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.

Applies to