AntiforgeryOptions.Cookie Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Determines the settings used to create the antiforgery cookies.
public:
property Microsoft::AspNetCore::Http::CookieBuilder ^ Cookie { Microsoft::AspNetCore::Http::CookieBuilder ^ get(); void set(Microsoft::AspNetCore::Http::CookieBuilder ^ value); };
public Microsoft.AspNetCore.Http.CookieBuilder Cookie { get; set; }
member this.Cookie : Microsoft.AspNetCore.Http.CookieBuilder with get, set
Public Property Cookie As CookieBuilder
Property Value
Remarks
If an explicit Name is not provided, the system will automatically generate a unique name that begins with DefaultCookiePrefix.
- SameSite defaults to Strict.
- HttpOnly defaults to
true
. - IsEssential defaults to
true
. The cookie used by the antiforgery system is part of a security system that is necessary when using cookie-based authentication. It should be considered required for the application to function. - SecurePolicy defaults to None.