{"action":"opened","issue":{"url":"https://api.github.com/repos/tymondesigns/jwt-auth/issues/1607","repository_url":"https://api.github.com/repos/tymondesigns/jwt-auth","labels_url":"https://api.github.com/repos/tymondesigns/jwt-auth/issues/1607/labels{/name}","comments_url":"https://api.github.com/repos/tymondesigns/jwt-auth/issues/1607/comments","events_url":"https://api.github.com/repos/tymondesigns/jwt-auth/issues/1607/events","html_url":"https://github.com/tymondesigns/jwt-auth/issues/1607","id":334125569,"node_id":"MDU6SXNzdWUzMzQxMjU1Njk=","number":1607,"title":"Trying to use asymmetrical algorithm","user":{"login":"P4Thi0ut","id":15527334,"node_id":"MDQ6VXNlcjE1NTI3MzM0","avatar_url":"https://avatars1.githubusercontent.com/u/15527334?v=4","gravatar_id":"","url":"https://api.github.com/users/P4Thi0ut","html_url":"https://github.com/P4Thi0ut","followers_url":"https://api.github.com/users/P4Thi0ut/followers","following_url":"https://api.github.com/users/P4Thi0ut/following{/other_user}","gists_url":"https://api.github.com/users/P4Thi0ut/gists{/gist_id}","starred_url":"https://api.github.com/users/P4Thi0ut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/P4Thi0ut/subscriptions","organizations_url":"https://api.github.com/users/P4Thi0ut/orgs","repos_url":"https://api.github.com/users/P4Thi0ut/repos","events_url":"https://api.github.com/users/P4Thi0ut/events{/privacy}","received_events_url":"https://api.github.com/users/P4Thi0ut/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-20T15:13:08Z","updated_at":"2018-06-20T15:13:08Z","closed_at":null,"author_association":"NONE","body":"### Trying to use JWT auth with ES384\r\n\r\nHello, I have been using tymon/jwt for a while with the default symmetrical algorithm HS256. I wanted to switch to an asymmetrical one : **ES384**.\r\n\r\n### The environment\r\n| Q                 | A\r\n| ----------------- | ---\r\n| Framework         | Lumen 5.2\r\n| Tymon/JWT   | 1.0.0-beta.1\r\n| Platform  | both Windows 7 & Debian 9\r\n\r\n### What I've done so far\r\n\r\n- I updated the JWT_ALGO in the .env file to ES384\r\n- I generated a key pair using openssl as advised by tdhsmith in this case : #763\r\n- The generation commands : \r\nfor private key generation : \r\n`openssl genpkey -algorithm EC -pkeyopt ec_paramgen_curve:P-384 -pkeyopt ec_param_enc:named_curve -pass pass:coolkeyyouhavehere | openssl pkcs8 -topk8 -nocrypt -outform der > private.pem`\r\n for public key : \r\n`openssl pkey -pubout -inform der -outform der -in private.pem -out public.pem`\r\n - I replaced the values directly in tymon config file : \r\n`'public' => 'file://../public.pem',\r\n'private' => 'file://../private.pem',\r\n'passphrase' => env('JWT_PASSPHRASE')`\r\n\r\nWhen trying to issue a token for a valid user I have the following error : **'token_not_found'**. I firstly though it was a path related issue but I managed to issue a token with a key pair generated with ssh-keygen, (of course the token wasn't valid but still I had a response !). The only difference I noticed was a header on the ssh-keygen `---- BEGIN [...] ----` and a footer, those are not visible in the keys generated using openssl.\r\n\r\n### Situation\r\n\r\nAt this point, I don't know what is wrong, it seems like the generated .pem file is not recognized as a valid token by the library, but I can't investigate further as I don't have a strong understanding of key pairs generation and verification process.\r\n\r\nI though that I might be able to get some help by posting here, sorry if it is not the right place.\r\n\r\n### What I really intend to do\r\n\r\nI would like to use an asymmetrical process in order to share a public key for third parties, I'm not specifically wanting to use ES384. The authentication with HS256 was working fine but I don't want to have multiple copies of the private key on several servers.\r\n\r\nThank you very very very much for your help ! :)\r\n"}}
{"actor":{"display_login":"P4Thi0ut"}}