Share via


IAntiforgery.GetTokens(HttpContext) Méthode

Définition

Génère un AntiforgeryTokenSet pour cette demande.

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

Paramètres

httpContext
HttpContext

HttpContext associé à la demande actuelle.

Retours

pour AntiforgeryTokenSet cette demande.

Remarques

Contrairement à GetAndStoreTokens(HttpContext), cette méthode n’a aucun effet secondaire. L’appelant est chargé de définir le cookie de réponse et d’injecter le jeton de formulaire retourné le cas échéant.

S’applique à