IAntiforgery.GetTokens(HttpContext) Method
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.
Generates an AntiforgeryTokenSet for this request.
public:
Microsoft::AspNetCore::Antiforgery::AntiforgeryTokenSet ^ GetTokens(Microsoft::AspNetCore::Http::HttpContext ^ httpContext);
public Microsoft.AspNetCore.Antiforgery.AntiforgeryTokenSet GetTokens (Microsoft.AspNetCore.Http.HttpContext httpContext);
abstract member GetTokens : Microsoft.AspNetCore.Http.HttpContext -> Microsoft.AspNetCore.Antiforgery.AntiforgeryTokenSet
Public Function GetTokens (httpContext As HttpContext) As AntiforgeryTokenSet
Parameters
- httpContext
- HttpContext
The HttpContext associated with the current request.
Returns
The AntiforgeryTokenSet for this request.
Remarks
Unlike GetAndStoreTokens(HttpContext), this method has no side effect. The caller is responsible for setting the response cookie and injecting the returned form token as appropriate.