JwtTokenValidation.AuthenticateRequest Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
AuthenticateRequest(IActivity, String, ICredentialProvider, IChannelProvider, HttpClient) |
Authenticates the request and adds the activity's ServiceUrl to the set of trusted URLs. |
AuthenticateRequest(IActivity, String, ICredentialProvider, IChannelProvider, AuthenticationConfiguration, HttpClient) |
Authenticates the request and adds the activity's ServiceUrl to the set of trusted URLs. |
AuthenticateRequest(IActivity, String, ICredentialProvider, IChannelProvider, HttpClient)
Authenticates the request and adds the activity's ServiceUrl to the set of trusted URLs.
public static System.Threading.Tasks.Task<System.Security.Claims.ClaimsIdentity> AuthenticateRequest (Microsoft.Bot.Schema.IActivity activity, string authHeader, Microsoft.Bot.Connector.Authentication.ICredentialProvider credentials, Microsoft.Bot.Connector.Authentication.IChannelProvider provider, System.Net.Http.HttpClient httpClient = default);
static member AuthenticateRequest : Microsoft.Bot.Schema.IActivity * string * Microsoft.Bot.Connector.Authentication.ICredentialProvider * Microsoft.Bot.Connector.Authentication.IChannelProvider * System.Net.Http.HttpClient -> System.Threading.Tasks.Task<System.Security.Claims.ClaimsIdentity>
Public Shared Function AuthenticateRequest (activity As IActivity, authHeader As String, credentials As ICredentialProvider, provider As IChannelProvider, Optional httpClient As HttpClient = Nothing) As Task(Of ClaimsIdentity)
Parameters
- activity
- IActivity
The activity.
- authHeader
- String
The authentication header.
- credentials
- ICredentialProvider
The bot's credential provider.
- provider
- IChannelProvider
The bot's channel service provider.
- httpClient
- HttpClient
The HTTP client.
Returns
A task that represents the work queued to execute.
Remarks
If the task completes successfully, the result contains the claims-based identity for the request.
Applies to
AuthenticateRequest(IActivity, String, ICredentialProvider, IChannelProvider, AuthenticationConfiguration, HttpClient)
Authenticates the request and adds the activity's ServiceUrl to the set of trusted URLs.
public static System.Threading.Tasks.Task<System.Security.Claims.ClaimsIdentity> AuthenticateRequest (Microsoft.Bot.Schema.IActivity activity, string authHeader, Microsoft.Bot.Connector.Authentication.ICredentialProvider credentials, Microsoft.Bot.Connector.Authentication.IChannelProvider provider, Microsoft.Bot.Connector.Authentication.AuthenticationConfiguration authConfig, System.Net.Http.HttpClient httpClient = default);
static member AuthenticateRequest : Microsoft.Bot.Schema.IActivity * string * Microsoft.Bot.Connector.Authentication.ICredentialProvider * Microsoft.Bot.Connector.Authentication.IChannelProvider * Microsoft.Bot.Connector.Authentication.AuthenticationConfiguration * System.Net.Http.HttpClient -> System.Threading.Tasks.Task<System.Security.Claims.ClaimsIdentity>
Public Shared Function AuthenticateRequest (activity As IActivity, authHeader As String, credentials As ICredentialProvider, provider As IChannelProvider, authConfig As AuthenticationConfiguration, Optional httpClient As HttpClient = Nothing) As Task(Of ClaimsIdentity)
Parameters
- activity
- IActivity
The activity.
- authHeader
- String
The authentication header.
- credentials
- ICredentialProvider
The bot's credential provider.
- provider
- IChannelProvider
The bot's channel service provider.
- authConfig
- AuthenticationConfiguration
The optional authentication configuration.
- httpClient
- HttpClient
The HTTP client.
Returns
A task that represents the work queued to execute.
Remarks
If the task completes successfully, the result contains the claims-based identity for the request.