SkillValidation.AuthenticateChannelToken メソッド

定義

受信認証ヘッダーが、ボットからスキルまたはスキルからボットに送信されるトークンであることを検証します。

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)

パラメーター

authHeader
String

形式の生の HTTP ヘッダー: "Bearer [longString]"。

credentials
ICredentialProvider

AppId など、有効な資格情報のユーザー定義セット。

channelProvider
IChannelProvider

パブリック Azure と米国政府機関向け Azure を区別する channelService 値。

httpClient
HttpClient

トークンの認証には、エンドースメントや関連書類の検証を呼び出す必要があります。 HttpClientはその通話を行うために使われます。 これらの通話は通常TLS接続を必要とし、設定や解約にコストがかかるため、共有HttpClientを推奨します。

channelId
String

検証するチャネルの ID。

authConfig
AuthenticationConfiguration

認証構成。

返品

検証が成功した場合の ClaimsIdentity インスタンス。

適用対象