{"action":"created","issue":{"url":"https://api.github.com/repos/strongloop/loopback/issues/2361","repository_url":"https://api.github.com/repos/strongloop/loopback","labels_url":"https://api.github.com/repos/strongloop/loopback/issues/2361/labels{/name}","comments_url":"https://api.github.com/repos/strongloop/loopback/issues/2361/comments","events_url":"https://api.github.com/repos/strongloop/loopback/issues/2361/events","html_url":"https://github.com/strongloop/loopback/issues/2361","id":156094926,"number":2361,"title":"loopback logout fail if ttl >= -1","user":{"login":"josephlaw","id":8828433,"avatar_url":"https://avatars.githubusercontent.com/u/8828433?v=3","gravatar_id":"","url":"https://api.github.com/users/josephlaw","html_url":"https://github.com/josephlaw","followers_url":"https://api.github.com/users/josephlaw/followers","following_url":"https://api.github.com/users/josephlaw/following{/other_user}","gists_url":"https://api.github.com/users/josephlaw/gists{/gist_id}","starred_url":"https://api.github.com/users/josephlaw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josephlaw/subscriptions","organizations_url":"https://api.github.com/users/josephlaw/orgs","repos_url":"https://api.github.com/users/josephlaw/repos","events_url":"https://api.github.com/users/josephlaw/events{/privacy}","received_events_url":"https://api.github.com/users/josephlaw/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/strongloop/loopback/labels/triage","name":"triage","color":"eb6420"},{"url":"https://api.github.com/repos/strongloop/loopback/labels/waiting","name":"waiting","color":"eeeeee"}],"state":"open","locked":false,"assignee":{"login":"richardpringle","id":3286504,"avatar_url":"https://avatars.githubusercontent.com/u/3286504?v=3","gravatar_id":"","url":"https://api.github.com/users/richardpringle","html_url":"https://github.com/richardpringle","followers_url":"https://api.github.com/users/richardpringle/followers","following_url":"https://api.github.com/users/richardpringle/following{/other_user}","gists_url":"https://api.github.com/users/richardpringle/gists{/gist_id}","starred_url":"https://api.github.com/users/richardpringle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richardpringle/subscriptions","organizations_url":"https://api.github.com/users/richardpringle/orgs","repos_url":"https://api.github.com/users/richardpringle/repos","events_url":"https://api.github.com/users/richardpringle/events{/privacy}","received_events_url":"https://api.github.com/users/richardpringle/received_events","type":"User","site_admin":false},"assignees":[{"login":"richardpringle","id":3286504,"avatar_url":"https://avatars.githubusercontent.com/u/3286504?v=3","gravatar_id":"","url":"https://api.github.com/users/richardpringle","html_url":"https://github.com/richardpringle","followers_url":"https://api.github.com/users/richardpringle/followers","following_url":"https://api.github.com/users/richardpringle/following{/other_user}","gists_url":"https://api.github.com/users/richardpringle/gists{/gist_id}","starred_url":"https://api.github.com/users/richardpringle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richardpringle/subscriptions","organizations_url":"https://api.github.com/users/richardpringle/orgs","repos_url":"https://api.github.com/users/richardpringle/repos","events_url":"https://api.github.com/users/richardpringle/events{/privacy}","received_events_url":"https://api.github.com/users/richardpringle/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2016-05-21T10:23:57Z","updated_at":"2016-07-06T18:12:10Z","closed_at":null,"body":"\"node_modules/loopback/common/models/access-token.js\"\r\n\r\n      assert(this.ttl !== 0, 'token.ttl must be not be 0');\r\n      assert(this.ttl, 'token.ttl must exist');\r\n      assert(this.ttl >= -1, 'token.ttl must be >= -1');\r\n\r\n      var now = Date.now();\r\n      var created = this.created.getTime();\r\n      var elapsedSeconds = (now - created) / 1000;\r\n      var secondsToLive = this.ttl;\r\n      var isValid = elapsedSeconds < secondsToLive; <======= already false\r\n"},"comment":{"url":"https://api.github.com/repos/strongloop/loopback/issues/comments/230857616","html_url":"https://github.com/strongloop/loopback/issues/2361#issuecomment-230857616","issue_url":"https://api.github.com/repos/strongloop/loopback/issues/2361","id":230857616,"user":{"login":"richardpringle","id":3286504,"avatar_url":"https://avatars.githubusercontent.com/u/3286504?v=3","gravatar_id":"","url":"https://api.github.com/users/richardpringle","html_url":"https://github.com/richardpringle","followers_url":"https://api.github.com/users/richardpringle/followers","following_url":"https://api.github.com/users/richardpringle/following{/other_user}","gists_url":"https://api.github.com/users/richardpringle/gists{/gist_id}","starred_url":"https://api.github.com/users/richardpringle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richardpringle/subscriptions","organizations_url":"https://api.github.com/users/richardpringle/orgs","repos_url":"https://api.github.com/users/richardpringle/repos","events_url":"https://api.github.com/users/richardpringle/events{/privacy}","received_events_url":"https://api.github.com/users/richardpringle/received_events","type":"User","site_admin":false},"created_at":"2016-07-06T18:12:10Z","updated_at":"2016-07-06T18:12:10Z","body":"Are you expecting `ttl = -1` to be unlimited?\r\n\r\nAfter taking a deeper dive into our code, it appears as though `-1` is a *valid* ttl value that *invalidates* the actual token. I believe this is actually by design.\r\n\r\n@bajtos will have to confirm."}}
{"actor":{"display_login":"richardpringle"}}