CookieAppBuilderExtensions.UseCookieAuthentication 方法

定義

多載

UseCookieAuthentication(IApplicationBuilder)
已淘汰.
已淘汰.

UseCookieAuthentication 已過時。 使用 AddAuthentication () 設定 Cookie 驗證。ConfigureServices 中的 AddCookie。 如需更多詳細資料,請參閱 https://go.microsoft.com/fwlink/?linkid=845470 \(英文\)。

UseCookieAuthentication(IApplicationBuilder, CookieAuthenticationOptions)
已淘汰.
已淘汰.

UseCookieAuthentication 已過時。 使用 AddAuthentication () 設定 Cookie 驗證。ConfigureServices 中的 AddCookie。 如需更多詳細資料,請參閱 https://go.microsoft.com/fwlink/?linkid=845470 \(英文\)。

UseCookieAuthentication(IApplicationBuilder, CookieAuthenticationOptions)

CookieAuthenticationMiddleware 中介軟體新增至指定的 IApplicationBuilder ,以啟用 Cookie 驗證功能。

UseCookieAuthentication(IApplicationBuilder)

警告

UseCookieAuthentication is obsolete. Configure Cookie authentication with AddAuthentication().AddCookie in ConfigureServices. See https://go.microsoft.com/fwlink/?linkid=845470 for more details.

UseCookieAuthentication 已過時。 使用 AddAuthentication () 設定 Cookie 驗證。ConfigureServices 中的 AddCookie。 如需更多詳細資料,請參閱 https://go.microsoft.com/fwlink/?linkid=845470 \(英文\)。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseCookieAuthentication(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseCookieAuthentication (this Microsoft.AspNetCore.Builder.IApplicationBuilder app);
[System.Obsolete("See https://go.microsoft.com/fwlink/?linkid=845470", true)]
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseCookieAuthentication (this Microsoft.AspNetCore.Builder.IApplicationBuilder app);
[System.Obsolete("UseCookieAuthentication is obsolete. Configure Cookie authentication with AddAuthentication().AddCookie in ConfigureServices. See https://go.microsoft.com/fwlink/?linkid=845470 for more details.", true)]
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseCookieAuthentication (this Microsoft.AspNetCore.Builder.IApplicationBuilder app);
static member UseCookieAuthentication : Microsoft.AspNetCore.Builder.IApplicationBuilder -> Microsoft.AspNetCore.Builder.IApplicationBuilder
[<System.Obsolete("See https://go.microsoft.com/fwlink/?linkid=845470", true)>]
static member UseCookieAuthentication : Microsoft.AspNetCore.Builder.IApplicationBuilder -> Microsoft.AspNetCore.Builder.IApplicationBuilder
[<System.Obsolete("UseCookieAuthentication is obsolete. Configure Cookie authentication with AddAuthentication().AddCookie in ConfigureServices. See https://go.microsoft.com/fwlink/?linkid=845470 for more details.", true)>]
static member UseCookieAuthentication : Microsoft.AspNetCore.Builder.IApplicationBuilder -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseCookieAuthentication (app As IApplicationBuilder) As IApplicationBuilder

參數

app
IApplicationBuilder

IApplicationBuilder要加入處理常式的 。

傳回

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

屬性

適用於

UseCookieAuthentication(IApplicationBuilder, CookieAuthenticationOptions)

警告

UseCookieAuthentication is obsolete. Configure Cookie authentication with AddAuthentication().AddCookie in ConfigureServices. See https://go.microsoft.com/fwlink/?linkid=845470 for more details.

UseCookieAuthentication 已過時。 使用 AddAuthentication () 設定 Cookie 驗證。ConfigureServices 中的 AddCookie。 如需更多詳細資料,請參閱 https://go.microsoft.com/fwlink/?linkid=845470 \(英文\)。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseCookieAuthentication(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app, Microsoft::AspNetCore::Authentication::Cookies::CookieAuthenticationOptions ^ options);
[System.Obsolete("See https://go.microsoft.com/fwlink/?linkid=845470", true)]
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseCookieAuthentication (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationOptions options);
[System.Obsolete("UseCookieAuthentication is obsolete. Configure Cookie authentication with AddAuthentication().AddCookie in ConfigureServices. See https://go.microsoft.com/fwlink/?linkid=845470 for more details.", true)]
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseCookieAuthentication (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationOptions options);
[<System.Obsolete("See https://go.microsoft.com/fwlink/?linkid=845470", true)>]
static member UseCookieAuthentication : Microsoft.AspNetCore.Builder.IApplicationBuilder * Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationOptions -> Microsoft.AspNetCore.Builder.IApplicationBuilder
[<System.Obsolete("UseCookieAuthentication is obsolete. Configure Cookie authentication with AddAuthentication().AddCookie in ConfigureServices. See https://go.microsoft.com/fwlink/?linkid=845470 for more details.", true)>]
static member UseCookieAuthentication : Microsoft.AspNetCore.Builder.IApplicationBuilder * Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationOptions -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseCookieAuthentication (app As IApplicationBuilder, options As CookieAuthenticationOptions) As IApplicationBuilder

參數

app
IApplicationBuilder

IApplicationBuilder要加入處理常式的 。

options
CookieAuthenticationOptions

CookieAuthenticationOptions 指定處理常式的選項。

傳回

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

屬性

適用於

UseCookieAuthentication(IApplicationBuilder, CookieAuthenticationOptions)

CookieAuthenticationMiddleware 中介軟體新增至指定的 IApplicationBuilder ,以啟用 Cookie 驗證功能。

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

參數

app
IApplicationBuilder

IApplicationBuilder要加入中介軟體的 。

options
CookieAuthenticationOptions

CookieAuthenticationOptions 指定中介軟體的選項。

傳回

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

適用於