IAntiforgery.GetTokens(HttpContext) Methode

Definition

Generiert eine AntiforgeryTokenSet für diese Anforderung.

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

Parameter

httpContext
HttpContext

Die HttpContext , die der aktuellen Anforderung zugeordnet ist.

Gibt zurück

Die AntiforgeryTokenSet für diese Anforderung.

Hinweise

Im Gegensatz dazu GetAndStoreTokens(HttpContext)hat diese Methode keine Nebenwirkung. Der Aufrufer ist dafür verantwortlich, das Antwortcooky festzulegen und das zurückgegebene Formulartoken entsprechend einzugeben.

Gilt für: