AuthAppBuilderExtensions.UseAuthentication(IApplicationBuilder) 方法

定义

AuthenticationMiddleware将 添加到指定的 IApplicationBuilder中,这将启用身份验证功能。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseAuthentication(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseAuthentication (this Microsoft.AspNetCore.Builder.IApplicationBuilder app);
static member UseAuthentication : Microsoft.AspNetCore.Builder.IApplicationBuilder -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseAuthentication (app As IApplicationBuilder) As IApplicationBuilder

参数

app
IApplicationBuilder

IApplicationBuilder 向其添加中间件的 。

返回

完成操作后对此实例的引用。

适用于