共用方式為


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 加入中介軟體的 。

傳回

完成作業之後,這個執行個體的參考。

適用於