{"action":"created","issue":{"url":"https://api.github.com/repos/lexik/LexikJWTAuthenticationBundle/issues/241","repository_url":"https://api.github.com/repos/lexik/LexikJWTAuthenticationBundle","labels_url":"https://api.github.com/repos/lexik/LexikJWTAuthenticationBundle/issues/241/labels{/name}","comments_url":"https://api.github.com/repos/lexik/LexikJWTAuthenticationBundle/issues/241/comments","events_url":"https://api.github.com/repos/lexik/LexikJWTAuthenticationBundle/issues/241/events","html_url":"https://github.com/lexik/LexikJWTAuthenticationBundle/issues/241","id":179172672,"number":241,"title":"IAT should be a number, not a string","user":{"login":"robinmonteil","id":18598001,"avatar_url":"https://avatars.githubusercontent.com/u/18598001?v=3","gravatar_id":"","url":"https://api.github.com/users/robinmonteil","html_url":"https://github.com/robinmonteil","followers_url":"https://api.github.com/users/robinmonteil/followers","following_url":"https://api.github.com/users/robinmonteil/following{/other_user}","gists_url":"https://api.github.com/users/robinmonteil/gists{/gist_id}","starred_url":"https://api.github.com/users/robinmonteil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robinmonteil/subscriptions","organizations_url":"https://api.github.com/users/robinmonteil/orgs","repos_url":"https://api.github.com/users/robinmonteil/repos","events_url":"https://api.github.com/users/robinmonteil/events{/privacy}","received_events_url":"https://api.github.com/users/robinmonteil/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-26T08:55:09Z","updated_at":"2016-09-26T11:20:10Z","closed_at":null,"body":"Hello,\r\n\r\nFirst time I participate on Github, so please excuse me if I do this wrong ;)\r\n\r\nI just figured out that the \"iat\" parameter returned in the token should be a number, as the [RFC](https://tools.ietf.org/html/rfc7519#section-4.1.6) says. In v1.7.0, it returns a string.\r\n\r\nThank you for your work!"},"comment":{"url":"https://api.github.com/repos/lexik/LexikJWTAuthenticationBundle/issues/comments/249543715","html_url":"https://github.com/lexik/LexikJWTAuthenticationBundle/issues/241#issuecomment-249543715","issue_url":"https://api.github.com/repos/lexik/LexikJWTAuthenticationBundle/issues/241","id":249543715,"user":{"login":"chalasr","id":7502063,"avatar_url":"https://avatars.githubusercontent.com/u/7502063?v=3","gravatar_id":"","url":"https://api.github.com/users/chalasr","html_url":"https://github.com/chalasr","followers_url":"https://api.github.com/users/chalasr/followers","following_url":"https://api.github.com/users/chalasr/following{/other_user}","gists_url":"https://api.github.com/users/chalasr/gists{/gist_id}","starred_url":"https://api.github.com/users/chalasr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chalasr/subscriptions","organizations_url":"https://api.github.com/users/chalasr/orgs","repos_url":"https://api.github.com/users/chalasr/repos","events_url":"https://api.github.com/users/chalasr/events{/privacy}","received_events_url":"https://api.github.com/users/chalasr/received_events","type":"User","site_admin":false},"created_at":"2016-09-26T11:20:10Z","updated_at":"2016-09-26T11:20:10Z","body":"Hello @robinmonteil,\r\n\r\nAs far as I know, when the RFC says the value must be a number, it doesn't mean it must be an _integer_, but a numeric value. So even if the primary type is indeed `string`, the value is still a number (a NumericDate as stated by the RFC). What you need for properly checking it is to cast it as an integer, e.g. `$iat = (int) $payload['iat'];`.\r\n\r\nHowever, in 1.x, the claim is set by [namshi/jose](/namshi/jose), the JOSE library used by this bundle, so we can't change it to an integer. In 2.x, this value will become an integer, as for the exp claim.\r\n\r\nI hope I fully answered you.\r\nThank you for contributing through opening this issue."}}
{"actor":{"display_login":"chalasr"}}