{"action":"created","issue":{"url":"https://api.github.com/repos/lexik/LexikJWTAuthenticationBundle/issues/122","labels_url":"https://api.github.com/repos/lexik/LexikJWTAuthenticationBundle/issues/122/labels{/name}","comments_url":"https://api.github.com/repos/lexik/LexikJWTAuthenticationBundle/issues/122/comments","events_url":"https://api.github.com/repos/lexik/LexikJWTAuthenticationBundle/issues/122/events","html_url":"https://github.com/lexik/LexikJWTAuthenticationBundle/issues/122","id":125171384,"number":122,"title":"Protect my API responses","user":{"login":"3KyNoX","id":308755,"avatar_url":"https://avatars.githubusercontent.com/u/308755?v=3","gravatar_id":"","url":"https://api.github.com/users/3KyNoX","html_url":"https://github.com/3KyNoX","followers_url":"https://api.github.com/users/3KyNoX/followers","following_url":"https://api.github.com/users/3KyNoX/following{/other_user}","gists_url":"https://api.github.com/users/3KyNoX/gists{/gist_id}","starred_url":"https://api.github.com/users/3KyNoX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/3KyNoX/subscriptions","organizations_url":"https://api.github.com/users/3KyNoX/orgs","repos_url":"https://api.github.com/users/3KyNoX/repos","events_url":"https://api.github.com/users/3KyNoX/events{/privacy}","received_events_url":"https://api.github.com/users/3KyNoX/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-01-06T12:52:52Z","updated_at":"2016-01-08T08:09:52Z","closed_at":"2016-01-07T09:15:17Z","body":"Hello everyones,\r\n\r\nI just finished install Lexik JWT Auth Bundle but the requested behavior is not met.\r\n\r\nMy problem is probably related to my misunderstanding and here the questions : \r\n\r\nSince Lexik Bundle is installed, if I try to go to my api request page, it redirects to FOSUser login, asks for user credentials and then redirect to a generated token page.\r\n\r\nThat's ok for this part, but if I try to go to my api with the token set to URL or using POSTMAN to put the Bearer token on headers, it still continue infinitly redirecting me to login page and token generation.\r\n\r\nIf I remove from my security.yml the stateless true option, I can access my api page (as the api only required to be logged in to display responses).\r\n\r\nSo now, if I can get some help, why the api page is not protected correctly if no token given (and I have redirect to login) and why when I set the token, it still doesn't display my api jsons ?\r\n\r\n[Here is my code](https://gist.github.com/3KyNoX/3c7b4930c1d619fa2a6d)\r\n\r\nThanks for help."},"comment":{"url":"https://api.github.com/repos/lexik/LexikJWTAuthenticationBundle/issues/comments/169928002","html_url":"https://github.com/lexik/LexikJWTAuthenticationBundle/issues/122#issuecomment-169928002","issue_url":"https://api.github.com/repos/lexik/LexikJWTAuthenticationBundle/issues/122","id":169928002,"user":{"login":"slashfan","id":1168500,"avatar_url":"https://avatars.githubusercontent.com/u/1168500?v=3","gravatar_id":"","url":"https://api.github.com/users/slashfan","html_url":"https://github.com/slashfan","followers_url":"https://api.github.com/users/slashfan/followers","following_url":"https://api.github.com/users/slashfan/following{/other_user}","gists_url":"https://api.github.com/users/slashfan/gists{/gist_id}","starred_url":"https://api.github.com/users/slashfan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slashfan/subscriptions","organizations_url":"https://api.github.com/users/slashfan/orgs","repos_url":"https://api.github.com/users/slashfan/repos","events_url":"https://api.github.com/users/slashfan/events{/privacy}","received_events_url":"https://api.github.com/users/slashfan/received_events","type":"User","site_admin":false},"created_at":"2016-01-08T08:09:52Z","updated_at":"2016-01-08T08:09:52Z","body":"If you want to send the user credentials as a JSON request you need to decode it before it reaches the login_check action. You could implement a request event listener to decode it or use FOSRestBundle for that. "}}