Skip to content

Handle possible null HttpContext in ReplyForbiddenWithWwwAuthenticateHeaderAsync #380

Description

@pmaytak

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}");

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions