共用方式為


IdentityCookieAuthenticationBuilderExtensions.AddTwoFactorUserIdCookie 方法

定義

新增用於兩個因素登入的身分識別 Cookie。

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

參數

builder
AuthenticationBuilder

目前的 AuthenticationBuilder 執行個體。

傳回

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

適用於