CookieExtensions.AddCookie 方法

定義

多載

AddCookie(AuthenticationBuilder)

使用預設配置將 Cookie 驗證新增至 AuthenticationBuilder 。 預設配置是由 指定 AuthenticationScheme

Cookie 驗證會使用保存在用戶端中的 HTTP Cookie 來執行驗證。

AddCookie(AuthenticationBuilder, Action<CookieAuthenticationOptions>)

使用預設配置將 Cookie 驗證新增至 AuthenticationBuilder 。 預設配置是由 指定 AuthenticationScheme

Cookie 驗證會使用保存在用戶端中的 HTTP Cookie 來執行驗證。

AddCookie(AuthenticationBuilder, String)

使用指定的配置,將 Cookie 驗證新增至 AuthenticationBuilder

Cookie 驗證會使用保存在用戶端中的 HTTP Cookie 來執行驗證。

AddCookie(AuthenticationBuilder, String, Action<CookieAuthenticationOptions>)

使用指定的配置,將 Cookie 驗證新增至 AuthenticationBuilder

Cookie 驗證會使用保存在用戶端中的 HTTP Cookie 來執行驗證。

AddCookie(AuthenticationBuilder, String, String, Action<CookieAuthenticationOptions>)

使用指定的配置,將 Cookie 驗證新增至 AuthenticationBuilder

Cookie 驗證會使用保存在用戶端中的 HTTP Cookie 來執行驗證。

AddCookie(AuthenticationBuilder)

來源:
CookieExtensions.cs
來源:
CookieExtensions.cs

使用預設配置將 Cookie 驗證新增至 AuthenticationBuilder 。 預設配置是由 指定 AuthenticationScheme

Cookie 驗證會使用保存在用戶端中的 HTTP Cookie 來執行驗證。

public static Microsoft.AspNetCore.Authentication.AuthenticationBuilder AddCookie (this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder);
static member AddCookie : Microsoft.AspNetCore.Authentication.AuthenticationBuilder -> Microsoft.AspNetCore.Authentication.AuthenticationBuilder
<Extension()>
Public Function AddCookie (builder As AuthenticationBuilder) As AuthenticationBuilder

參數

傳回

作業完成之後的 builder 參考。

適用於

AddCookie(AuthenticationBuilder, Action<CookieAuthenticationOptions>)

來源:
CookieExtensions.cs
來源:
CookieExtensions.cs

使用預設配置將 Cookie 驗證新增至 AuthenticationBuilder 。 預設配置是由 指定 AuthenticationScheme

Cookie 驗證會使用保存在用戶端中的 HTTP Cookie 來執行驗證。

public static Microsoft.AspNetCore.Authentication.AuthenticationBuilder AddCookie (this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder, Action<Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationOptions> configureOptions);
static member AddCookie : Microsoft.AspNetCore.Authentication.AuthenticationBuilder * Action<Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationOptions> -> Microsoft.AspNetCore.Authentication.AuthenticationBuilder
<Extension()>
Public Function AddCookie (builder As AuthenticationBuilder, configureOptions As Action(Of CookieAuthenticationOptions)) As AuthenticationBuilder

參數

configureOptions
Action<CookieAuthenticationOptions>

要設定 CookieAuthenticationOptions 的委派。

傳回

作業完成之後的 builder 參考。

適用於

AddCookie(AuthenticationBuilder, String)

來源:
CookieExtensions.cs
來源:
CookieExtensions.cs

使用指定的配置,將 Cookie 驗證新增至 AuthenticationBuilder

Cookie 驗證會使用保存在用戶端中的 HTTP Cookie 來執行驗證。

public static Microsoft.AspNetCore.Authentication.AuthenticationBuilder AddCookie (this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder, string authenticationScheme);
static member AddCookie : Microsoft.AspNetCore.Authentication.AuthenticationBuilder * string -> Microsoft.AspNetCore.Authentication.AuthenticationBuilder
<Extension()>
Public Function AddCookie (builder As AuthenticationBuilder, authenticationScheme As String) As AuthenticationBuilder

參數

authenticationScheme
String

驗證配置。

傳回

作業完成之後的 builder 參考。

適用於

AddCookie(AuthenticationBuilder, String, Action<CookieAuthenticationOptions>)

來源:
CookieExtensions.cs
來源:
CookieExtensions.cs

使用指定的配置,將 Cookie 驗證新增至 AuthenticationBuilder

Cookie 驗證會使用保存在用戶端中的 HTTP Cookie 來執行驗證。

public static Microsoft.AspNetCore.Authentication.AuthenticationBuilder AddCookie (this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder, string authenticationScheme, Action<Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationOptions> configureOptions);
static member AddCookie : Microsoft.AspNetCore.Authentication.AuthenticationBuilder * string * Action<Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationOptions> -> Microsoft.AspNetCore.Authentication.AuthenticationBuilder
<Extension()>
Public Function AddCookie (builder As AuthenticationBuilder, authenticationScheme As String, configureOptions As Action(Of CookieAuthenticationOptions)) As AuthenticationBuilder

參數

authenticationScheme
String

驗證配置。

configureOptions
Action<CookieAuthenticationOptions>

要設定 CookieAuthenticationOptions 的委派。

傳回

作業完成之後的 builder 參考。

適用於

AddCookie(AuthenticationBuilder, String, String, Action<CookieAuthenticationOptions>)

來源:
CookieExtensions.cs
來源:
CookieExtensions.cs

使用指定的配置,將 Cookie 驗證新增至 AuthenticationBuilder

Cookie 驗證會使用保存在用戶端中的 HTTP Cookie 來執行驗證。

public static Microsoft.AspNetCore.Authentication.AuthenticationBuilder AddCookie (this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder, string authenticationScheme, string displayName, Action<Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationOptions> configureOptions);
public static Microsoft.AspNetCore.Authentication.AuthenticationBuilder AddCookie (this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder, string authenticationScheme, string? displayName, Action<Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationOptions> configureOptions);
static member AddCookie : Microsoft.AspNetCore.Authentication.AuthenticationBuilder * string * string * Action<Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationOptions> -> Microsoft.AspNetCore.Authentication.AuthenticationBuilder
<Extension()>
Public Function AddCookie (builder As AuthenticationBuilder, authenticationScheme As String, displayName As String, configureOptions As Action(Of CookieAuthenticationOptions)) As AuthenticationBuilder

參數

authenticationScheme
String

驗證配置。

displayName
String

驗證處理常式的顯示名稱。

configureOptions
Action<CookieAuthenticationOptions>

要設定 CookieAuthenticationOptions 的委派。

傳回

作業完成之後的 builder 參考。

適用於