protected override async Task ApplyResponseChallengeAsync() { IResponseMessage responseMessage = new OwinResponseMessage(Response); var header = await server.CreateServerAuthorizationAsync(responseMessage); if (header != null) { responseMessage.AddHeader(header.Item1, header.Item2); } }
protected override async Task ApplyResponseChallengeAsync() { // In case of 401, we do not add WWW-Authenticate, if authentication mode is passive. if (Response.StatusCode == 401) { var challenge = Helper.LookupChallenge(Options.AuthenticationType, Options.AuthenticationMode); if (challenge == null) { return; } } IResponseMessage responseMessage = new OwinResponseMessage(Response); var header = await server.CreateServerAuthorizationAsync(responseMessage); if (header != null) { responseMessage.AddHeader(header.Item1, header.Item2); } }