Come up with a solution to handle possible null HttpContext in ReplyForbiddenWithWwwAuthenticateHeaderAsync in TokenAcquisition class.
|
var httpResponse = CurrentHttpContext.Response; |
|
var headers = httpResponse.Headers; |
|
httpResponse.StatusCode = (int)HttpStatusCode.Forbidden; |
|
|
|
headers[HeaderNames.WWWAuthenticate] = new StringValues($"{Constants.Bearer} {parameterString}"); |
Come up with a solution to handle possible null HttpContext in ReplyForbiddenWithWwwAuthenticateHeaderAsync in TokenAcquisition class.
microsoft-identity-web/src/Microsoft.Identity.Web/TokenAcquisition.cs
Lines 578 to 582 in 3c77e3c