How to get AuthenticationInfo property from HttpContext in ASP.NET Core 2.0. I understand that with the security redesign in ASP.NET Core 2.0, the AuthenticationManager now deprecated and that I have to remove .Authentication .
I used something like this in 1.1.2
var info = await httpContext.Authentication.GetAuthenticateInfoAsync("Automatic"); info.Properties.StoreTokens(new List<AuthenticationToken> { new AuthenticationToken { Name = OpenIdConnectParameterNames.AccessToken, Value = accessToken }, new AuthenticationToken { Name = OpenIdConnectParameterNames.RefreshToken, Value = refreshToken } }); await httpContext.Authentication.SignInAsync("Automatic", info.Principal, info.Properties);
source share