Skip to content

Commit

Permalink
fix for #93 bug in getPayload methdo
Browse files Browse the repository at this point in the history
  • Loading branch information
paulvanbladel committed Feb 7, 2016
1 parent 91b97d0 commit 23edbef
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 23 deletions.
6 changes: 2 additions & 4 deletions dist/amd/authentication.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,10 @@ define(['exports', 'aurelia-dependency-injection', './baseConfig', './storage',
var base64 = base64Url.replace(/-/g, '+').replace(/_/g, '/');

try {
var _parsed = JSON.parse(decodeURIComponent(escape(window.atob(base64))));
return JSON.parse(decodeURIComponent(escape(window.atob(base64))));
} catch (error) {
return;
return null;
}

return parsed;
}
}
}, {
Expand Down
6 changes: 2 additions & 4 deletions dist/commonjs/authentication.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,10 @@ var Authentication = (function () {
var base64 = base64Url.replace(/-/g, '+').replace(/_/g, '/');

try {
var _parsed = JSON.parse(decodeURIComponent(escape(window.atob(base64))));
return JSON.parse(decodeURIComponent(escape(window.atob(base64))));
} catch (error) {
return;
return null;
}

return parsed;
}
}
}, {
Expand Down
7 changes: 2 additions & 5 deletions dist/es6/authentication.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,10 @@ export class Authentication {
let base64 = base64Url.replace(/-/g, '+').replace(/_/g, '/');

try {
let parsed = JSON.parse(decodeURIComponent(escape(window.atob(base64))));
return JSON.parse(decodeURIComponent(escape(window.atob(base64))));
} catch (error) {
return;
return null;
}

return parsed;

}
}

Expand Down
6 changes: 2 additions & 4 deletions dist/system/authentication.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,10 @@ System.register(['aurelia-dependency-injection', './baseConfig', './storage', '.
var base64 = base64Url.replace(/-/g, '+').replace(/_/g, '/');

try {
var _parsed = JSON.parse(decodeURIComponent(escape(window.atob(base64))));
return JSON.parse(decodeURIComponent(escape(window.atob(base64))));
} catch (error) {
return;
return null;
}

return parsed;
}
}
}, {
Expand Down
3 changes: 3 additions & 0 deletions doc/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### 0.12.2 (2016-02-07)


### 0.12.2 (2016-02-02)


Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aurelia-auth",
"version": "0.12.1",
"version": "0.12.2",
"description": "Plugin for social media authentication and local authentication together with other authentication utilities",
"main": "dist/system/index.js",
"scripts": {
Expand Down
7 changes: 2 additions & 5 deletions src/authentication.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,10 @@ export class Authentication {
let base64 = base64Url.replace(/-/g, '+').replace(/_/g, '/');

try {
let parsed = JSON.parse(decodeURIComponent(escape(window.atob(base64))));
return JSON.parse(decodeURIComponent(escape(window.atob(base64))));
} catch (error) {
return;
return null;
}

return parsed;

}
}

Expand Down

0 comments on commit 23edbef

Please sign in to comment.