Identity Core in .Net Framework
See original GitHub issueI have most of the nuts and bolts I need in place to get Identity Core working in a .Net Framework environment.
One thing I’m running into:
Microsoft.AspNetCore.Http.HttpContext
is used for:
public SignInManager(UserManager<TUser> userManager, IHttpContextAccessor contextAccessor, IUserClaimsPrincipalFactory<TUser> claimsFactory, IOptions<IdentityOptions> optionsAccessor, ILogger<SignInManager<TUser>> logger, IAuthenticationSchemeProvider schemes);
I would just do like:
new HttpContextAccessor() { HttpContext = ctx }
However, I only seem to have access to:
System.Web.HttpContext
“SignInManager” seems to be working, it just doesn’t have an HttpContext I can give it so it can set authentication cookies.
I also tried something like:
HttpContextAccessor hca = new HttpContextAccessor() {HttpContext = new DefaultHttpContext()};
....SignInAsync...
hca.HttpContext.Response.Cookies...
hca.HttpContext.Identity...
But that did not work either (nothing was set).
Is there there a way I can workaround?
Any help would be appreciated!
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (5 by maintainers)
I’m going to go ahead and close this thread. I think my original question has been sufficiently answered. Thanks for wading through this.
These answers just raise more questions. How are you hosting SignalR in a System.Web application. I don’t understand your architecture enough to comment of the feasibility of a “pre migration”, the way you describe it today.