-
Notifications
You must be signed in to change notification settings - Fork 2
Conversation
tests/fixtures/tokens.coffee
Outdated
"id": 1344, | ||
"email": "johndoe+expired@johndoe.com", | ||
"iat": nowInSec(), | ||
"exp": futureInSec(0.9) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary double quotes are forbidden.
tests/fixtures/tokens.coffee
Outdated
expiredData = { | ||
"id": 1344, | ||
"email": "johndoe+expired@johndoe.com", | ||
"iat": nowInSec(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary double quotes are forbidden.
tests/fixtures/tokens.coffee
Outdated
|
||
expiredData = { | ||
"id": 1344, | ||
"email": "johndoe+expired@johndoe.com", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary double quotes are forbidden.
tests/fixtures/tokens.coffee
Outdated
} | ||
|
||
expiredData = { | ||
"id": 1344, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary double quotes are forbidden.
tests/fixtures/tokens.coffee
Outdated
"needsPasswordReset": false, | ||
"permissions": [], | ||
"public_key": false, | ||
"social_service_account": null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary double quotes are forbidden.
tests/fixtures/tokens.coffee
Outdated
"email": "johndoe@johndoe.com", | ||
"username": "johndoe1", | ||
"features": [], | ||
"gitlab_id": 1325, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary double quotes are forbidden.
tests/fixtures/tokens.coffee
Outdated
"id": 1344, | ||
"email": "johndoe@johndoe.com", | ||
"username": "johndoe1", | ||
"features": [], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary double quotes are forbidden.
tests/fixtures/tokens.coffee
Outdated
johndoeData = { | ||
"id": 1344, | ||
"email": "johndoe@johndoe.com", | ||
"username": "johndoe1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary double quotes are forbidden.
tests/fixtures/tokens.coffee
Outdated
|
||
johndoeData = { | ||
"id": 1344, | ||
"email": "johndoe@johndoe.com", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary double quotes are forbidden.
tests/fixtures/tokens.coffee
Outdated
futureInSec = (delaySec) -> timeToSec(delaySec * 1000 + Date.now()) | ||
|
||
johndoeData = { | ||
"id": 1344, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary double quotes are forbidden.
@@ -75,6 +75,12 @@ module.exports = getToken = function(arg) { | |||
if (!isValid) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add the header: true
bit to the gulpfile so this file's diff gets dropped please
CHANGELOG.md
Outdated
### Changed | ||
|
||
- The new static `isExpired` method to check the `exp` claim | ||
- The token expiration is not checked in `set` and the expired tokens are rejected |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think not
is meant to be now
?
Ping on this |
use real signed tokens for tests isExpired method validate if token is expired in .set()
5f7d2d1
to
3e1b370
Compare
Fixes #29