语言

JwtTokenValidation.ValidateAuthHeader 方法

定义

重载

ValidateAuthHeader(String, ICredentialProvider, IChannelProvider, String, String, HttpClient)

验证传入请求的身份验证标头。

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

参数

authHeader
String

要验证的身份验证标头。

credentials
ICredentialProvider

机器人的凭据提供程序。

channelProvider
IChannelProvider

机器人的通道服务提供商。

channelId
String

发送请求的通道的 ID。

serviceUrl
String

活动的服务 URL。

httpClient
HttpClient

HTTP 客户端。

返回

表示要执行的工作的任务。

注解

如果任务成功完成,结果中包含基于索赔的请求身份。

适用于

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

验证传入请求的身份验证标头。

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

参数

authHeader
String

要验证的身份验证标头。

credentials
ICredentialProvider

机器人的凭据提供程序。

channelProvider
IChannelProvider

机器人的通道服务提供商。

channelId
String

发送请求的通道的 ID。

authConfig
AuthenticationConfiguration

身份验证配置。

serviceUrl
String

活动的服务 URL。

httpClient
HttpClient

HTTP 客户端。

返回

表示要执行的工作的任务。

注解

如果任务成功完成,结果中包含基于索赔的请求身份。

适用于