Fixes from @singingwolfboy in PR #3466

This commit is contained in:
lduarte1991
2014-05-08 11:37:49 -04:00
parent 26eb16ebc2
commit edeebe7bea
4 changed files with 70 additions and 70 deletions

View File

@@ -1,11 +1,11 @@
Annotator.Plugin.Auth.prototype.haveValidToken = function() {
var allFields;
allFields = this._unsafeToken && this._unsafeToken.d.issuedAt && this._unsafeToken.d.ttl && this._unsafeToken.d.consumerKey;
if (allFields && this.timeToExpiry() > 0) {
return true;
} else {
return false;
}
return (
this._unsafeToken &&
this._unsafeToken.d.issuedAt &&
this._unsafeToken.d.ttl &&
this._unsafeToken.d.consumerKey &&
this.timeToExpiry() > 0
);
};
Annotator.Plugin.Auth.prototype.timeToExpiry = function() {