Langue

SkillValidation.AuthenticateChannelToken Méthode

Définition

Vérifie que l’en-tête d’authentification entrant est un jeton envoyé d’un bot à une compétence ou d’une compétence à 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)

Paramètres

authHeader
String

En-tête HTTP brut au format : « Bearer [longString] ».

credentials
ICredentialProvider

L’utilisateur a défini un ensemble d’informations d’identification valides, telles que l’AppId.

channelProvider
IChannelProvider

Valeur channelService qui distingue azure public d’Azure US Government.

httpClient
HttpClient

L’authentification des jetons nécessite de valider les Endossements et documents associés. Le client Http est utilisé pour effectuer ces appels. Ces appels nécessitent généralement des connexions TLS, qui sont coûteuses à configurer et à démonter, donc un client Http partagé est recommandé.

channelId
String

ID du canal à valider.

authConfig
AuthenticationConfiguration

Configuration de l’authentification.

Retours

Instance ClaimsIdentity si la validation réussit.

S’applique à