共用方式為


IdentityCookieAuthenticationBuilderExtensions.AddApplicationCookie 方法

定義

新增身分識別應用程式 Cookie。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Options::OptionsBuilder<Microsoft::AspNetCore::Authentication::Cookies::CookieAuthenticationOptions ^> ^ AddApplicationCookie(Microsoft::AspNetCore::Authentication::AuthenticationBuilder ^ builder);
public static Microsoft.Extensions.Options.OptionsBuilder<Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationOptions> AddApplicationCookie (this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder);
static member AddApplicationCookie : Microsoft.AspNetCore.Authentication.AuthenticationBuilder -> Microsoft.Extensions.Options.OptionsBuilder<Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationOptions>
<Extension()>
Public Function AddApplicationCookie (builder As AuthenticationBuilder) As OptionsBuilder(Of CookieAuthenticationOptions)

參數

builder
AuthenticationBuilder

目前的 AuthenticationBuilder 執行個體。

傳回

OptionsBuilder<TOptions>,可用來設定 Cookie 驗證。

適用於