You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 22, 2018. It is now read-only.
This would let us get rid of the service locator antipattern...
-Microsoft.AspNetCore.Antiforgery\Internal\DefaultAntiforgery.cs:331: var contextAccessor = services.GetRequiredService<IAntiforgeryContextAccessor>();
-Microsoft.AspNetCore.Antiforgery\Internal\DefaultAntiforgery.cs:441: var contextAccessor = services.GetRequiredService<IAntiforgeryContextAccessor>();
Or, we can get rid of the context and use a feature, or HttpContext.Items.
This will have a cascading effect on MVC and cause a few filter implementations as well as bunch of HTML related infrastructure to become scoped. Scoped is really viral.
Ran this by @lodejard and he likes the idea of a feature. The stuff that antiforgery puts in the context really is related to the current HttpRequest as a unit of work.
This would let us get rid of the service locator antipattern...
-Microsoft.AspNetCore.Antiforgery\Internal\DefaultAntiforgery.cs:331:
var contextAccessor = services.GetRequiredService<IAntiforgeryContextAccessor>();
-Microsoft.AspNetCore.Antiforgery\Internal\DefaultAntiforgery.cs:441:
var contextAccessor = services.GetRequiredService<IAntiforgeryContextAccessor>();
https://github.com/aspnet/Coherence-Signed/issues/186
The text was updated successfully, but these errors were encountered: