Skip to content

Commit 6519e27

Browse files
committed
Release 3.0.1
1 parent cd84a85 commit 6519e27

File tree

5 files changed

+31
-29
lines changed

5 files changed

+31
-29
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
## Changelog
22

3+
### 3.0.1 / 2015-06-01
4+
- [#27](https://github.com/seegno/angular-oauth2/pull/27) Add travis-ci configuration (@joaogranado)
5+
36
### 3.0.0 / 2015-06-01
7+
- [#49](https://github.com/seegno/angular-oauth2/pull/49) Add changelog task (@ruipenso)
48
- [#48](https://github.com/seegno/angular-oauth2/pull/48) Update readme (@ruipenso)
59
- [#25](https://github.com/seegno/angular-oauth2/pull/25) Replace ipCookie with ngCookies (@joaogranado)
610
- [#28](https://github.com/seegno/angular-oauth2/pull/28) Add methods to get/set `token` property (@joaogranado)

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-oauth2",
3-
"version": "3.0.0",
3+
"version": "3.0.1",
44
"description": "AngularJS OAuth2",
55
"main": "./dist/angular-oauth2.js",
66
"authors": [

dist/angular-oauth2.js

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* angular-oauth2 - Angular OAuth2
3-
* @version v3.0.0
3+
* @version v3.0.1
44
* @link https://github.com/seegno/angular-oauth2
55
* @license MIT
66
*/
@@ -18,28 +18,6 @@
1818
$httpProvider.interceptors.push("oauthInterceptor");
1919
}
2020
oauthConfig.$inject = [ "$httpProvider" ];
21-
function oauthInterceptor($q, $rootScope, OAuthToken) {
22-
return {
23-
request: function(config) {
24-
if (OAuthToken.getAuthorizationHeader()) {
25-
config.headers = config.headers || {};
26-
config.headers.Authorization = OAuthToken.getAuthorizationHeader();
27-
}
28-
return config;
29-
},
30-
responseError: function(rejection) {
31-
if (400 === rejection.status && rejection.data && ("invalid_request" === rejection.data.error || "invalid_grant" === rejection.data.error)) {
32-
OAuthToken.removeToken();
33-
$rootScope.$emit("oauth:error", rejection);
34-
}
35-
if (401 === rejection.status && (rejection.data && "invalid_token" === rejection.data.error) || rejection.headers("www-authenticate") && 0 === rejection.headers("www-authenticate").indexOf("Bearer")) {
36-
$rootScope.$emit("oauth:error", rejection);
37-
}
38-
return $q.reject(rejection);
39-
}
40-
};
41-
}
42-
oauthInterceptor.$inject = [ "$q", "$rootScope", "OAuthToken" ];
4321
var _prototypeProperties = function(child, staticProps, instanceProps) {
4422
if (staticProps) Object.defineProperties(child, staticProps);
4523
if (instanceProps) Object.defineProperties(child.prototype, instanceProps);
@@ -262,5 +240,27 @@
262240
};
263241
this.$get.$inject = [ "$cookies" ];
264242
}
243+
function oauthInterceptor($q, $rootScope, OAuthToken) {
244+
return {
245+
request: function(config) {
246+
if (OAuthToken.getAuthorizationHeader()) {
247+
config.headers = config.headers || {};
248+
config.headers.Authorization = OAuthToken.getAuthorizationHeader();
249+
}
250+
return config;
251+
},
252+
responseError: function(rejection) {
253+
if (400 === rejection.status && rejection.data && ("invalid_request" === rejection.data.error || "invalid_grant" === rejection.data.error)) {
254+
OAuthToken.removeToken();
255+
$rootScope.$emit("oauth:error", rejection);
256+
}
257+
if (401 === rejection.status && (rejection.data && "invalid_token" === rejection.data.error) || rejection.headers("www-authenticate") && 0 === rejection.headers("www-authenticate").indexOf("Bearer")) {
258+
$rootScope.$emit("oauth:error", rejection);
259+
}
260+
return $q.reject(rejection);
261+
}
262+
};
263+
}
264+
oauthInterceptor.$inject = [ "$q", "$rootScope", "OAuthToken" ];
265265
return ngModule;
266266
});

dist/angular-oauth2.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
{
22
"name": "angular-oauth2",
3-
"version": "3.0.0",
3+
"version": "3.0.1",
44
"description": "Angular OAuth2",
55
"main": "./dist/angular-oauth2.js",
6-
"scripts": {
7-
"changelog": "./node_modules/.bin/github-changes -o seegno -r angular-oauth2 -a --only-pulls --use-commit-body --title 'Changelog' --date-format '/ YYYY-MM-DD'"
8-
},
96
"repository": {
107
"type": "git",
118
"url": "https://github.com/seegno/angular-oauth2.git"
@@ -57,6 +54,7 @@
5754
"query-string": "./bower_components/query-string/query-string.js"
5855
},
5956
"scripts": {
57+
"changelog": "./node_modules/.bin/github-changes -o seegno -r angular-oauth2 -a --only-pulls --use-commit-body --title 'Changelog' --date-format '/ YYYY-MM-DD'",
6058
"test": "./node_modules/.bin/gulp test --browsers Firefox"
6159
},
6260
"browserify-shim": {

0 commit comments

Comments
 (0)