共用方式為


IdentityCookieAuthenticationBuilderExtensions.AddExternalCookie 方法

定義

新增用於外部登入的身分識別 Cookie。

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

參數

builder
AuthenticationBuilder

目前的 AuthenticationBuilder 執行個體。

傳回

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

適用於