JwtTokenValidation.ValidateAuthHeader 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
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 客户端。
返回
一个任务,表示排队要执行的工作。
注解
如果任务成功完成,则结果包含请求的基于声明的标识。