IAntiforgery.GetTokens(HttpContext) Methode
Definition
Wichtig
Einige Informationen beziehen sich auf Vorabversionen, die vor dem Release ggf. grundlegend überarbeitet werden. Microsoft übernimmt hinsichtlich der hier bereitgestellten Informationen keine Gewährleistungen, seien sie ausdrücklich oder konkludent.
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:
Feedback
https://aka.ms/ContentUserFeedback.
Bald verfügbar: Im Laufe des Jahres 2024 werden wir GitHub-Issues stufenweise als Feedbackmechanismus für Inhalte abbauen und durch ein neues Feedbacksystem ersetzen. Weitere Informationen finden Sie unterFeedback senden und anzeigen für