Skip to content
This repository has been archived by the owner on Feb 16, 2022. It is now read-only.

29 expired token #30

Merged
merged 1 commit into from
Apr 23, 2017
Merged

29 expired token #30

merged 1 commit into from
Apr 23, 2017

Conversation

emirotin
Copy link
Contributor

Fixes #29

"id": 1344,
"email": "johndoe+expired@johndoe.com",
"iat": nowInSec(),
"exp": futureInSec(0.9)

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.

expiredData = {
"id": 1344,
"email": "johndoe+expired@johndoe.com",
"iat": nowInSec(),

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.


expiredData = {
"id": 1344,
"email": "johndoe+expired@johndoe.com",

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.

}

expiredData = {
"id": 1344,

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.

"needsPasswordReset": false,
"permissions": [],
"public_key": false,
"social_service_account": null

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.

"email": "johndoe@johndoe.com",
"username": "johndoe1",
"features": [],
"gitlab_id": 1325,

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.

"id": 1344,
"email": "johndoe@johndoe.com",
"username": "johndoe1",
"features": [],

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.

johndoeData = {
"id": 1344,
"email": "johndoe@johndoe.com",
"username": "johndoe1",

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.


johndoeData = {
"id": 1344,
"email": "johndoe@johndoe.com",

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.

futureInSec = (delaySec) -> timeToSec(delaySec * 1000 + Date.now())

johndoeData = {
"id": 1344,

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) {
Copy link

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
Copy link

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?

@emirotin
Copy link
Contributor Author

Ping on this

use real signed tokens for tests

isExpired method

validate if token is expired in .set()
@emirotin emirotin merged commit 3f003ec into master Apr 23, 2017
@emirotin emirotin deleted the 29-expired-token branch April 23, 2017 20:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants