語言

EmulatorValidation.AuthenticateEmulatorToken 方法

定義

多載

名稱 Description
AuthenticateEmulatorToken(String, ICredentialProvider, IChannelProvider, HttpClient, String)

將傳入的驗證標頭驗證為從 Bot Framework 模擬器傳送的令牌。

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

將傳入的驗證標頭驗證為從 Bot Framework 模擬器傳送的令牌。

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

將傳入的驗證標頭驗證為從 Bot Framework 模擬器傳送的令牌。

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)

參數

authHeader
String

格式為“Bearer [longString]” 的原始 HTTP 標頭。

credentials
ICredentialProvider

使用者定義的有效認證集,例如 AppId。

channelProvider
IChannelProvider

channelService 值,可區分公用 Azure 與美國政府 Azure。

httpClient
HttpClient

憑證認證需要呼叫以驗證背書及相關文件。 HttpClient 就是用來打這些電話的。 這些通話通常需要 TLS 連線,且設定和拆除成本高昂,因此建議使用共用的 HttpClient。

channelId
String

要驗證之通道的標識碼。

傳回

有效的 ClaimsIdentity。

備註

Bot Framework 所發出的令牌將會失敗此檢查。 只會傳遞模擬器令牌。

適用於

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

將傳入的驗證標頭驗證為從 Bot Framework 模擬器傳送的令牌。

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)

參數

authHeader
String

格式為“Bearer [longString]” 的原始 HTTP 標頭。

credentials
ICredentialProvider

使用者定義的有效認證集,例如 AppId。

channelProvider
IChannelProvider

channelService 值,可區分公用 Azure 與美國政府 Azure。

httpClient
HttpClient

憑證認證需要呼叫以驗證背書及相關文件。 HttpClient 就是用來打這些電話的。 這些通話通常需要 TLS 連線,且設定和拆除成本高昂,因此建議使用共用的 HttpClient。

channelId
String

要驗證之通道的標識碼。

authConfig
AuthenticationConfiguration

驗證組態。

傳回

有效的 ClaimsIdentity。

備註

Bot Framework 所發出的令牌將會失敗此檢查。 只會傳遞模擬器令牌。

適用於