Share via


CookieExtensions.AddCookie Method

Definition

Overloads

AddCookie(AuthenticationBuilder)

Adds cookie authentication to AuthenticationBuilder using the default scheme. The default scheme is specified by AuthenticationScheme.

Cookie authentication uses a HTTP cookie persisted in the client to perform authentication.

AddCookie(AuthenticationBuilder, Action<CookieAuthenticationOptions>)

Adds cookie authentication to AuthenticationBuilder using the default scheme. The default scheme is specified by AuthenticationScheme.

Cookie authentication uses a HTTP cookie persisted in the client to perform authentication.

AddCookie(AuthenticationBuilder, String)

Adds cookie authentication to AuthenticationBuilder using the specified scheme.

Cookie authentication uses a HTTP cookie persisted in the client to perform authentication.

AddCookie(AuthenticationBuilder, String, Action<CookieAuthenticationOptions>)

Adds cookie authentication to AuthenticationBuilder using the specified scheme.

Cookie authentication uses a HTTP cookie persisted in the client to perform authentication.

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

Adds cookie authentication to AuthenticationBuilder using the specified scheme.

Cookie authentication uses a HTTP cookie persisted in the client to perform authentication.

AddCookie(AuthenticationBuilder)

Source:
CookieExtensions.cs
Source:
CookieExtensions.cs
Source:
CookieExtensions.cs

Adds cookie authentication to AuthenticationBuilder using the default scheme. The default scheme is specified by AuthenticationScheme.

Cookie authentication uses a HTTP cookie persisted in the client to perform authentication.

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

Parameters

Returns

A reference to builder after the operation has completed.

Applies to

AddCookie(AuthenticationBuilder, Action<CookieAuthenticationOptions>)

Source:
CookieExtensions.cs
Source:
CookieExtensions.cs
Source:
CookieExtensions.cs

Adds cookie authentication to AuthenticationBuilder using the default scheme. The default scheme is specified by AuthenticationScheme.

Cookie authentication uses a HTTP cookie persisted in the client to perform authentication.

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

Parameters

configureOptions
Action<CookieAuthenticationOptions>

A delegate to configure CookieAuthenticationOptions.

Returns

A reference to builder after the operation has completed.

Applies to

AddCookie(AuthenticationBuilder, String)

Source:
CookieExtensions.cs
Source:
CookieExtensions.cs
Source:
CookieExtensions.cs

Adds cookie authentication to AuthenticationBuilder using the specified scheme.

Cookie authentication uses a HTTP cookie persisted in the client to perform authentication.

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

Parameters

authenticationScheme
String

The authentication scheme.

Returns

A reference to builder after the operation has completed.

Applies to

AddCookie(AuthenticationBuilder, String, Action<CookieAuthenticationOptions>)

Source:
CookieExtensions.cs
Source:
CookieExtensions.cs
Source:
CookieExtensions.cs

Adds cookie authentication to AuthenticationBuilder using the specified scheme.

Cookie authentication uses a HTTP cookie persisted in the client to perform authentication.

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

Parameters

authenticationScheme
String

The authentication scheme.

configureOptions
Action<CookieAuthenticationOptions>

A delegate to configure CookieAuthenticationOptions.

Returns

A reference to builder after the operation has completed.

Applies to

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

Source:
CookieExtensions.cs
Source:
CookieExtensions.cs
Source:
CookieExtensions.cs

Adds cookie authentication to AuthenticationBuilder using the specified scheme.

Cookie authentication uses a HTTP cookie persisted in the client to perform authentication.

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

Parameters

authenticationScheme
String

The authentication scheme.

displayName
String

A display name for the authentication handler.

configureOptions
Action<CookieAuthenticationOptions>

A delegate to configure CookieAuthenticationOptions.

Returns

A reference to builder after the operation has completed.

Applies to