Skip to content

Commit

Permalink
use unix timestamp with seconds in isAuthenticated.
Browse files Browse the repository at this point in the history
Fixes #121
  • Loading branch information
sahat committed Sep 19, 2014
1 parent c86134c commit b331209
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/client/vendor/satellizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@
var base64Url = token.split('.')[1];
var base64 = base64Url.replace('-', '+').replace('_', '/');
var exp = JSON.parse($window.atob(base64)).exp;
return Date.now() <= exp;
return Math.round(new Date().getTime() / 1000) <= exp;
}

return false;
Expand Down
2 changes: 1 addition & 1 deletion satellizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@
var base64Url = token.split('.')[1];
var base64 = base64Url.replace('-', '+').replace('_', '/');
var exp = JSON.parse($window.atob(base64)).exp;
return Date.now() <= exp;
return Math.round(new Date().getTime() / 1000) <= exp;
}

return false;
Expand Down
2 changes: 1 addition & 1 deletion satellizer.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b331209

Please sign in to comment.