tokenClient.RequestAuthorizationCodeTokenAsync is clearing out HttpContext, can this be prevented?
问题 I have the following code: using IdentityModel.Client; using Microsoft.AspNet.Identity; var tokenClient = new HttpClient(); var testUserName = System.Web.HttpContext.Current.User.Identity.GetUserName(); // This returns a value var tokenResult = await tokenClient.RequestAuthorizationCodeTokenAsync( new AuthorizationCodeTokenRequest { Address = address, Code = authorizationCode, ClientId = clientId, ClientSecret = clientSecret, GrantType = "authorization_code", RedirectUri = redirectUri });