SkillValidation.AuthenticateChannelToken Método

Definición

Valida que el encabezado de autenticación entrante es un token enviado desde un bot a una aptitud o desde una aptitud a un bot.

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, 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 * 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, httpClient As HttpClient, channelId As String, authConfig As AuthenticationConfiguration) As Task(Of ClaimsIdentity)

Parámetros

authHeader
String

Encabezado HTTP sin formato con el formato "Bearer [longString]".

credentials
ICredentialProvider

Conjunto definido por el usuario de credenciales válidas, como AppId.

channelProvider
IChannelProvider

Valor channelService que distingue azure público de Azure de Azure government de EE. UU.

httpClient
HttpClient

La autenticación de tokens requiere llamar para validar Endosos y documentos relacionados. El HttpClient se utiliza para hacer esas llamadas. Esas llamadas generalmente requieren conexiones TLS, que son caras de configurar y desmontar, por lo que se recomienda un Cliente Http compartido.

channelId
String

Identificador del canal que se va a validar.

authConfig
AuthenticationConfiguration

Configuración de autenticación.

Devoluciones

Una instancia de ClaimsIdentity si la validación se realiza correctamente.

Se aplica a