{"action":"created","issue":{"url":"https://api.github.com/repos/anttilip/evento-server/issues/17","repository_url":"https://api.github.com/repos/anttilip/evento-server","labels_url":"https://api.github.com/repos/anttilip/evento-server/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/anttilip/evento-server/issues/17/comments","events_url":"https://api.github.com/repos/anttilip/evento-server/issues/17/events","html_url":"https://github.com/anttilip/evento-server/pull/17","id":217355350,"number":17,"title":"Token authentication","user":{"login":"anttilip","id":8539623,"avatar_url":"https://avatars2.githubusercontent.com/u/8539623?v=3","gravatar_id":"","url":"https://api.github.com/users/anttilip","html_url":"https://github.com/anttilip","followers_url":"https://api.github.com/users/anttilip/followers","following_url":"https://api.github.com/users/anttilip/following{/other_user}","gists_url":"https://api.github.com/users/anttilip/gists{/gist_id}","starred_url":"https://api.github.com/users/anttilip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anttilip/subscriptions","organizations_url":"https://api.github.com/users/anttilip/orgs","repos_url":"https://api.github.com/users/anttilip/repos","events_url":"https://api.github.com/users/anttilip/events{/privacy}","received_events_url":"https://api.github.com/users/anttilip/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2017-03-27T19:49:48Z","updated_at":"2017-03-29T09:57:49Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/anttilip/evento-server/pulls/17","html_url":"https://github.com/anttilip/evento-server/pull/17","diff_url":"https://github.com/anttilip/evento-server/pull/17.diff","patch_url":"https://github.com/anttilip/evento-server/pull/17.patch"},"body":"I've now implemented base functionality.\r\n\r\n**Route to `/authenticate`**:\r\n`http post localhost:3000/authenticate email=[email] password=[password]` returns ether:\r\n```\r\n{ \r\n   \"auth_token\": \"[TOKEN]\" \r\n}\r\n``` \r\nor \r\n```\r\n{\r\n    \"error\": {\r\n        \"user_authentication\": [\r\n            \"invalid credentials\"\r\n        ]\r\n    }\r\n}\r\n```\r\n\r\nUser token can be decoded with:\r\n`JsonWebToken.decode(TOKEN)` which returns `{\"user_id\"=>1, \"exp\"=>1490729801}`.\r\n\r\n\r\nCloses #9"},"comment":{"url":"https://api.github.com/repos/anttilip/evento-server/issues/comments/290042424","html_url":"https://github.com/anttilip/evento-server/pull/17#issuecomment-290042424","issue_url":"https://api.github.com/repos/anttilip/evento-server/issues/17","id":290042424,"user":{"login":"JaakkoLipsanen","id":6358148,"avatar_url":"https://avatars1.githubusercontent.com/u/6358148?v=3","gravatar_id":"","url":"https://api.github.com/users/JaakkoLipsanen","html_url":"https://github.com/JaakkoLipsanen","followers_url":"https://api.github.com/users/JaakkoLipsanen/followers","following_url":"https://api.github.com/users/JaakkoLipsanen/following{/other_user}","gists_url":"https://api.github.com/users/JaakkoLipsanen/gists{/gist_id}","starred_url":"https://api.github.com/users/JaakkoLipsanen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JaakkoLipsanen/subscriptions","organizations_url":"https://api.github.com/users/JaakkoLipsanen/orgs","repos_url":"https://api.github.com/users/JaakkoLipsanen/repos","events_url":"https://api.github.com/users/JaakkoLipsanen/events{/privacy}","received_events_url":"https://api.github.com/users/JaakkoLipsanen/received_events","type":"User","site_admin":false},"created_at":"2017-03-29T09:57:49Z","updated_at":"2017-03-29T09:57:49Z","body":"We maybe need to force https in the backend (not evento-server) for the front end as well if we move the frontend to heroku"}}
{"actor":{"display_login":"JaakkoLipsanen"}}