{"action":"created","issue":{"url":"https://api.github.com/repos/asm-products/confy/issues/8","labels_url":"https://api.github.com/repos/asm-products/confy/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/asm-products/confy/issues/8/comments","events_url":"https://api.github.com/repos/asm-products/confy/issues/8/events","html_url":"https://github.com/asm-products/confy/pull/8","id":69645744,"number":8,"title":"Implement forgotten password resetting system","user":{"login":"dibosh","id":8603524,"avatar_url":"https://avatars.githubusercontent.com/u/8603524?v=3","gravatar_id":"","url":"https://api.github.com/users/dibosh","html_url":"https://github.com/dibosh","followers_url":"https://api.github.com/users/dibosh/followers","following_url":"https://api.github.com/users/dibosh/following{/other_user}","gists_url":"https://api.github.com/users/dibosh/gists{/gist_id}","starred_url":"https://api.github.com/users/dibosh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dibosh/subscriptions","organizations_url":"https://api.github.com/users/dibosh/orgs","repos_url":"https://api.github.com/users/dibosh/repos","events_url":"https://api.github.com/users/dibosh/events{/privacy}","received_events_url":"https://api.github.com/users/dibosh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-04-20T18:04:25Z","updated_at":"2015-04-20T20:17:20Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/asm-products/confy/pulls/8","html_url":"https://github.com/asm-products/confy/pull/8","diff_url":"https://github.com/asm-products/confy/pull/8.diff","patch_url":"https://github.com/asm-products/confy/pull/8.patch"},"body":"#### Testing the functionality :\r\n\r\n###### How to run- \r\n\r\nRun the service using `sh run_app.sh` from Terminal. The script makes sure the mailgun api key and domain is exported to environment prior to running the service using `node app.js`. This is important because the mailgun api won't be available to the service at runtime otherwise; resulting no email to be sent when the api is fired.\r\n\r\n\r\n`GET` to `user/forgot/` with the format `user/forgot/<email>`\r\nSuccessful response(if the user with that email exists or no error occurs) will look like this - \r\n```\r\n{\r\n\"action\": \"reset password\",\r\n\"code\": \"email_sent\",\r\n\"token\": \"4ba23308bc6090788c7639608969fa0835792b30\"\r\n}\r\n```\r\nexample: `user/forgot/john@doe.com`\r\n\r\nand an email with a link (generated with the token) will be sent to specified email address.\r\n\r\n`POST` to `user/forgot` with the `token` from `GET` call and a password will reset the password for the user associated with the token.\r\n`keys: reset_password_token, password`\r\nExample screenshot when the api is being called using **postman** - \r\n![screen shot 2015-04-21 at 12 08 32 am](https://cloud.githubusercontent.com/assets/8603524/7236919/da946dbe-e7b9-11e4-9a6e-cc170fa7a5d6.png)\r\n\r\nThe password gets encrypted before inserting to database.\r\n"},"comment":{"url":"https://api.github.com/repos/asm-products/confy/issues/comments/94558046","html_url":"https://github.com/asm-products/confy/pull/8#issuecomment-94558046","issue_url":"https://api.github.com/repos/asm-products/confy/issues/8","id":94558046,"user":{"login":"pksunkara","id":174703,"avatar_url":"https://avatars.githubusercontent.com/u/174703?v=3","gravatar_id":"","url":"https://api.github.com/users/pksunkara","html_url":"https://github.com/pksunkara","followers_url":"https://api.github.com/users/pksunkara/followers","following_url":"https://api.github.com/users/pksunkara/following{/other_user}","gists_url":"https://api.github.com/users/pksunkara/gists{/gist_id}","starred_url":"https://api.github.com/users/pksunkara/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pksunkara/subscriptions","organizations_url":"https://api.github.com/users/pksunkara/orgs","repos_url":"https://api.github.com/users/pksunkara/repos","events_url":"https://api.github.com/users/pksunkara/events{/privacy}","received_events_url":"https://api.github.com/users/pksunkara/received_events","type":"User","site_admin":false},"created_at":"2015-04-20T20:17:20Z","updated_at":"2015-04-20T20:17:20Z","body":"Reviewed. Good progress. But need a lot more polishing before I can merge."}}