Skip to content

Commit

Permalink
Merge pull request #3 from frankiethekneeman/hotix/Expiration
Browse files Browse the repository at this point in the history
Broken Expiration.  Also NPM Ignore.
  • Loading branch information
frankiethekneeman committed Nov 2, 2015
2 parents b43e8a7 + 5c0e7c1 commit 5e522c8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
docs
out
jsdoc
node_modules
demo
scripts
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "serveros",
"version": "0.2.4",
"version": "0.2.5",
"description": "Auth for networks of applications.",
"repository": {
"type": "git",
Expand Down
3 changes: 2 additions & 1 deletion src/classes/HawkAuthenticator.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,11 @@ HawkAuthenticator.prototype = {
callback("No Credentials Found.");
return;
}
if (Date.now() < credentials.expires) {
if (Date.now() > credentials.expires) {
that.storage.purge(id, function() {
if (callback) callback("Credentials Expired");
});
return;
}
var hawkCredentials = {
key: credentials.secret
Expand Down

0 comments on commit 5e522c8

Please sign in to comment.