SkillValidation.AuthenticateChannelToken Metoda
Definicja
Ważne
Niektóre informacje odnoszą się do produktu w wersji wstępnej, który może zostać znacząco zmodyfikowany przed wydaniem. Firma Microsoft nie udziela żadnych gwarancji, jawnych lub domniemanych, w odniesieniu do informacji podanych w tym miejscu.
Potwierdza, że nadchodzący nagłówek uwierzytelniania to token wysyłany z bota do umiejętności lub z umiejętności do bota.
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)
Parametry
- authHeader
- String
Surowy nagłówek HTTP w formacie: "Bearer [longString]".
- credentials
- ICredentialProvider
Użytkownik zdefiniował zestaw prawidłowych poświadczeń, takich jak AppId.
- channelProvider
- IChannelProvider
Wartość channelService, która odróżnia publiczne Azure od Azure rządu USA.
- httpClient
- HttpClient
Uwierzytelnianie tokenów wymaga wywołania w celu weryfikacji Endorsmentów i powiązanych dokumentów. Do wykonywania tych wywołań służy HttpClient. Te połączenia zazwyczaj wymagają połączeń TLS, które są kosztowne w konfiguracji i demontażu, dlatego zalecany jest współdzielony HttpClient.
- channelId
- String
ID kanału do weryfikacji.
- authConfig
- AuthenticationConfiguration
Konfiguracja uwierzytelniania.
Zwraca
Instancja, jeśli weryfikacja ClaimsIdentity się powiedzie.