diff --git a/.gitignore b/.gitignore index 522163c..4fce93d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ node_modules bower_components components +.idea \ No newline at end of file diff --git a/package.json b/package.json index 7171764..3b87d04 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "angular-http-auth", - "version": "1.2.3", + "version": "1.2.4", "description": "HTTP Auth Interceptor Module for AngularJS.", "main": "src/http-auth-interceptor.js", "repository": { diff --git a/src/http-auth-interceptor.js b/src/http-auth-interceptor.js index 95e3426..c2226f3 100644 --- a/src/http-auth-interceptor.js +++ b/src/http-auth-interceptor.js @@ -54,12 +54,12 @@ var config = rejection.config || {}; if (!config.ignoreAuthModule) { switch (rejection.status) { - case 401: + case 417: var deferred = $q.defer(); httpBuffer.append(config, deferred); $rootScope.$broadcast('event:auth-loginRequired', rejection); return deferred.promise; - case 403: + case 401: $rootScope.$broadcast('event:auth-forbidden', rejection); break; }