{"action":"created","comment":{"url":"https://api.github.com/repos/Valentine1996/FamilyTime/pulls/comments/80656682","pull_request_review_id":1698434,"id":80656682,"diff_hunk":"@@ -0,0 +1,121 @@\n+/** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *\n+ *                                                                  *\n+ * @copyright 2016 (c), by Valentine\n+ *\n+ * @author <a href=\"mailto:valentunnamisnuk@gmail.com\">Valentyn Namisnyk</a>\n+ *\n+ * @date 2016-07-10 22:40:59 ::\n+ *\n+ * @address /Ukraine/Ivano-Frankivsk/Rozhniw\n+ *                                                                  *\n+ *///*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *\n+\n+package com.familytime.controller;\n+\n+import com.familytime.notification.model.entity.EmailAddress;\n+import com.familytime.security.model.entity.RecoveryAccess;\n+import com.familytime.security.model.service.AccessRecoveryService;\n+import com.familytime.security.view.form.PasswordRecoveryForm;\n+\n+import org.springframework.beans.factory.annotation.Autowired;\n+import org.springframework.dao.DataIntegrityViolationException;\n+import org.springframework.web.bind.annotation.RequestBody;\n+import org.springframework.web.bind.annotation.RequestMapping;\n+import org.springframework.web.bind.annotation.RequestMethod;\n+import org.springframework.web.bind.annotation.ResponseBody;\n+import org.springframework.web.bind.annotation.RestController;\n+\n+import java.io.IOException;\n+import javax.servlet.http.HttpServletResponse;\n+import javax.validation.Valid;\n+\n+/**\n+ * Controller fot access recovery.\n+ *\n+ * @version 1.0\n+ */\n+@RestController\n+@RequestMapping( value = \"/passRecovery/\" )\n+public class AccessRecoveryController {\n+\n+    @Autowired\n+    AccessRecoveryService accessRecoveryService;\n+\n+    /**\n+     * Generate hash. Sed email with link to user.\n+     *\n+     * @param emailAddress Users email.\n+     * @param response     Http response.\n+     */\n+    @RequestMapping( value = \"forgotPass\", method = RequestMethod.POST )","path":"src/main/java/com/familytime/controller/AccessRecoveryController.java","position":50,"original_position":50,"commit_id":"3f267bb357c7b56ee36ed807b220f1f649805f13","original_commit_id":"3f267bb357c7b56ee36ed807b220f1f649805f13","user":{"login":"coffeine-009","id":3800424,"avatar_url":"https://avatars.githubusercontent.com/u/3800424?v=3","gravatar_id":"","url":"https://api.github.com/users/coffeine-009","html_url":"https://github.com/coffeine-009","followers_url":"https://api.github.com/users/coffeine-009/followers","following_url":"https://api.github.com/users/coffeine-009/following{/other_user}","gists_url":"https://api.github.com/users/coffeine-009/gists{/gist_id}","starred_url":"https://api.github.com/users/coffeine-009/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coffeine-009/subscriptions","organizations_url":"https://api.github.com/users/coffeine-009/orgs","repos_url":"https://api.github.com/users/coffeine-009/repos","events_url":"https://api.github.com/users/coffeine-009/events{/privacy}","received_events_url":"https://api.github.com/users/coffeine-009/received_events","type":"User","site_admin":false},"body":"@Valentine1996 Use `/` as the first character.","created_at":"2016-09-27T09:50:31Z","updated_at":"2016-09-27T09:50:31Z","html_url":"https://github.com/Valentine1996/FamilyTime/pull/38#discussion_r80656682","pull_request_url":"https://api.github.com/repos/Valentine1996/FamilyTime/pulls/38","_links":{"self":{"href":"https://api.github.com/repos/Valentine1996/FamilyTime/pulls/comments/80656682"},"html":{"href":"https://github.com/Valentine1996/FamilyTime/pull/38#discussion_r80656682"},"pull_request":{"href":"https://api.github.com/repos/Valentine1996/FamilyTime/pulls/38"}}},"pull_request":{"url":"https://api.github.com/repos/Valentine1996/FamilyTime/pulls/38","id":86818290,"html_url":"https://github.com/Valentine1996/FamilyTime/pull/38","diff_url":"https://github.com/Valentine1996/FamilyTime/pull/38.diff","patch_url":"https://github.com/Valentine1996/FamilyTime/pull/38.patch","issue_url":"https://api.github.com/repos/Valentine1996/FamilyTime/issues/38","number":38,"state":"open","locked":false,"title":"Added password recovery endpoints. Added sample tests.","user":{"login":"Valentine1996","id":6598587,"avatar_url":"https://avatars.githubusercontent.com/u/6598587?v=3","gravatar_id":"","url":"https://api.github.com/users/Valentine1996","html_url":"https://github.com/Valentine1996","followers_url":"https://api.github.com/users/Valentine1996/followers","following_url":"https://api.github.com/users/Valentine1996/following{/other_user}","gists_url":"https://api.github.com/users/Valentine1996/gists{/gist_id}","starred_url":"https://api.github.com/users/Valentine1996/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Valentine1996/subscriptions","organizations_url":"https://api.github.com/users/Valentine1996/orgs","repos_url":"https://api.github.com/users/Valentine1996/repos","events_url":"https://api.github.com/users/Valentine1996/events{/privacy}","received_events_url":"https://api.github.com/users/Valentine1996/received_events","type":"User","site_admin":false},"body":"#11","created_at":"2016-09-26T21:02:53Z","updated_at":"2016-09-27T09:51:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9037a708c4123b7f20182169f262d3be100d936d","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Valentine1996/FamilyTime/pulls/38/commits","review_comments_url":"https://api.github.com/repos/Valentine1996/FamilyTime/pulls/38/comments","review_comment_url":"https://api.github.com/repos/Valentine1996/FamilyTime/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Valentine1996/FamilyTime/issues/38/comments","statuses_url":"https://api.github.com/repos/Valentine1996/FamilyTime/statuses/3f267bb357c7b56ee36ed807b220f1f649805f13","head":{"label":"Valentine1996:PassRecoveryMainEndPoints","ref":"PassRecoveryMainEndPoints","sha":"3f267bb357c7b56ee36ed807b220f1f649805f13","user":{"login":"Valentine1996","id":6598587,"avatar_url":"https://avatars.githubusercontent.com/u/6598587?v=3","gravatar_id":"","url":"https://api.github.com/users/Valentine1996","html_url":"https://github.com/Valentine1996","followers_url":"https://api.github.com/users/Valentine1996/followers","following_url":"https://api.github.com/users/Valentine1996/following{/other_user}","gists_url":"https://api.github.com/users/Valentine1996/gists{/gist_id}","starred_url":"https://api.github.com/users/Valentine1996/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Valentine1996/subscriptions","organizations_url":"https://api.github.com/users/Valentine1996/orgs","repos_url":"https://api.github.com/users/Valentine1996/repos","events_url":"https://api.github.com/users/Valentine1996/events{/privacy}","received_events_url":"https://api.github.com/users/Valentine1996/received_events","type":"User","site_admin":false},"repo":{"id":62585838,"name":"FamilyTime","full_name":"Valentine1996/FamilyTime","owner":{"login":"Valentine1996","id":6598587,"avatar_url":"https://avatars.githubusercontent.com/u/6598587?v=3","gravatar_id":"","url":"https://api.github.com/users/Valentine1996","html_url":"https://github.com/Valentine1996","followers_url":"https://api.github.com/users/Valentine1996/followers","following_url":"https://api.github.com/users/Valentine1996/following{/other_user}","gists_url":"https://api.github.com/users/Valentine1996/gists{/gist_id}","starred_url":"https://api.github.com/users/Valentine1996/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Valentine1996/subscriptions","organizations_url":"https://api.github.com/users/Valentine1996/orgs","repos_url":"https://api.github.com/users/Valentine1996/repos","events_url":"https://api.github.com/users/Valentine1996/events{/privacy}","received_events_url":"https://api.github.com/users/Valentine1996/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Valentine1996/FamilyTime","description":"This project is created for family management.","fork":false,"url":"https://api.github.com/repos/Valentine1996/FamilyTime","forks_url":"https://api.github.com/repos/Valentine1996/FamilyTime/forks","keys_url":"https://api.github.com/repos/Valentine1996/FamilyTime/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Valentine1996/FamilyTime/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Valentine1996/FamilyTime/teams","hooks_url":"https://api.github.com/repos/Valentine1996/FamilyTime/hooks","issue_events_url":"https://api.github.com/repos/Valentine1996/FamilyTime/issues/events{/number}","events_url":"https://api.github.com/repos/Valentine1996/FamilyTime/events","assignees_url":"https://api.github.com/repos/Valentine1996/FamilyTime/assignees{/user}","branches_url":"https://api.github.com/repos/Valentine1996/FamilyTime/branches{/branch}","tags_url":"https://api.github.com/repos/Valentine1996/FamilyTime/tags","blobs_url":"https://api.github.com/repos/Valentine1996/FamilyTime/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Valentine1996/FamilyTime/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Valentine1996/FamilyTime/git/refs{/sha}","trees_url":"https://api.github.com/repos/Valentine1996/FamilyTime/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Valentine1996/FamilyTime/statuses/{sha}","languages_url":"https://api.github.com/repos/Valentine1996/FamilyTime/languages","stargazers_url":"https://api.github.com/repos/Valentine1996/FamilyTime/stargazers","contributors_url":"https://api.github.com/repos/Valentine1996/FamilyTime/contributors","subscribers_url":"https://api.github.com/repos/Valentine1996/FamilyTime/subscribers","subscription_url":"https://api.github.com/repos/Valentine1996/FamilyTime/subscription","commits_url":"https://api.github.com/repos/Valentine1996/FamilyTime/commits{/sha}","git_commits_url":"https://api.github.com/repos/Valentine1996/FamilyTime/git/commits{/sha}","comments_url":"https://api.github.com/repos/Valentine1996/FamilyTime/comments{/number}","issue_comment_url":"https://api.github.com/repos/Valentine1996/FamilyTime/issues/comments{/number}","contents_url":"https://api.github.com/repos/Valentine1996/FamilyTime/contents/{+path}","compare_url":"https://api.github.com/repos/Valentine1996/FamilyTime/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Valentine1996/FamilyTime/merges","archive_url":"https://api.github.com/repos/Valentine1996/FamilyTime/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Valentine1996/FamilyTime/downloads","issues_url":"https://api.github.com/repos/Valentine1996/FamilyTime/issues{/number}","pulls_url":"https://api.github.com/repos/Valentine1996/FamilyTime/pulls{/number}","milestones_url":"https://api.github.com/repos/Valentine1996/FamilyTime/milestones{/number}","notifications_url":"https://api.github.com/repos/Valentine1996/FamilyTime/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Valentine1996/FamilyTime/labels{/name}","releases_url":"https://api.github.com/repos/Valentine1996/FamilyTime/releases{/id}","deployments_url":"https://api.github.com/repos/Valentine1996/FamilyTime/deployments","created_at":"2016-07-04T20:14:59Z","updated_at":"2016-07-04T21:48:13Z","pushed_at":"2016-09-26T21:17:59Z","git_url":"git://github.com/Valentine1996/FamilyTime.git","ssh_url":"git@github.com:Valentine1996/FamilyTime.git","clone_url":"https://github.com/Valentine1996/FamilyTime.git","svn_url":"https://github.com/Valentine1996/FamilyTime","homepage":null,"size":154,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"Valentine1996:master","ref":"master","sha":"64b159c72184bb8bc390f4a7ccfe612266db38f2","user":{"login":"Valentine1996","id":6598587,"avatar_url":"https://avatars.githubusercontent.com/u/6598587?v=3","gravatar_id":"","url":"https://api.github.com/users/Valentine1996","html_url":"https://github.com/Valentine1996","followers_url":"https://api.github.com/users/Valentine1996/followers","following_url":"https://api.github.com/users/Valentine1996/following{/other_user}","gists_url":"https://api.github.com/users/Valentine1996/gists{/gist_id}","starred_url":"https://api.github.com/users/Valentine1996/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Valentine1996/subscriptions","organizations_url":"https://api.github.com/users/Valentine1996/orgs","repos_url":"https://api.github.com/users/Valentine1996/repos","events_url":"https://api.github.com/users/Valentine1996/events{/privacy}","received_events_url":"https://api.github.com/users/Valentine1996/received_events","type":"User","site_admin":false},"repo":{"id":62585838,"name":"FamilyTime","full_name":"Valentine1996/FamilyTime","owner":{"login":"Valentine1996","id":6598587,"avatar_url":"https://avatars.githubusercontent.com/u/6598587?v=3","gravatar_id":"","url":"https://api.github.com/users/Valentine1996","html_url":"https://github.com/Valentine1996","followers_url":"https://api.github.com/users/Valentine1996/followers","following_url":"https://api.github.com/users/Valentine1996/following{/other_user}","gists_url":"https://api.github.com/users/Valentine1996/gists{/gist_id}","starred_url":"https://api.github.com/users/Valentine1996/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Valentine1996/subscriptions","organizations_url":"https://api.github.com/users/Valentine1996/orgs","repos_url":"https://api.github.com/users/Valentine1996/repos","events_url":"https://api.github.com/users/Valentine1996/events{/privacy}","received_events_url":"https://api.github.com/users/Valentine1996/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Valentine1996/FamilyTime","description":"This project is created for family management.","fork":false,"url":"https://api.github.com/repos/Valentine1996/FamilyTime","forks_url":"https://api.github.com/repos/Valentine1996/FamilyTime/forks","keys_url":"https://api.github.com/repos/Valentine1996/FamilyTime/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Valentine1996/FamilyTime/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Valentine1996/FamilyTime/teams","hooks_url":"https://api.github.com/repos/Valentine1996/FamilyTime/hooks","issue_events_url":"https://api.github.com/repos/Valentine1996/FamilyTime/issues/events{/number}","events_url":"https://api.github.com/repos/Valentine1996/FamilyTime/events","assignees_url":"https://api.github.com/repos/Valentine1996/FamilyTime/assignees{/user}","branches_url":"https://api.github.com/repos/Valentine1996/FamilyTime/branches{/branch}","tags_url":"https://api.github.com/repos/Valentine1996/FamilyTime/tags","blobs_url":"https://api.github.com/repos/Valentine1996/FamilyTime/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Valentine1996/FamilyTime/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Valentine1996/FamilyTime/git/refs{/sha}","trees_url":"https://api.github.com/repos/Valentine1996/FamilyTime/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Valentine1996/FamilyTime/statuses/{sha}","languages_url":"https://api.github.com/repos/Valentine1996/FamilyTime/languages","stargazers_url":"https://api.github.com/repos/Valentine1996/FamilyTime/stargazers","contributors_url":"https://api.github.com/repos/Valentine1996/FamilyTime/contributors","subscribers_url":"https://api.github.com/repos/Valentine1996/FamilyTime/subscribers","subscription_url":"https://api.github.com/repos/Valentine1996/FamilyTime/subscription","commits_url":"https://api.github.com/repos/Valentine1996/FamilyTime/commits{/sha}","git_commits_url":"https://api.github.com/repos/Valentine1996/FamilyTime/git/commits{/sha}","comments_url":"https://api.github.com/repos/Valentine1996/FamilyTime/comments{/number}","issue_comment_url":"https://api.github.com/repos/Valentine1996/FamilyTime/issues/comments{/number}","contents_url":"https://api.github.com/repos/Valentine1996/FamilyTime/contents/{+path}","compare_url":"https://api.github.com/repos/Valentine1996/FamilyTime/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Valentine1996/FamilyTime/merges","archive_url":"https://api.github.com/repos/Valentine1996/FamilyTime/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Valentine1996/FamilyTime/downloads","issues_url":"https://api.github.com/repos/Valentine1996/FamilyTime/issues{/number}","pulls_url":"https://api.github.com/repos/Valentine1996/FamilyTime/pulls{/number}","milestones_url":"https://api.github.com/repos/Valentine1996/FamilyTime/milestones{/number}","notifications_url":"https://api.github.com/repos/Valentine1996/FamilyTime/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Valentine1996/FamilyTime/labels{/name}","releases_url":"https://api.github.com/repos/Valentine1996/FamilyTime/releases{/id}","deployments_url":"https://api.github.com/repos/Valentine1996/FamilyTime/deployments","created_at":"2016-07-04T20:14:59Z","updated_at":"2016-07-04T21:48:13Z","pushed_at":"2016-09-26T21:17:59Z","git_url":"git://github.com/Valentine1996/FamilyTime.git","ssh_url":"git@github.com:Valentine1996/FamilyTime.git","clone_url":"https://github.com/Valentine1996/FamilyTime.git","svn_url":"https://github.com/Valentine1996/FamilyTime","homepage":null,"size":154,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Valentine1996/FamilyTime/pulls/38"},"html":{"href":"https://github.com/Valentine1996/FamilyTime/pull/38"},"issue":{"href":"https://api.github.com/repos/Valentine1996/FamilyTime/issues/38"},"comments":{"href":"https://api.github.com/repos/Valentine1996/FamilyTime/issues/38/comments"},"review_comments":{"href":"https://api.github.com/repos/Valentine1996/FamilyTime/pulls/38/comments"},"review_comment":{"href":"https://api.github.com/repos/Valentine1996/FamilyTime/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Valentine1996/FamilyTime/pulls/38/commits"},"statuses":{"href":"https://api.github.com/repos/Valentine1996/FamilyTime/statuses/3f267bb357c7b56ee36ed807b220f1f649805f13"}}}}
{"actor":{"display_login":"coffeine-009"}}