Reacting to DI changes
This commit is contained in:
parent
221bf30492
commit
5ddab1ffc8
|
|
@ -36,7 +36,7 @@ namespace MusicStore.Controllers
|
||||||
// IHttpContextAccessor is required for SignInManager, and UserManager
|
// IHttpContextAccessor is required for SignInManager, and UserManager
|
||||||
var context = new DefaultHttpContext();
|
var context = new DefaultHttpContext();
|
||||||
context.Features.Set<IHttpAuthenticationFeature>(new HttpAuthenticationFeature() { Handler = new TestAuthHandler() });
|
context.Features.Set<IHttpAuthenticationFeature>(new HttpAuthenticationFeature() { Handler = new TestAuthHandler() });
|
||||||
services.AddInstance<IHttpContextAccessor>(
|
services.AddSingleton<IHttpContextAccessor>(
|
||||||
new HttpContextAccessor()
|
new HttpContextAccessor()
|
||||||
{
|
{
|
||||||
HttpContext = context,
|
HttpContext = context,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue