你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
ServiceAuthenticationFilter.AuthenticateAsync 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
AuthenticateAsync(IAuthenticationManager) |
通过查找具有给定 AuthenticationType 的 OWIN 身份验证中间件并将身份验证委托给该中间件,对当前请求进行异步身份验证。 |
AuthenticateAsync(HttpAuthenticationContext, CancellationToken) |
通过查找具有给定 AuthenticationType 的 OWIN 身份验证中间件并将身份验证委托给该中间件,对当前请求进行异步身份验证。 |
AuthenticateAsync(IAuthenticationManager)
通过查找具有给定 AuthenticationType 的 OWIN 身份验证中间件并将身份验证委托给该中间件,对当前请求进行异步身份验证。
protected virtual System.Threading.Tasks.Task<System.Security.Principal.IPrincipal> AuthenticateAsync (Microsoft.Owin.Security.IAuthenticationManager authenticationManager);
abstract member AuthenticateAsync : Microsoft.Owin.Security.IAuthenticationManager -> System.Threading.Tasks.Task<System.Security.Principal.IPrincipal>
override this.AuthenticateAsync : Microsoft.Owin.Security.IAuthenticationManager -> System.Threading.Tasks.Task<System.Security.Principal.IPrincipal>
Protected Overridable Function AuthenticateAsync (authenticationManager As IAuthenticationManager) As Task(Of IPrincipal)
参数
- authenticationManager
- Microsoft.Owin.Security.IAuthenticationManager
Microsoft.Owin.Security.IAuthenticationManager用于执行身份验证的 。
返回
表示 Task<TResult> 身份验证操作的 。
适用于
AuthenticateAsync(HttpAuthenticationContext, CancellationToken)
通过查找具有给定 AuthenticationType 的 OWIN 身份验证中间件并将身份验证委托给该中间件,对当前请求进行异步身份验证。
public virtual System.Threading.Tasks.Task AuthenticateAsync (System.Web.Http.Filters.HttpAuthenticationContext context, System.Threading.CancellationToken cancellationToken);
abstract member AuthenticateAsync : System.Web.Http.Filters.HttpAuthenticationContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.AuthenticateAsync : System.Web.Http.Filters.HttpAuthenticationContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Overridable Function AuthenticateAsync (context As HttpAuthenticationContext, cancellationToken As CancellationToken) As Task
参数
- context
- System.Web.Http.Filters.HttpAuthenticationContext
身份验证上下文。
- cancellationToken
- CancellationToken
取消标记。
返回
表示 Task 身份验证操作的 。
实现
System.Web.Http.Filters.IAuthenticationFilter.AuthenticateAsync(System.Web.Http.Filters.HttpAuthenticationContext,System.Threading.CancellationToken)