Udostępnij za pośrednictwem


EmulatorValidation.AuthenticateEmulatorToken Metoda

Definicja

Przeciążenia

AuthenticateEmulatorToken(String, ICredentialProvider, IChannelProvider, HttpClient, String)

Zweryfikuj przychodzący nagłówek uwierzytelniania jako token wysłany z Bot Framework Emulator.

AuthenticateEmulatorToken(String, ICredentialProvider, IChannelProvider, HttpClient, String, AuthenticationConfiguration)

Zweryfikuj przychodzący nagłówek uwierzytelniania jako token wysłany z Bot Framework Emulator.

AuthenticateEmulatorToken(String, ICredentialProvider, IChannelProvider, HttpClient, String)

Zweryfikuj przychodzący nagłówek uwierzytelniania jako token wysłany z Bot Framework Emulator.

public static System.Threading.Tasks.Task<System.Security.Claims.ClaimsIdentity> AuthenticateEmulatorToken(string authHeader, Microsoft.Bot.Connector.Authentication.ICredentialProvider credentials, Microsoft.Bot.Connector.Authentication.IChannelProvider channelProvider, System.Net.Http.HttpClient httpClient, string channelId);
static member AuthenticateEmulatorToken : string * Microsoft.Bot.Connector.Authentication.ICredentialProvider * Microsoft.Bot.Connector.Authentication.IChannelProvider * System.Net.Http.HttpClient * string -> System.Threading.Tasks.Task<System.Security.Claims.ClaimsIdentity>
Public Shared Function AuthenticateEmulatorToken (authHeader As String, credentials As ICredentialProvider, channelProvider As IChannelProvider, httpClient As HttpClient, channelId As String) As Task(Of ClaimsIdentity)

Parametry

authHeader
String

Nieprzetworzona 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 publiczną platformę Azure od platformy Azure dla instytucji rządowych USA.

httpClient
HttpClient

Uwierzytelnianie tokenów wymaga wywołania w celu zweryfikowania poręczenia i powiązanych dokumentów. Obiekt HttpClient jest używany do wykonywania tych wywołań. Te wywołania zazwyczaj wymagają połączeń TLS, które są kosztowne do skonfigurowania i usuwania, dlatego zalecany jest udostępniony obiekt HttpClient.

channelId
String

Identyfikator kanału do zweryfikowania.

Zwraca

Prawidłowa wartość ClaimsIdentity.

Uwagi

Token wystawiony przez platformę Bot Framework zakończy się niepowodzeniem. Będą przekazywane tylko tokeny emulatora.

Dotyczy

AuthenticateEmulatorToken(String, ICredentialProvider, IChannelProvider, HttpClient, String, AuthenticationConfiguration)

Zweryfikuj przychodzący nagłówek uwierzytelniania jako token wysłany z Bot Framework Emulator.

public static System.Threading.Tasks.Task<System.Security.Claims.ClaimsIdentity> AuthenticateEmulatorToken(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 AuthenticateEmulatorToken : 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 AuthenticateEmulatorToken (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

Nieprzetworzona 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 publiczną platformę Azure od platformy Azure dla instytucji rządowych USA.

httpClient
HttpClient

Uwierzytelnianie tokenów wymaga wywołania w celu zweryfikowania poręczenia i powiązanych dokumentów. Obiekt HttpClient jest używany do wykonywania tych wywołań. Te wywołania zazwyczaj wymagają połączeń TLS, które są kosztowne do skonfigurowania i usuwania, dlatego zalecany jest udostępniony obiekt HttpClient.

channelId
String

Identyfikator kanału do zweryfikowania.

authConfig
AuthenticationConfiguration

Konfiguracja uwierzytelniania.

Zwraca

Prawidłowa wartość ClaimsIdentity.

Uwagi

Token wystawiony przez platformę Bot Framework zakończy się niepowodzeniem. Będą przekazywane tylko tokeny emulatora.

Dotyczy