Skip to content
This repository has been archived by the owner on May 7, 2021. It is now read-only.

Commit

Permalink
fix(http): allow 401 if www-authenticate header present
Browse files Browse the repository at this point in the history
  • Loading branch information
sbose78 authored and joshuawilson committed Nov 9, 2017
1 parent 2797a90 commit 5e4a6a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/shared/http.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export class HttpService extends Http {

private catchRequestError () {
return (res: Response) => {
if (res.status === 401 || res.status === 403) {
if (res.status === 403 || ( res.status === 401 && !res.headers.has("www-authenticate"))) {
this.broadcaster.broadcast('authenticationError', res);
} else if (res.status === 500) {
this.broadcaster.broadcast('communicationError', res);
Expand Down

0 comments on commit 5e4a6a3

Please sign in to comment.