{"action":"created","comment":{"url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/pulls/comments/45720653","id":45720653,"diff_hunk":"@@ -52,7 +58,31 @@ public function actionAuthenticate()\n                 $this->returnErrorJson(Craft::t('Invalid username or password'));\n             }\n \n-        } catch(HttpException $e){\n+        } catch (HttpException $e) {\n+            HeaderHelper::setHeader('HTTP/ ' . $e->statusCode);\n+            $this->returnErrorJson($e->getMessage());\n+        }\n+    }\n+\n+    /**\n+     * Forgot password action\n+     */\n+    public function actionResetPassword()\n+    {\n+\n+        try {\n+            $this->requirePostRequest();\n+\n+            $username = craft()->request->getRequiredPost('username');\n+            $user = craft()->users->getUserByUsernameOrEmail($username);\n+\n+            if ($user) {\n+                craft()->users->sendPasswordResetEmail($user);\n+            }\n+\n+            $this->returnJson(array('message' => Craft::t('Email has been sent if address exists')));\n+","path":"controllers/ApiAuthController.php","position":73,"original_position":73,"commit_id":"0e1e1c2a4c47b1f4efec349bc130e878a145a57c","original_commit_id":"0e1e1c2a4c47b1f4efec349bc130e878a145a57c","user":{"login":"boboldehampsink","id":378974,"avatar_url":"https://avatars.githubusercontent.com/u/378974?v=3","gravatar_id":"","url":"https://api.github.com/users/boboldehampsink","html_url":"https://github.com/boboldehampsink","followers_url":"https://api.github.com/users/boboldehampsink/followers","following_url":"https://api.github.com/users/boboldehampsink/following{/other_user}","gists_url":"https://api.github.com/users/boboldehampsink/gists{/gist_id}","starred_url":"https://api.github.com/users/boboldehampsink/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boboldehampsink/subscriptions","organizations_url":"https://api.github.com/users/boboldehampsink/orgs","repos_url":"https://api.github.com/users/boboldehampsink/repos","events_url":"https://api.github.com/users/boboldehampsink/events{/privacy}","received_events_url":"https://api.github.com/users/boboldehampsink/received_events","type":"User","site_admin":false},"body":"Please remove this unused space","created_at":"2015-11-24T10:55:31Z","updated_at":"2015-11-24T10:55:31Z","html_url":"https://github.com/nerds-and-company/craft-api-authentication-plugin/pull/3#discussion_r45720653","pull_request_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/pulls/comments/45720653"},"html":{"href":"https://github.com/nerds-and-company/craft-api-authentication-plugin/pull/3#discussion_r45720653"},"pull_request":{"href":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/pulls/3","id":51641236,"html_url":"https://github.com/nerds-and-company/craft-api-authentication-plugin/pull/3","diff_url":"https://github.com/nerds-and-company/craft-api-authentication-plugin/pull/3.diff","patch_url":"https://github.com/nerds-and-company/craft-api-authentication-plugin/pull/3.patch","issue_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/issues/3","number":3,"state":"open","locked":false,"title":"Forgot password","user":{"login":"bvangennep","id":12080429,"avatar_url":"https://avatars.githubusercontent.com/u/12080429?v=3","gravatar_id":"","url":"https://api.github.com/users/bvangennep","html_url":"https://github.com/bvangennep","followers_url":"https://api.github.com/users/bvangennep/followers","following_url":"https://api.github.com/users/bvangennep/following{/other_user}","gists_url":"https://api.github.com/users/bvangennep/gists{/gist_id}","starred_url":"https://api.github.com/users/bvangennep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bvangennep/subscriptions","organizations_url":"https://api.github.com/users/bvangennep/orgs","repos_url":"https://api.github.com/users/bvangennep/repos","events_url":"https://api.github.com/users/bvangennep/events{/privacy}","received_events_url":"https://api.github.com/users/bvangennep/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-11-24T10:29:43Z","updated_at":"2015-11-24T10:55:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d2c3f1dcbf487c8ff5da4f4ec4905dfc0764ba70","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/pulls/3/commits","review_comments_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/pulls/3/comments","review_comment_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/issues/3/comments","statuses_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/statuses/0e1e1c2a4c47b1f4efec349bc130e878a145a57c","head":{"label":"nerds-and-company:forgot-password","ref":"forgot-password","sha":"0e1e1c2a4c47b1f4efec349bc130e878a145a57c","user":{"login":"nerds-and-company","id":12208590,"avatar_url":"https://avatars.githubusercontent.com/u/12208590?v=3","gravatar_id":"","url":"https://api.github.com/users/nerds-and-company","html_url":"https://github.com/nerds-and-company","followers_url":"https://api.github.com/users/nerds-and-company/followers","following_url":"https://api.github.com/users/nerds-and-company/following{/other_user}","gists_url":"https://api.github.com/users/nerds-and-company/gists{/gist_id}","starred_url":"https://api.github.com/users/nerds-and-company/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nerds-and-company/subscriptions","organizations_url":"https://api.github.com/users/nerds-and-company/orgs","repos_url":"https://api.github.com/users/nerds-and-company/repos","events_url":"https://api.github.com/users/nerds-and-company/events{/privacy}","received_events_url":"https://api.github.com/users/nerds-and-company/received_events","type":"Organization","site_admin":false},"repo":{"id":45976922,"name":"craft-api-authentication-plugin","full_name":"nerds-and-company/craft-api-authentication-plugin","owner":{"login":"nerds-and-company","id":12208590,"avatar_url":"https://avatars.githubusercontent.com/u/12208590?v=3","gravatar_id":"","url":"https://api.github.com/users/nerds-and-company","html_url":"https://github.com/nerds-and-company","followers_url":"https://api.github.com/users/nerds-and-company/followers","following_url":"https://api.github.com/users/nerds-and-company/following{/other_user}","gists_url":"https://api.github.com/users/nerds-and-company/gists{/gist_id}","starred_url":"https://api.github.com/users/nerds-and-company/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nerds-and-company/subscriptions","organizations_url":"https://api.github.com/users/nerds-and-company/orgs","repos_url":"https://api.github.com/users/nerds-and-company/repos","events_url":"https://api.github.com/users/nerds-and-company/events{/privacy}","received_events_url":"https://api.github.com/users/nerds-and-company/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nerds-and-company/craft-api-authentication-plugin","description":"Plugin to allow generation of an access token for use in api clients","fork":false,"url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin","forks_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/forks","keys_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/teams","hooks_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/hooks","issue_events_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/events","assignees_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/tags","blobs_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/languages","stargazers_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/stargazers","contributors_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/contributors","subscribers_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/subscribers","subscription_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/subscription","commits_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/merges","archive_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/downloads","issues_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/labels{/name}","releases_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/releases{/id}","created_at":"2015-11-11T11:08:37Z","updated_at":"2015-11-11T11:16:36Z","pushed_at":"2015-11-24T10:37:41Z","git_url":"git://github.com/nerds-and-company/craft-api-authentication-plugin.git","ssh_url":"git@github.com:nerds-and-company/craft-api-authentication-plugin.git","clone_url":"https://github.com/nerds-and-company/craft-api-authentication-plugin.git","svn_url":"https://github.com/nerds-and-company/craft-api-authentication-plugin","homepage":null,"size":21,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"nerds-and-company:master","ref":"master","sha":"d797dbacdd35719f451e9b5dd9a8be658a8be503","user":{"login":"nerds-and-company","id":12208590,"avatar_url":"https://avatars.githubusercontent.com/u/12208590?v=3","gravatar_id":"","url":"https://api.github.com/users/nerds-and-company","html_url":"https://github.com/nerds-and-company","followers_url":"https://api.github.com/users/nerds-and-company/followers","following_url":"https://api.github.com/users/nerds-and-company/following{/other_user}","gists_url":"https://api.github.com/users/nerds-and-company/gists{/gist_id}","starred_url":"https://api.github.com/users/nerds-and-company/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nerds-and-company/subscriptions","organizations_url":"https://api.github.com/users/nerds-and-company/orgs","repos_url":"https://api.github.com/users/nerds-and-company/repos","events_url":"https://api.github.com/users/nerds-and-company/events{/privacy}","received_events_url":"https://api.github.com/users/nerds-and-company/received_events","type":"Organization","site_admin":false},"repo":{"id":45976922,"name":"craft-api-authentication-plugin","full_name":"nerds-and-company/craft-api-authentication-plugin","owner":{"login":"nerds-and-company","id":12208590,"avatar_url":"https://avatars.githubusercontent.com/u/12208590?v=3","gravatar_id":"","url":"https://api.github.com/users/nerds-and-company","html_url":"https://github.com/nerds-and-company","followers_url":"https://api.github.com/users/nerds-and-company/followers","following_url":"https://api.github.com/users/nerds-and-company/following{/other_user}","gists_url":"https://api.github.com/users/nerds-and-company/gists{/gist_id}","starred_url":"https://api.github.com/users/nerds-and-company/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nerds-and-company/subscriptions","organizations_url":"https://api.github.com/users/nerds-and-company/orgs","repos_url":"https://api.github.com/users/nerds-and-company/repos","events_url":"https://api.github.com/users/nerds-and-company/events{/privacy}","received_events_url":"https://api.github.com/users/nerds-and-company/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nerds-and-company/craft-api-authentication-plugin","description":"Plugin to allow generation of an access token for use in api clients","fork":false,"url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin","forks_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/forks","keys_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/teams","hooks_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/hooks","issue_events_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/events","assignees_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/tags","blobs_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/languages","stargazers_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/stargazers","contributors_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/contributors","subscribers_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/subscribers","subscription_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/subscription","commits_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/merges","archive_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/downloads","issues_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/labels{/name}","releases_url":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/releases{/id}","created_at":"2015-11-11T11:08:37Z","updated_at":"2015-11-11T11:16:36Z","pushed_at":"2015-11-24T10:37:41Z","git_url":"git://github.com/nerds-and-company/craft-api-authentication-plugin.git","ssh_url":"git@github.com:nerds-and-company/craft-api-authentication-plugin.git","clone_url":"https://github.com/nerds-and-company/craft-api-authentication-plugin.git","svn_url":"https://github.com/nerds-and-company/craft-api-authentication-plugin","homepage":null,"size":21,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/pulls/3"},"html":{"href":"https://github.com/nerds-and-company/craft-api-authentication-plugin/pull/3"},"issue":{"href":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/issues/3"},"comments":{"href":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/nerds-and-company/craft-api-authentication-plugin/statuses/0e1e1c2a4c47b1f4efec349bc130e878a145a57c"}}}}