{"action":"created","issue":{"url":"https://api.github.com/repos/api-platform/api-platform/issues/478","repository_url":"https://api.github.com/repos/api-platform/api-platform","labels_url":"https://api.github.com/repos/api-platform/api-platform/issues/478/labels{/name}","comments_url":"https://api.github.com/repos/api-platform/api-platform/issues/478/comments","events_url":"https://api.github.com/repos/api-platform/api-platform/issues/478/events","html_url":"https://github.com/api-platform/api-platform/issues/478","id":278689609,"number":478,"title":"Login + Jwt security","user":{"login":"pesseyjulien","id":10850944,"avatar_url":"https://avatars1.githubusercontent.com/u/10850944?v=4","gravatar_id":"","url":"https://api.github.com/users/pesseyjulien","html_url":"https://github.com/pesseyjulien","followers_url":"https://api.github.com/users/pesseyjulien/followers","following_url":"https://api.github.com/users/pesseyjulien/following{/other_user}","gists_url":"https://api.github.com/users/pesseyjulien/gists{/gist_id}","starred_url":"https://api.github.com/users/pesseyjulien/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pesseyjulien/subscriptions","organizations_url":"https://api.github.com/users/pesseyjulien/orgs","repos_url":"https://api.github.com/users/pesseyjulien/repos","events_url":"https://api.github.com/users/pesseyjulien/events{/privacy}","received_events_url":"https://api.github.com/users/pesseyjulien/received_events","type":"User","site_admin":false},"labels":[{"id":184113968,"url":"https://api.github.com/repos/api-platform/api-platform/labels/question","name":"question","color":"cc317c","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-12-02T14:52:35Z","updated_at":"2018-04-26T13:27:19Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\n\r\nIm struggling a lot to properly configure FosUser + Jwt together. What I want to achieve is the following :\r\n\r\n- token secured access to the api endpoints, with Jwt.\r\n- login form to access the api doc\r\n\r\nFor now, the jwt is properly working, login_check gives me a token and then I can use it on y endpoints.\r\nBut, when I tried to login via the form and then access the doc, the login form redirect me to the login_check and give me a token instead of redirecting me to the doc (/). When I try to access it afterwards, I have a 401 error. \r\n\r\nAny ideas how to achieve this ? I have read the docs multiple times but I’m missing something here..\r\n\r\nThanks in avance,\r\nJulien "},"comment":{"url":"https://api.github.com/repos/api-platform/api-platform/issues/comments/384640423","html_url":"https://github.com/api-platform/api-platform/issues/478#issuecomment-384640423","issue_url":"https://api.github.com/repos/api-platform/api-platform/issues/478","id":384640423,"user":{"login":"sylflo","id":2678289,"avatar_url":"https://avatars0.githubusercontent.com/u/2678289?v=4","gravatar_id":"","url":"https://api.github.com/users/sylflo","html_url":"https://github.com/sylflo","followers_url":"https://api.github.com/users/sylflo/followers","following_url":"https://api.github.com/users/sylflo/following{/other_user}","gists_url":"https://api.github.com/users/sylflo/gists{/gist_id}","starred_url":"https://api.github.com/users/sylflo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sylflo/subscriptions","organizations_url":"https://api.github.com/users/sylflo/orgs","repos_url":"https://api.github.com/users/sylflo/repos","events_url":"https://api.github.com/users/sylflo/events{/privacy}","received_events_url":"https://api.github.com/users/sylflo/received_events","type":"User","site_admin":false},"created_at":"2018-04-26T13:27:19Z","updated_at":"2018-04-26T13:27:19Z","author_association":"NONE","body":"@dleute I am not using FosUser but I am using json_loing instead of form_login, that's maybe what you need\r\n\r\n```\r\nfirewalls:\r\n        login:\r\n            pattern:  ^/login\r\n            stateless: true\r\n            anonymous: true\r\n            provider: our_db_provider\r\n            json_login:\r\n                check_path: /login_check\r\n                require_previous_session: false\r\n                username_path: 'username'\r\n                password_path: 'password'\r\n                success_handler: lexik_jwt_authentication.handler.authentication_success\r\n                failure_handler: lexik_jwt_authentication.handler.authentication_failure\r\n        dev:\r\n            pattern: ^/(_(profiler|wdt)|css|images|js)/\r\n            security: false\r\n        main:\r\n            pattern: ^/\r\n            anonymous: ~\r\n            provider: our_db_provider\r\n            lexik_jwt:\r\n                authorization_header: # check token in Authorization Header\r\n                    enabled: true\r\n                    prefix:  Bearer\r\n\r\n            # activate different ways to authenticate\r\n\r\n            # http_basic: ~\r\n            # https://symfony.com/doc/current/security.html#a-configuring-how-your-users-will-authenticate\r\n\r\n            # form_login: ~\r\n            # https://symfony.com/doc/current/security/form_login_setup.html\r\n```"}}
{"actor":{"display_login":"sylflo"}}