{"action":"created","comment":{"url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/pulls/comments/24308056","id":24308056,"diff_hunk":"@@ -4,20 +4,25 @@ class SessionsController < DeviseTokenAuth::ApplicationController\n     before_filter :set_user_by_token, :only => [:destroy]\n \n     def create\n-      # honor devise configuration for case_insensitive_keys\n-      if resource_class.case_insensitive_keys.include?(:email)\n-        email = resource_params[:email].downcase\n-      else\n-        email = resource_params[:email]\n-      end\n+      # Check\n+      field = (resource_params.keys.map(&:to_sym) & resource_class.authentication_keys).first","path":"app/controllers/devise_token_auth/sessions_controller.rb","position":11,"original_position":11,"commit_id":"65f4077da078f4a8515b1c91f610427c687c337d","original_commit_id":"65f4077da078f4a8515b1c91f610427c687c337d","user":{"login":"lynndylanhurley","id":468037,"avatar_url":"https://avatars.githubusercontent.com/u/468037?v=3","gravatar_id":"","url":"https://api.github.com/users/lynndylanhurley","html_url":"https://github.com/lynndylanhurley","followers_url":"https://api.github.com/users/lynndylanhurley/followers","following_url":"https://api.github.com/users/lynndylanhurley/following{/other_user}","gists_url":"https://api.github.com/users/lynndylanhurley/gists{/gist_id}","starred_url":"https://api.github.com/users/lynndylanhurley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lynndylanhurley/subscriptions","organizations_url":"https://api.github.com/users/lynndylanhurley/orgs","repos_url":"https://api.github.com/users/lynndylanhurley/repos","events_url":"https://api.github.com/users/lynndylanhurley/events{/privacy}","received_events_url":"https://api.github.com/users/lynndylanhurley/received_events","type":"User","site_admin":false},"body":"Nicely done :+1: ","created_at":"2015-02-09T03:54:21Z","updated_at":"2015-02-09T03:54:21Z","html_url":"https://github.com/lynndylanhurley/devise_token_auth/pull/128#discussion_r24308056","pull_request_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/pulls/128","_links":{"self":{"href":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/pulls/comments/24308056"},"html":{"href":"https://github.com/lynndylanhurley/devise_token_auth/pull/128#discussion_r24308056"},"pull_request":{"href":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/pulls/128"}}},"pull_request":{"url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/pulls/128","id":28464092,"html_url":"https://github.com/lynndylanhurley/devise_token_auth/pull/128","diff_url":"https://github.com/lynndylanhurley/devise_token_auth/pull/128.diff","patch_url":"https://github.com/lynndylanhurley/devise_token_auth/pull/128.patch","issue_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/issues/128","number":128,"state":"open","locked":false,"title":"Username register login","user":{"login":"nicolas-besnard","id":1261670,"avatar_url":"https://avatars.githubusercontent.com/u/1261670?v=3","gravatar_id":"","url":"https://api.github.com/users/nicolas-besnard","html_url":"https://github.com/nicolas-besnard","followers_url":"https://api.github.com/users/nicolas-besnard/followers","following_url":"https://api.github.com/users/nicolas-besnard/following{/other_user}","gists_url":"https://api.github.com/users/nicolas-besnard/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolas-besnard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolas-besnard/subscriptions","organizations_url":"https://api.github.com/users/nicolas-besnard/orgs","repos_url":"https://api.github.com/users/nicolas-besnard/repos","events_url":"https://api.github.com/users/nicolas-besnard/events{/privacy}","received_events_url":"https://api.github.com/users/nicolas-besnard/received_events","type":"User","site_admin":false},"body":"WIP for #127\r\n\r\nFor the test, I just C/C the test for 'normal' user. I think it can be cleaned a little more. I know how to do it in Rspec. I'll dig into this later.","created_at":"2015-02-02T12:22:02Z","updated_at":"2015-02-09T03:54:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b1304da93d47f725aaabb37b51d28bfd4e66732b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/pulls/128/commits","review_comments_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/pulls/128/comments","review_comment_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/pulls/comments/{number}","comments_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/issues/128/comments","statuses_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/statuses/65f4077da078f4a8515b1c91f610427c687c337d","head":{"label":"nicolas-besnard:UsernameRegisterLogin","ref":"UsernameRegisterLogin","sha":"65f4077da078f4a8515b1c91f610427c687c337d","user":{"login":"nicolas-besnard","id":1261670,"avatar_url":"https://avatars.githubusercontent.com/u/1261670?v=3","gravatar_id":"","url":"https://api.github.com/users/nicolas-besnard","html_url":"https://github.com/nicolas-besnard","followers_url":"https://api.github.com/users/nicolas-besnard/followers","following_url":"https://api.github.com/users/nicolas-besnard/following{/other_user}","gists_url":"https://api.github.com/users/nicolas-besnard/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolas-besnard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolas-besnard/subscriptions","organizations_url":"https://api.github.com/users/nicolas-besnard/orgs","repos_url":"https://api.github.com/users/nicolas-besnard/repos","events_url":"https://api.github.com/users/nicolas-besnard/events{/privacy}","received_events_url":"https://api.github.com/users/nicolas-besnard/received_events","type":"User","site_admin":false},"repo":{"id":30162284,"name":"devise_token_auth","full_name":"nicolas-besnard/devise_token_auth","owner":{"login":"nicolas-besnard","id":1261670,"avatar_url":"https://avatars.githubusercontent.com/u/1261670?v=3","gravatar_id":"","url":"https://api.github.com/users/nicolas-besnard","html_url":"https://github.com/nicolas-besnard","followers_url":"https://api.github.com/users/nicolas-besnard/followers","following_url":"https://api.github.com/users/nicolas-besnard/following{/other_user}","gists_url":"https://api.github.com/users/nicolas-besnard/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolas-besnard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolas-besnard/subscriptions","organizations_url":"https://api.github.com/users/nicolas-besnard/orgs","repos_url":"https://api.github.com/users/nicolas-besnard/repos","events_url":"https://api.github.com/users/nicolas-besnard/events{/privacy}","received_events_url":"https://api.github.com/users/nicolas-besnard/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nicolas-besnard/devise_token_auth","description":"Token based authentication for Rails JSON APIs. Designed to work with http://github.com/lynndylanhurley/ng-token-auth","fork":true,"url":"https://api.github.com/repos/nicolas-besnard/devise_token_auth","forks_url":"https://api.github.com/repos/nicolas-besnard/devise_token_auth/forks","keys_url":"https://api.github.com/repos/nicolas-besnard/devise_token_auth/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nicolas-besnard/devise_token_auth/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nicolas-besnard/devise_token_auth/teams","hooks_url":"https://api.github.com/repos/nicolas-besnard/devise_token_auth/hooks","issue_events_url":"https://api.github.com/repos/nicolas-besnard/devise_token_auth/issues/events{/number}","events_url":"https://api.github.com/repos/nicolas-besnard/devise_token_auth/events","assignees_url":"https://api.github.com/repos/nicolas-besnard/devise_token_auth/assignees{/user}","branches_url":"https://api.github.com/repos/nicolas-besnard/devise_token_auth/branches{/branch}","tags_url":"https://api.github.com/repos/nicolas-besnard/devise_token_auth/tags","blobs_url":"https://api.github.com/repos/nicolas-besnard/devise_token_auth/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nicolas-besnard/devise_token_auth/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nicolas-besnard/devise_token_auth/git/refs{/sha}","trees_url":"https://api.github.com/repos/nicolas-besnard/devise_token_auth/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nicolas-besnard/devise_token_auth/statuses/{sha}","languages_url":"https://api.github.com/repos/nicolas-besnard/devise_token_auth/languages","stargazers_url":"https://api.github.com/repos/nicolas-besnard/devise_token_auth/stargazers","contributors_url":"https://api.github.com/repos/nicolas-besnard/devise_token_auth/contributors","subscribers_url":"https://api.github.com/repos/nicolas-besnard/devise_token_auth/subscribers","subscription_url":"https://api.github.com/repos/nicolas-besnard/devise_token_auth/subscription","commits_url":"https://api.github.com/repos/nicolas-besnard/devise_token_auth/commits{/sha}","git_commits_url":"https://api.github.com/repos/nicolas-besnard/devise_token_auth/git/commits{/sha}","comments_url":"https://api.github.com/repos/nicolas-besnard/devise_token_auth/comments{/number}","issue_comment_url":"https://api.github.com/repos/nicolas-besnard/devise_token_auth/issues/comments/{number}","contents_url":"https://api.github.com/repos/nicolas-besnard/devise_token_auth/contents/{+path}","compare_url":"https://api.github.com/repos/nicolas-besnard/devise_token_auth/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nicolas-besnard/devise_token_auth/merges","archive_url":"https://api.github.com/repos/nicolas-besnard/devise_token_auth/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nicolas-besnard/devise_token_auth/downloads","issues_url":"https://api.github.com/repos/nicolas-besnard/devise_token_auth/issues{/number}","pulls_url":"https://api.github.com/repos/nicolas-besnard/devise_token_auth/pulls{/number}","milestones_url":"https://api.github.com/repos/nicolas-besnard/devise_token_auth/milestones{/number}","notifications_url":"https://api.github.com/repos/nicolas-besnard/devise_token_auth/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nicolas-besnard/devise_token_auth/labels{/name}","releases_url":"https://api.github.com/repos/nicolas-besnard/devise_token_auth/releases{/id}","created_at":"2015-02-01T22:31:14Z","updated_at":"2015-02-01T22:31:14Z","pushed_at":"2015-02-02T21:05:57Z","git_url":"git://github.com/nicolas-besnard/devise_token_auth.git","ssh_url":"git@github.com:nicolas-besnard/devise_token_auth.git","clone_url":"https://github.com/nicolas-besnard/devise_token_auth.git","svn_url":"https://github.com/nicolas-besnard/devise_token_auth","homepage":null,"size":7372,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"lynndylanhurley:master","ref":"master","sha":"b40c23349f1970d317dc1b89c7f6fafaed34c4bc","user":{"login":"lynndylanhurley","id":468037,"avatar_url":"https://avatars.githubusercontent.com/u/468037?v=3","gravatar_id":"","url":"https://api.github.com/users/lynndylanhurley","html_url":"https://github.com/lynndylanhurley","followers_url":"https://api.github.com/users/lynndylanhurley/followers","following_url":"https://api.github.com/users/lynndylanhurley/following{/other_user}","gists_url":"https://api.github.com/users/lynndylanhurley/gists{/gist_id}","starred_url":"https://api.github.com/users/lynndylanhurley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lynndylanhurley/subscriptions","organizations_url":"https://api.github.com/users/lynndylanhurley/orgs","repos_url":"https://api.github.com/users/lynndylanhurley/repos","events_url":"https://api.github.com/users/lynndylanhurley/events{/privacy}","received_events_url":"https://api.github.com/users/lynndylanhurley/received_events","type":"User","site_admin":false},"repo":{"id":21333814,"name":"devise_token_auth","full_name":"lynndylanhurley/devise_token_auth","owner":{"login":"lynndylanhurley","id":468037,"avatar_url":"https://avatars.githubusercontent.com/u/468037?v=3","gravatar_id":"","url":"https://api.github.com/users/lynndylanhurley","html_url":"https://github.com/lynndylanhurley","followers_url":"https://api.github.com/users/lynndylanhurley/followers","following_url":"https://api.github.com/users/lynndylanhurley/following{/other_user}","gists_url":"https://api.github.com/users/lynndylanhurley/gists{/gist_id}","starred_url":"https://api.github.com/users/lynndylanhurley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lynndylanhurley/subscriptions","organizations_url":"https://api.github.com/users/lynndylanhurley/orgs","repos_url":"https://api.github.com/users/lynndylanhurley/repos","events_url":"https://api.github.com/users/lynndylanhurley/events{/privacy}","received_events_url":"https://api.github.com/users/lynndylanhurley/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lynndylanhurley/devise_token_auth","description":"Token based authentication for Rails JSON APIs. Designed to work with http://github.com/lynndylanhurley/ng-token-auth","fork":false,"url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth","forks_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/forks","keys_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/teams","hooks_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/hooks","issue_events_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/issues/events{/number}","events_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/events","assignees_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/assignees{/user}","branches_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/branches{/branch}","tags_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/tags","blobs_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/git/refs{/sha}","trees_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/statuses/{sha}","languages_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/languages","stargazers_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/stargazers","contributors_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/contributors","subscribers_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/subscribers","subscription_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/subscription","commits_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/commits{/sha}","git_commits_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/git/commits{/sha}","comments_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/comments{/number}","issue_comment_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/issues/comments/{number}","contents_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/contents/{+path}","compare_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/merges","archive_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/downloads","issues_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/issues{/number}","pulls_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/pulls{/number}","milestones_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/milestones{/number}","notifications_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/labels{/name}","releases_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/releases{/id}","created_at":"2014-06-29T22:43:58Z","updated_at":"2015-02-08T18:39:43Z","pushed_at":"2015-02-03T23:45:11Z","git_url":"git://github.com/lynndylanhurley/devise_token_auth.git","ssh_url":"git@github.com:lynndylanhurley/devise_token_auth.git","clone_url":"https://github.com/lynndylanhurley/devise_token_auth.git","svn_url":"https://github.com/lynndylanhurley/devise_token_auth","homepage":null,"size":8930,"stargazers_count":290,"watchers_count":290,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":60,"mirror_url":null,"open_issues_count":38,"forks":60,"open_issues":38,"watchers":290,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/pulls/128"},"html":{"href":"https://github.com/lynndylanhurley/devise_token_auth/pull/128"},"issue":{"href":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/issues/128"},"comments":{"href":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/issues/128/comments"},"review_comments":{"href":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/pulls/128/comments"},"review_comment":{"href":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/pulls/128/commits"},"statuses":{"href":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/statuses/65f4077da078f4a8515b1c91f610427c687c337d"}}}}