IAntiforgery.SetCookieTokenAndHeader(HttpContext) Method

Definition

Generates and stores an antiforgery cookie token if one is not available or not valid.

public:
 void SetCookieTokenAndHeader(Microsoft::AspNetCore::Http::HttpContext ^ httpContext);
public void SetCookieTokenAndHeader (Microsoft.AspNetCore.Http.HttpContext httpContext);
abstract member SetCookieTokenAndHeader : Microsoft.AspNetCore.Http.HttpContext -> unit
Public Sub SetCookieTokenAndHeader (httpContext As HttpContext)

Parameters

httpContext
HttpContext

The HttpContext associated with the current request.

Applies to