{"action":"created","comment":{"url":"https://api.github.com/repos/thoughtbot/clearance/pulls/comments/31816203","id":31816203,"diff_hunk":"@@ -37,8 +40,14 @@ def update\n \n   private\n \n-  def deliver_email(user)\n-    mail = ::ClearanceMailer.change_password(user)\n+  def create_password_reset_for(user)","path":"app/controllers/clearance/passwords_controller.rb","position":44,"original_position":44,"commit_id":"b1015366b9285ce42df77f34ba7bbe2b1455e39c","original_commit_id":"b1015366b9285ce42df77f34ba7bbe2b1455e39c","user":{"login":"derekprior","id":152152,"avatar_url":"https://avatars.githubusercontent.com/u/152152?v=3","gravatar_id":"","url":"https://api.github.com/users/derekprior","html_url":"https://github.com/derekprior","followers_url":"https://api.github.com/users/derekprior/followers","following_url":"https://api.github.com/users/derekprior/following{/other_user}","gists_url":"https://api.github.com/users/derekprior/gists{/gist_id}","starred_url":"https://api.github.com/users/derekprior/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/derekprior/subscriptions","organizations_url":"https://api.github.com/users/derekprior/orgs","repos_url":"https://api.github.com/users/derekprior/repos","events_url":"https://api.github.com/users/derekprior/events{/privacy}","received_events_url":"https://api.github.com/users/derekprior/received_events","type":"User","site_admin":false},"body":"SInce we're going to target this for 2.0, I think we should not worry about attr_accessible and use strong params here. What do you think?","created_at":"2015-06-05T14:22:55Z","updated_at":"2015-06-05T14:22:55Z","html_url":"https://github.com/thoughtbot/clearance/pull/532#discussion_r31816203","pull_request_url":"https://api.github.com/repos/thoughtbot/clearance/pulls/532","_links":{"self":{"href":"https://api.github.com/repos/thoughtbot/clearance/pulls/comments/31816203"},"html":{"href":"https://github.com/thoughtbot/clearance/pull/532#discussion_r31816203"},"pull_request":{"href":"https://api.github.com/repos/thoughtbot/clearance/pulls/532"}}},"pull_request":{"url":"https://api.github.com/repos/thoughtbot/clearance/pulls/532","id":28831462,"html_url":"https://github.com/thoughtbot/clearance/pull/532","diff_url":"https://github.com/thoughtbot/clearance/pull/532.diff","patch_url":"https://github.com/thoughtbot/clearance/pull/532.patch","issue_url":"https://api.github.com/repos/thoughtbot/clearance/issues/532","number":532,"state":"open","locked":false,"title":"Set an expiration for password reset tokens","user":{"login":"mxie","id":602470,"avatar_url":"https://avatars.githubusercontent.com/u/602470?v=3","gravatar_id":"","url":"https://api.github.com/users/mxie","html_url":"https://github.com/mxie","followers_url":"https://api.github.com/users/mxie/followers","following_url":"https://api.github.com/users/mxie/following{/other_user}","gists_url":"https://api.github.com/users/mxie/gists{/gist_id}","starred_url":"https://api.github.com/users/mxie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mxie/subscriptions","organizations_url":"https://api.github.com/users/mxie/orgs","repos_url":"https://api.github.com/users/mxie/repos","events_url":"https://api.github.com/users/mxie/events{/privacy}","received_events_url":"https://api.github.com/users/mxie/received_events","type":"User","site_admin":false},"body":"Overview:\r\nPassword reset tokens will now have an expiration date/time. By default, it\r\nwill be in 15 minutes. This is configurable via the `password_reset_time_limit`\r\noption.\r\n\r\nUsers can request a reset as many times as they wish. Once they \"claim\" a reset\r\nwith one of their tokens, all others will be invalidated (set as expired).\r\n\r\nDetails:\r\n* User-token data in a separate table called `password_resets`.\r\n* Password reset logic has been extracted from the `User` model. It's now\r\nhandled at the controller level, referring to the `PasswordReset` and\r\n`PasswordResetDeactivator` classes as needed.\r\n* Routes and views have stayed the same for transparency.\r\n  - To consider: renaming `PasswordsController` to `PasswordResetsController`\r\n  later.\r\n* Introduced `Clearance::Generators::Migration` to abstract common migration-related methods\r\n\r\nThis has been tested on a repo that's currently using Clearance, and it seems to work fine. I plan on adding some info on the Wiki for anyone who's adding the expiration feature to their existing Clearance'd project.\r\n\r\nAlso, this is a huge PR. Suggestions on how to break this up would be great appreciated.\r\n\r\nFixes #465","created_at":"2015-02-06T18:41:06Z","updated_at":"2015-06-05T14:22:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d201305938aad4ecc5b011b95f8befda5cacd13f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/thoughtbot/clearance/pulls/532/commits","review_comments_url":"https://api.github.com/repos/thoughtbot/clearance/pulls/532/comments","review_comment_url":"https://api.github.com/repos/thoughtbot/clearance/pulls/comments{/number}","comments_url":"https://api.github.com/repos/thoughtbot/clearance/issues/532/comments","statuses_url":"https://api.github.com/repos/thoughtbot/clearance/statuses/b1015366b9285ce42df77f34ba7bbe2b1455e39c","head":{"label":"thoughtbot:mx-expiring-resets","ref":"mx-expiring-resets","sha":"b1015366b9285ce42df77f34ba7bbe2b1455e39c","user":{"login":"thoughtbot","id":6183,"avatar_url":"https://avatars.githubusercontent.com/u/6183?v=3","gravatar_id":"","url":"https://api.github.com/users/thoughtbot","html_url":"https://github.com/thoughtbot","followers_url":"https://api.github.com/users/thoughtbot/followers","following_url":"https://api.github.com/users/thoughtbot/following{/other_user}","gists_url":"https://api.github.com/users/thoughtbot/gists{/gist_id}","starred_url":"https://api.github.com/users/thoughtbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thoughtbot/subscriptions","organizations_url":"https://api.github.com/users/thoughtbot/orgs","repos_url":"https://api.github.com/users/thoughtbot/repos","events_url":"https://api.github.com/users/thoughtbot/events{/privacy}","received_events_url":"https://api.github.com/users/thoughtbot/received_events","type":"Organization","site_admin":false},"repo":{"id":56125,"name":"clearance","full_name":"thoughtbot/clearance","owner":{"login":"thoughtbot","id":6183,"avatar_url":"https://avatars.githubusercontent.com/u/6183?v=3","gravatar_id":"","url":"https://api.github.com/users/thoughtbot","html_url":"https://github.com/thoughtbot","followers_url":"https://api.github.com/users/thoughtbot/followers","following_url":"https://api.github.com/users/thoughtbot/following{/other_user}","gists_url":"https://api.github.com/users/thoughtbot/gists{/gist_id}","starred_url":"https://api.github.com/users/thoughtbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thoughtbot/subscriptions","organizations_url":"https://api.github.com/users/thoughtbot/orgs","repos_url":"https://api.github.com/users/thoughtbot/repos","events_url":"https://api.github.com/users/thoughtbot/events{/privacy}","received_events_url":"https://api.github.com/users/thoughtbot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/thoughtbot/clearance","description":"Rails authentication with email & password.","fork":false,"url":"https://api.github.com/repos/thoughtbot/clearance","forks_url":"https://api.github.com/repos/thoughtbot/clearance/forks","keys_url":"https://api.github.com/repos/thoughtbot/clearance/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thoughtbot/clearance/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thoughtbot/clearance/teams","hooks_url":"https://api.github.com/repos/thoughtbot/clearance/hooks","issue_events_url":"https://api.github.com/repos/thoughtbot/clearance/issues/events{/number}","events_url":"https://api.github.com/repos/thoughtbot/clearance/events","assignees_url":"https://api.github.com/repos/thoughtbot/clearance/assignees{/user}","branches_url":"https://api.github.com/repos/thoughtbot/clearance/branches{/branch}","tags_url":"https://api.github.com/repos/thoughtbot/clearance/tags","blobs_url":"https://api.github.com/repos/thoughtbot/clearance/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thoughtbot/clearance/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thoughtbot/clearance/git/refs{/sha}","trees_url":"https://api.github.com/repos/thoughtbot/clearance/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thoughtbot/clearance/statuses/{sha}","languages_url":"https://api.github.com/repos/thoughtbot/clearance/languages","stargazers_url":"https://api.github.com/repos/thoughtbot/clearance/stargazers","contributors_url":"https://api.github.com/repos/thoughtbot/clearance/contributors","subscribers_url":"https://api.github.com/repos/thoughtbot/clearance/subscribers","subscription_url":"https://api.github.com/repos/thoughtbot/clearance/subscription","commits_url":"https://api.github.com/repos/thoughtbot/clearance/commits{/sha}","git_commits_url":"https://api.github.com/repos/thoughtbot/clearance/git/commits{/sha}","comments_url":"https://api.github.com/repos/thoughtbot/clearance/comments{/number}","issue_comment_url":"https://api.github.com/repos/thoughtbot/clearance/issues/comments{/number}","contents_url":"https://api.github.com/repos/thoughtbot/clearance/contents/{+path}","compare_url":"https://api.github.com/repos/thoughtbot/clearance/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thoughtbot/clearance/merges","archive_url":"https://api.github.com/repos/thoughtbot/clearance/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thoughtbot/clearance/downloads","issues_url":"https://api.github.com/repos/thoughtbot/clearance/issues{/number}","pulls_url":"https://api.github.com/repos/thoughtbot/clearance/pulls{/number}","milestones_url":"https://api.github.com/repos/thoughtbot/clearance/milestones{/number}","notifications_url":"https://api.github.com/repos/thoughtbot/clearance/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thoughtbot/clearance/labels{/name}","releases_url":"https://api.github.com/repos/thoughtbot/clearance/releases{/id}","created_at":"2008-09-24T19:57:58Z","updated_at":"2015-06-04T20:20:55Z","pushed_at":"2015-05-15T16:13:07Z","git_url":"git://github.com/thoughtbot/clearance.git","ssh_url":"git@github.com:thoughtbot/clearance.git","clone_url":"https://github.com/thoughtbot/clearance.git","svn_url":"https://github.com/thoughtbot/clearance","homepage":"https://thoughtbot.com/open-source","size":10551,"stargazers_count":1884,"watchers_count":1884,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":244,"mirror_url":null,"open_issues_count":10,"forks":244,"open_issues":10,"watchers":1884,"default_branch":"master"}},"base":{"label":"thoughtbot:master","ref":"master","sha":"beba0c38f0bd339e5c07e9ee0a5b806844904060","user":{"login":"thoughtbot","id":6183,"avatar_url":"https://avatars.githubusercontent.com/u/6183?v=3","gravatar_id":"","url":"https://api.github.com/users/thoughtbot","html_url":"https://github.com/thoughtbot","followers_url":"https://api.github.com/users/thoughtbot/followers","following_url":"https://api.github.com/users/thoughtbot/following{/other_user}","gists_url":"https://api.github.com/users/thoughtbot/gists{/gist_id}","starred_url":"https://api.github.com/users/thoughtbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thoughtbot/subscriptions","organizations_url":"https://api.github.com/users/thoughtbot/orgs","repos_url":"https://api.github.com/users/thoughtbot/repos","events_url":"https://api.github.com/users/thoughtbot/events{/privacy}","received_events_url":"https://api.github.com/users/thoughtbot/received_events","type":"Organization","site_admin":false},"repo":{"id":56125,"name":"clearance","full_name":"thoughtbot/clearance","owner":{"login":"thoughtbot","id":6183,"avatar_url":"https://avatars.githubusercontent.com/u/6183?v=3","gravatar_id":"","url":"https://api.github.com/users/thoughtbot","html_url":"https://github.com/thoughtbot","followers_url":"https://api.github.com/users/thoughtbot/followers","following_url":"https://api.github.com/users/thoughtbot/following{/other_user}","gists_url":"https://api.github.com/users/thoughtbot/gists{/gist_id}","starred_url":"https://api.github.com/users/thoughtbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thoughtbot/subscriptions","organizations_url":"https://api.github.com/users/thoughtbot/orgs","repos_url":"https://api.github.com/users/thoughtbot/repos","events_url":"https://api.github.com/users/thoughtbot/events{/privacy}","received_events_url":"https://api.github.com/users/thoughtbot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/thoughtbot/clearance","description":"Rails authentication with email & password.","fork":false,"url":"https://api.github.com/repos/thoughtbot/clearance","forks_url":"https://api.github.com/repos/thoughtbot/clearance/forks","keys_url":"https://api.github.com/repos/thoughtbot/clearance/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thoughtbot/clearance/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thoughtbot/clearance/teams","hooks_url":"https://api.github.com/repos/thoughtbot/clearance/hooks","issue_events_url":"https://api.github.com/repos/thoughtbot/clearance/issues/events{/number}","events_url":"https://api.github.com/repos/thoughtbot/clearance/events","assignees_url":"https://api.github.com/repos/thoughtbot/clearance/assignees{/user}","branches_url":"https://api.github.com/repos/thoughtbot/clearance/branches{/branch}","tags_url":"https://api.github.com/repos/thoughtbot/clearance/tags","blobs_url":"https://api.github.com/repos/thoughtbot/clearance/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thoughtbot/clearance/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thoughtbot/clearance/git/refs{/sha}","trees_url":"https://api.github.com/repos/thoughtbot/clearance/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thoughtbot/clearance/statuses/{sha}","languages_url":"https://api.github.com/repos/thoughtbot/clearance/languages","stargazers_url":"https://api.github.com/repos/thoughtbot/clearance/stargazers","contributors_url":"https://api.github.com/repos/thoughtbot/clearance/contributors","subscribers_url":"https://api.github.com/repos/thoughtbot/clearance/subscribers","subscription_url":"https://api.github.com/repos/thoughtbot/clearance/subscription","commits_url":"https://api.github.com/repos/thoughtbot/clearance/commits{/sha}","git_commits_url":"https://api.github.com/repos/thoughtbot/clearance/git/commits{/sha}","comments_url":"https://api.github.com/repos/thoughtbot/clearance/comments{/number}","issue_comment_url":"https://api.github.com/repos/thoughtbot/clearance/issues/comments{/number}","contents_url":"https://api.github.com/repos/thoughtbot/clearance/contents/{+path}","compare_url":"https://api.github.com/repos/thoughtbot/clearance/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thoughtbot/clearance/merges","archive_url":"https://api.github.com/repos/thoughtbot/clearance/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thoughtbot/clearance/downloads","issues_url":"https://api.github.com/repos/thoughtbot/clearance/issues{/number}","pulls_url":"https://api.github.com/repos/thoughtbot/clearance/pulls{/number}","milestones_url":"https://api.github.com/repos/thoughtbot/clearance/milestones{/number}","notifications_url":"https://api.github.com/repos/thoughtbot/clearance/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thoughtbot/clearance/labels{/name}","releases_url":"https://api.github.com/repos/thoughtbot/clearance/releases{/id}","created_at":"2008-09-24T19:57:58Z","updated_at":"2015-06-04T20:20:55Z","pushed_at":"2015-05-15T16:13:07Z","git_url":"git://github.com/thoughtbot/clearance.git","ssh_url":"git@github.com:thoughtbot/clearance.git","clone_url":"https://github.com/thoughtbot/clearance.git","svn_url":"https://github.com/thoughtbot/clearance","homepage":"https://thoughtbot.com/open-source","size":10551,"stargazers_count":1884,"watchers_count":1884,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":244,"mirror_url":null,"open_issues_count":10,"forks":244,"open_issues":10,"watchers":1884,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/thoughtbot/clearance/pulls/532"},"html":{"href":"https://github.com/thoughtbot/clearance/pull/532"},"issue":{"href":"https://api.github.com/repos/thoughtbot/clearance/issues/532"},"comments":{"href":"https://api.github.com/repos/thoughtbot/clearance/issues/532/comments"},"review_comments":{"href":"https://api.github.com/repos/thoughtbot/clearance/pulls/532/comments"},"review_comment":{"href":"https://api.github.com/repos/thoughtbot/clearance/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/thoughtbot/clearance/pulls/532/commits"},"statuses":{"href":"https://api.github.com/repos/thoughtbot/clearance/statuses/b1015366b9285ce42df77f34ba7bbe2b1455e39c"}}}}