-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Description
I 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!