{"action":"created","issue":{"url":"https://api.github.com/repos/MadDonkeySoftware/corp-hq/issues/21","repository_url":"https://api.github.com/repos/MadDonkeySoftware/corp-hq","labels_url":"https://api.github.com/repos/MadDonkeySoftware/corp-hq/issues/21/labels{/name}","comments_url":"https://api.github.com/repos/MadDonkeySoftware/corp-hq/issues/21/comments","events_url":"https://api.github.com/repos/MadDonkeySoftware/corp-hq/issues/21/events","html_url":"https://github.com/MadDonkeySoftware/corp-hq/pull/21","id":309949685,"number":21,"title":"CHQ-49 Added authentication API","user":{"login":"fritogotlayed","id":5406580,"avatar_url":"https://avatars2.githubusercontent.com/u/5406580?v=4","gravatar_id":"","url":"https://api.github.com/users/fritogotlayed","html_url":"https://github.com/fritogotlayed","followers_url":"https://api.github.com/users/fritogotlayed/followers","following_url":"https://api.github.com/users/fritogotlayed/following{/other_user}","gists_url":"https://api.github.com/users/fritogotlayed/gists{/gist_id}","starred_url":"https://api.github.com/users/fritogotlayed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fritogotlayed/subscriptions","organizations_url":"https://api.github.com/users/fritogotlayed/orgs","repos_url":"https://api.github.com/users/fritogotlayed/repos","events_url":"https://api.github.com/users/fritogotlayed/events{/privacy}","received_events_url":"https://api.github.com/users/fritogotlayed/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-30T01:18:59Z","updated_at":"2018-03-30T16:48:00Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/MadDonkeySoftware/corp-hq/pulls/21","html_url":"https://github.com/MadDonkeySoftware/corp-hq/pull/21","diff_url":"https://github.com/MadDonkeySoftware/corp-hq/pull/21.diff","patch_url":"https://github.com/MadDonkeySoftware/corp-hq/pull/21.patch"},"body":"### Story\r\nhttps://maddonkeysoftware.myjetbrains.com/youtrack/issue/CHQ-49\r\n\r\n#### Depends On (Optional)\r\nhttps://github.com/MadDonkeySoftware/corp-hq/pull/20\r\n\r\n### Summary\r\n* Added AuthenticationController and supporting classes\r\n* Modified `User` password and salt fields from `string` to `byte[]`\r\n  * This is because the string wasn't being translated back to a byte array properly for some reason.\r\n\r\n\r\n### Testing\r\n* Optionally: drop the users table\r\n* Register a user that you know the user name and password for\r\n* Make a good request to verify you get a HTTP 200\r\n```\r\ncurl -X POST http://localhost:5000/api/v1/authentication \\\r\n  -H 'Content-Type: application/json' \\\r\n  -d '{\r\n\t\"username\": \"test\",\r\n\t\"password\": \"testtest\"\r\n}'\r\n```\r\n* Make a good request to verify you get a HTTP 401\r\n```\r\ncurl -X POST http://localhost:5000/api/v1/authentication \\\r\n  -H 'Content-Type: application/json' \\\r\n  -d '{\r\n\t\"username\": \"tes\",\r\n\t\"password\": \"testtest\"\r\n}'\r\n```\r\n```\r\ncurl -X POST http://localhost:5000/api/v1/authentication \\\r\n  -H 'Content-Type: application/json' \\\r\n  -d '{\r\n\t\"username\": \"test\",\r\n\t\"password\": \"testtest123\"\r\n}'\r\n```"},"comment":{"url":"https://api.github.com/repos/MadDonkeySoftware/corp-hq/issues/comments/377567555","html_url":"https://github.com/MadDonkeySoftware/corp-hq/pull/21#issuecomment-377567555","issue_url":"https://api.github.com/repos/MadDonkeySoftware/corp-hq/issues/21","id":377567555,"user":{"login":"naitp","id":10606148,"avatar_url":"https://avatars0.githubusercontent.com/u/10606148?v=4","gravatar_id":"","url":"https://api.github.com/users/naitp","html_url":"https://github.com/naitp","followers_url":"https://api.github.com/users/naitp/followers","following_url":"https://api.github.com/users/naitp/following{/other_user}","gists_url":"https://api.github.com/users/naitp/gists{/gist_id}","starred_url":"https://api.github.com/users/naitp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/naitp/subscriptions","organizations_url":"https://api.github.com/users/naitp/orgs","repos_url":"https://api.github.com/users/naitp/repos","events_url":"https://api.github.com/users/naitp/events{/privacy}","received_events_url":"https://api.github.com/users/naitp/received_events","type":"User","site_admin":false},"created_at":"2018-03-30T16:48:00Z","updated_at":"2018-03-30T16:48:00Z","author_association":"CONTRIBUTOR","body":":eyes: "}}
{"actor":{"display_login":"naitp"}}