{"action":"created","comment":{"url":"https://api.github.com/repos/inveniosoftware/invenio-oauth2server/pulls/comments/78526882","id":78526882,"diff_hunk":"@@ -38,13 +38,17 @@\n \n \n @oauth2.usergetter\n-def get_user(username, password, *args, **kwargs):\n+def get_user(email, password, *args, **kwargs):\n     \"\"\"Get user for grant type password.\n \n     Needed for grant type 'password'. Note, grant type password is by default\n     disabled.\n+\n+    :param email: User email.\n+    :param password: Password.\n+    :returns: The user instance or ``None``.\n     \"\"\"\n-    user = User.query.filter_by(username=username).first()\n+    user = User.query.filter_by(email=email).first()","path":"invenio_oauth2server/provider.py","position":16,"original_position":16,"commit_id":"c5fa44c1885394e1dfeb6fe05fc60998d8af1d56","original_commit_id":"c5fa44c1885394e1dfeb6fe05fc60998d8af1d56","user":{"login":"hachreak","id":377047,"avatar_url":"https://avatars.githubusercontent.com/u/377047?v=3","gravatar_id":"","url":"https://api.github.com/users/hachreak","html_url":"https://github.com/hachreak","followers_url":"https://api.github.com/users/hachreak/followers","following_url":"https://api.github.com/users/hachreak/following{/other_user}","gists_url":"https://api.github.com/users/hachreak/gists{/gist_id}","starred_url":"https://api.github.com/users/hachreak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hachreak/subscriptions","organizations_url":"https://api.github.com/users/hachreak/orgs","repos_url":"https://api.github.com/users/hachreak/repos","events_url":"https://api.github.com/users/hachreak/events{/privacy}","received_events_url":"https://api.github.com/users/hachreak/received_events","type":"User","site_admin":false},"body":"maybe it's better to use `datastore` and `flask-security` `verify_password`?\r\n```python\r\nfrom flask_security.utils import verify_password\r\ndatastore = LocalProxy(lambda: current_app.extensions['security'].datastore)\r\nuser = datastore.find_user(email=email)\r\nif user and verify_password(password, user.password):\r\n    return user\r\n```","created_at":"2016-09-13T09:39:08Z","updated_at":"2016-09-13T09:39:08Z","html_url":"https://github.com/inveniosoftware/invenio-oauth2server/pull/74#discussion_r78526882","pull_request_url":"https://api.github.com/repos/inveniosoftware/invenio-oauth2server/pulls/74","_links":{"self":{"href":"https://api.github.com/repos/inveniosoftware/invenio-oauth2server/pulls/comments/78526882"},"html":{"href":"https://github.com/inveniosoftware/invenio-oauth2server/pull/74#discussion_r78526882"},"pull_request":{"href":"https://api.github.com/repos/inveniosoftware/invenio-oauth2server/pulls/74"}}},"pull_request":{"url":"https://api.github.com/repos/inveniosoftware/invenio-oauth2server/pulls/74","id":82215364,"html_url":"https://github.com/inveniosoftware/invenio-oauth2server/pull/74","diff_url":"https://github.com/inveniosoftware/invenio-oauth2server/pull/74.diff","patch_url":"https://github.com/inveniosoftware/invenio-oauth2server/pull/74.patch","issue_url":"https://api.github.com/repos/inveniosoftware/invenio-oauth2server/issues/74","number":74,"state":"open","locked":false,"title":"docs: addition of param and result sections","user":{"login":"hachreak","id":377047,"avatar_url":"https://avatars.githubusercontent.com/u/377047?v=3","gravatar_id":"","url":"https://api.github.com/users/hachreak","html_url":"https://github.com/hachreak","followers_url":"https://api.github.com/users/hachreak/followers","following_url":"https://api.github.com/users/hachreak/following{/other_user}","gists_url":"https://api.github.com/users/hachreak/gists{/gist_id}","starred_url":"https://api.github.com/users/hachreak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hachreak/subscriptions","organizations_url":"https://api.github.com/users/hachreak/orgs","repos_url":"https://api.github.com/users/hachreak/repos","events_url":"https://api.github.com/users/hachreak/events{/privacy}","received_events_url":"https://api.github.com/users/hachreak/received_events","type":"User","site_admin":false},"body":"* Improves documentation. (addresses #57)\r\n\r\nSigned-off-by: Leonardo Rossi <leonardo.r@cern.ch>","created_at":"2016-08-22T15:48:46Z","updated_at":"2016-09-13T09:39:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cfa308a96c8ce1ee67f34d27f1fcacd9e6348351","assignee":{"login":"jirikuncar","id":189798,"avatar_url":"https://avatars.githubusercontent.com/u/189798?v=3","gravatar_id":"","url":"https://api.github.com/users/jirikuncar","html_url":"https://github.com/jirikuncar","followers_url":"https://api.github.com/users/jirikuncar/followers","following_url":"https://api.github.com/users/jirikuncar/following{/other_user}","gists_url":"https://api.github.com/users/jirikuncar/gists{/gist_id}","starred_url":"https://api.github.com/users/jirikuncar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jirikuncar/subscriptions","organizations_url":"https://api.github.com/users/jirikuncar/orgs","repos_url":"https://api.github.com/users/jirikuncar/repos","events_url":"https://api.github.com/users/jirikuncar/events{/privacy}","received_events_url":"https://api.github.com/users/jirikuncar/received_events","type":"User","site_admin":false},"assignees":[{"login":"jirikuncar","id":189798,"avatar_url":"https://avatars.githubusercontent.com/u/189798?v=3","gravatar_id":"","url":"https://api.github.com/users/jirikuncar","html_url":"https://github.com/jirikuncar","followers_url":"https://api.github.com/users/jirikuncar/followers","following_url":"https://api.github.com/users/jirikuncar/following{/other_user}","gists_url":"https://api.github.com/users/jirikuncar/gists{/gist_id}","starred_url":"https://api.github.com/users/jirikuncar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jirikuncar/subscriptions","organizations_url":"https://api.github.com/users/jirikuncar/orgs","repos_url":"https://api.github.com/users/jirikuncar/repos","events_url":"https://api.github.com/users/jirikuncar/events{/privacy}","received_events_url":"https://api.github.com/users/jirikuncar/received_events","type":"User","site_admin":false},{"login":"hachreak","id":377047,"avatar_url":"https://avatars.githubusercontent.com/u/377047?v=3","gravatar_id":"","url":"https://api.github.com/users/hachreak","html_url":"https://github.com/hachreak","followers_url":"https://api.github.com/users/hachreak/followers","following_url":"https://api.github.com/users/hachreak/following{/other_user}","gists_url":"https://api.github.com/users/hachreak/gists{/gist_id}","starred_url":"https://api.github.com/users/hachreak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hachreak/subscriptions","organizations_url":"https://api.github.com/users/hachreak/orgs","repos_url":"https://api.github.com/users/hachreak/repos","events_url":"https://api.github.com/users/hachreak/events{/privacy}","received_events_url":"https://api.github.com/users/hachreak/received_events","type":"User","site_admin":false},{"login":"tiborsimko","id":517546,"avatar_url":"https://avatars.githubusercontent.com/u/517546?v=3","gravatar_id":"","url":"https://api.github.com/users/tiborsimko","html_url":"https://github.com/tiborsimko","followers_url":"https://api.github.com/users/tiborsimko/followers","following_url":"https://api.github.com/users/tiborsimko/following{/other_user}","gists_url":"https://api.github.com/users/tiborsimko/gists{/gist_id}","starred_url":"https://api.github.com/users/tiborsimko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tiborsimko/subscriptions","organizations_url":"https://api.github.com/users/tiborsimko/orgs","repos_url":"https://api.github.com/users/tiborsimko/repos","events_url":"https://api.github.com/users/tiborsimko/events{/privacy}","received_events_url":"https://api.github.com/users/tiborsimko/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/inveniosoftware/invenio-oauth2server/milestones/7","html_url":"https://github.com/inveniosoftware/invenio-oauth2server/milestones/I3B-API-Docs","labels_url":"https://api.github.com/repos/inveniosoftware/invenio-oauth2server/milestones/7/labels","id":1889014,"number":7,"title":"I3B-API-Docs","description":"","creator":{"login":"tiborsimko","id":517546,"avatar_url":"https://avatars.githubusercontent.com/u/517546?v=3","gravatar_id":"","url":"https://api.github.com/users/tiborsimko","html_url":"https://github.com/tiborsimko","followers_url":"https://api.github.com/users/tiborsimko/followers","following_url":"https://api.github.com/users/tiborsimko/following{/other_user}","gists_url":"https://api.github.com/users/tiborsimko/gists{/gist_id}","starred_url":"https://api.github.com/users/tiborsimko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tiborsimko/subscriptions","organizations_url":"https://api.github.com/users/tiborsimko/orgs","repos_url":"https://api.github.com/users/tiborsimko/repos","events_url":"https://api.github.com/users/tiborsimko/events{/privacy}","received_events_url":"https://api.github.com/users/tiborsimko/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":9,"state":"open","created_at":"2016-07-18T09:41:10Z","updated_at":"2016-09-01T15:18:49Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/inveniosoftware/invenio-oauth2server/pulls/74/commits","review_comments_url":"https://api.github.com/repos/inveniosoftware/invenio-oauth2server/pulls/74/comments","review_comment_url":"https://api.github.com/repos/inveniosoftware/invenio-oauth2server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/inveniosoftware/invenio-oauth2server/issues/74/comments","statuses_url":"https://api.github.com/repos/inveniosoftware/invenio-oauth2server/statuses/c5fa44c1885394e1dfeb6fe05fc60998d8af1d56","head":{"label":"hachreak:57_docs","ref":"57_docs","sha":"c5fa44c1885394e1dfeb6fe05fc60998d8af1d56","user":{"login":"hachreak","id":377047,"avatar_url":"https://avatars.githubusercontent.com/u/377047?v=3","gravatar_id":"","url":"https://api.github.com/users/hachreak","html_url":"https://github.com/hachreak","followers_url":"https://api.github.com/users/hachreak/followers","following_url":"https://api.github.com/users/hachreak/following{/other_user}","gists_url":"https://api.github.com/users/hachreak/gists{/gist_id}","starred_url":"https://api.github.com/users/hachreak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hachreak/subscriptions","organizations_url":"https://api.github.com/users/hachreak/orgs","repos_url":"https://api.github.com/users/hachreak/repos","events_url":"https://api.github.com/users/hachreak/events{/privacy}","received_events_url":"https://api.github.com/users/hachreak/received_events","type":"User","site_admin":false},"repo":{"id":43068820,"name":"invenio-oauth2server","full_name":"hachreak/invenio-oauth2server","owner":{"login":"hachreak","id":377047,"avatar_url":"https://avatars.githubusercontent.com/u/377047?v=3","gravatar_id":"","url":"https://api.github.com/users/hachreak","html_url":"https://github.com/hachreak","followers_url":"https://api.github.com/users/hachreak/followers","following_url":"https://api.github.com/users/hachreak/following{/other_user}","gists_url":"https://api.github.com/users/hachreak/gists{/gist_id}","starred_url":"https://api.github.com/users/hachreak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hachreak/subscriptions","organizations_url":"https://api.github.com/users/hachreak/orgs","repos_url":"https://api.github.com/users/hachreak/repos","events_url":"https://api.github.com/users/hachreak/events{/privacy}","received_events_url":"https://api.github.com/users/hachreak/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hachreak/invenio-oauth2server","description":"Invenio modules that implements OAuth 2 server.","fork":true,"url":"https://api.github.com/repos/hachreak/invenio-oauth2server","forks_url":"https://api.github.com/repos/hachreak/invenio-oauth2server/forks","keys_url":"https://api.github.com/repos/hachreak/invenio-oauth2server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hachreak/invenio-oauth2server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hachreak/invenio-oauth2server/teams","hooks_url":"https://api.github.com/repos/hachreak/invenio-oauth2server/hooks","issue_events_url":"https://api.github.com/repos/hachreak/invenio-oauth2server/issues/events{/number}","events_url":"https://api.github.com/repos/hachreak/invenio-oauth2server/events","assignees_url":"https://api.github.com/repos/hachreak/invenio-oauth2server/assignees{/user}","branches_url":"https://api.github.com/repos/hachreak/invenio-oauth2server/branches{/branch}","tags_url":"https://api.github.com/repos/hachreak/invenio-oauth2server/tags","blobs_url":"https://api.github.com/repos/hachreak/invenio-oauth2server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hachreak/invenio-oauth2server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hachreak/invenio-oauth2server/git/refs{/sha}","trees_url":"https://api.github.com/repos/hachreak/invenio-oauth2server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hachreak/invenio-oauth2server/statuses/{sha}","languages_url":"https://api.github.com/repos/hachreak/invenio-oauth2server/languages","stargazers_url":"https://api.github.com/repos/hachreak/invenio-oauth2server/stargazers","contributors_url":"https://api.github.com/repos/hachreak/invenio-oauth2server/contributors","subscribers_url":"https://api.github.com/repos/hachreak/invenio-oauth2server/subscribers","subscription_url":"https://api.github.com/repos/hachreak/invenio-oauth2server/subscription","commits_url":"https://api.github.com/repos/hachreak/invenio-oauth2server/commits{/sha}","git_commits_url":"https://api.github.com/repos/hachreak/invenio-oauth2server/git/commits{/sha}","comments_url":"https://api.github.com/repos/hachreak/invenio-oauth2server/comments{/number}","issue_comment_url":"https://api.github.com/repos/hachreak/invenio-oauth2server/issues/comments{/number}","contents_url":"https://api.github.com/repos/hachreak/invenio-oauth2server/contents/{+path}","compare_url":"https://api.github.com/repos/hachreak/invenio-oauth2server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hachreak/invenio-oauth2server/merges","archive_url":"https://api.github.com/repos/hachreak/invenio-oauth2server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hachreak/invenio-oauth2server/downloads","issues_url":"https://api.github.com/repos/hachreak/invenio-oauth2server/issues{/number}","pulls_url":"https://api.github.com/repos/hachreak/invenio-oauth2server/pulls{/number}","milestones_url":"https://api.github.com/repos/hachreak/invenio-oauth2server/milestones{/number}","notifications_url":"https://api.github.com/repos/hachreak/invenio-oauth2server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hachreak/invenio-oauth2server/labels{/name}","releases_url":"https://api.github.com/repos/hachreak/invenio-oauth2server/releases{/id}","deployments_url":"https://api.github.com/repos/hachreak/invenio-oauth2server/deployments","created_at":"2015-09-24T13:34:00Z","updated_at":"2016-03-14T16:21:46Z","pushed_at":"2016-09-13T08:37:20Z","git_url":"git://github.com/hachreak/invenio-oauth2server.git","ssh_url":"git@github.com:hachreak/invenio-oauth2server.git","clone_url":"https://github.com/hachreak/invenio-oauth2server.git","svn_url":"https://github.com/hachreak/invenio-oauth2server","homepage":"","size":315,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"inveniosoftware:master","ref":"master","sha":"1efd6a2349e7029c3edc6099ee71c3536d5c7422","user":{"login":"inveniosoftware","id":1157480,"avatar_url":"https://avatars.githubusercontent.com/u/1157480?v=3","gravatar_id":"","url":"https://api.github.com/users/inveniosoftware","html_url":"https://github.com/inveniosoftware","followers_url":"https://api.github.com/users/inveniosoftware/followers","following_url":"https://api.github.com/users/inveniosoftware/following{/other_user}","gists_url":"https://api.github.com/users/inveniosoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/inveniosoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inveniosoftware/subscriptions","organizations_url":"https://api.github.com/users/inveniosoftware/orgs","repos_url":"https://api.github.com/users/inveniosoftware/repos","events_url":"https://api.github.com/users/inveniosoftware/events{/privacy}","received_events_url":"https://api.github.com/users/inveniosoftware/received_events","type":"Organization","site_admin":false},"repo":{"id":40135191,"name":"invenio-oauth2server","full_name":"inveniosoftware/invenio-oauth2server","owner":{"login":"inveniosoftware","id":1157480,"avatar_url":"https://avatars.githubusercontent.com/u/1157480?v=3","gravatar_id":"","url":"https://api.github.com/users/inveniosoftware","html_url":"https://github.com/inveniosoftware","followers_url":"https://api.github.com/users/inveniosoftware/followers","following_url":"https://api.github.com/users/inveniosoftware/following{/other_user}","gists_url":"https://api.github.com/users/inveniosoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/inveniosoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inveniosoftware/subscriptions","organizations_url":"https://api.github.com/users/inveniosoftware/orgs","repos_url":"https://api.github.com/users/inveniosoftware/repos","events_url":"https://api.github.com/users/inveniosoftware/events{/privacy}","received_events_url":"https://api.github.com/users/inveniosoftware/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/inveniosoftware/invenio-oauth2server","description":"Invenio modules that implements OAuth 2 server.","fork":false,"url":"https://api.github.com/repos/inveniosoftware/invenio-oauth2server","forks_url":"https://api.github.com/repos/inveniosoftware/invenio-oauth2server/forks","keys_url":"https://api.github.com/repos/inveniosoftware/invenio-oauth2server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/inveniosoftware/invenio-oauth2server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/inveniosoftware/invenio-oauth2server/teams","hooks_url":"https://api.github.com/repos/inveniosoftware/invenio-oauth2server/hooks","issue_events_url":"https://api.github.com/repos/inveniosoftware/invenio-oauth2server/issues/events{/number}","events_url":"https://api.github.com/repos/inveniosoftware/invenio-oauth2server/events","assignees_url":"https://api.github.com/repos/inveniosoftware/invenio-oauth2server/assignees{/user}","branches_url":"https://api.github.com/repos/inveniosoftware/invenio-oauth2server/branches{/branch}","tags_url":"https://api.github.com/repos/inveniosoftware/invenio-oauth2server/tags","blobs_url":"https://api.github.com/repos/inveniosoftware/invenio-oauth2server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/inveniosoftware/invenio-oauth2server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/inveniosoftware/invenio-oauth2server/git/refs{/sha}","trees_url":"https://api.github.com/repos/inveniosoftware/invenio-oauth2server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/inveniosoftware/invenio-oauth2server/statuses/{sha}","languages_url":"https://api.github.com/repos/inveniosoftware/invenio-oauth2server/languages","stargazers_url":"https://api.github.com/repos/inveniosoftware/invenio-oauth2server/stargazers","contributors_url":"https://api.github.com/repos/inveniosoftware/invenio-oauth2server/contributors","subscribers_url":"https://api.github.com/repos/inveniosoftware/invenio-oauth2server/subscribers","subscription_url":"https://api.github.com/repos/inveniosoftware/invenio-oauth2server/subscription","commits_url":"https://api.github.com/repos/inveniosoftware/invenio-oauth2server/commits{/sha}","git_commits_url":"https://api.github.com/repos/inveniosoftware/invenio-oauth2server/git/commits{/sha}","comments_url":"https://api.github.com/repos/inveniosoftware/invenio-oauth2server/comments{/number}","issue_comment_url":"https://api.github.com/repos/inveniosoftware/invenio-oauth2server/issues/comments{/number}","contents_url":"https://api.github.com/repos/inveniosoftware/invenio-oauth2server/contents/{+path}","compare_url":"https://api.github.com/repos/inveniosoftware/invenio-oauth2server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/inveniosoftware/invenio-oauth2server/merges","archive_url":"https://api.github.com/repos/inveniosoftware/invenio-oauth2server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/inveniosoftware/invenio-oauth2server/downloads","issues_url":"https://api.github.com/repos/inveniosoftware/invenio-oauth2server/issues{/number}","pulls_url":"https://api.github.com/repos/inveniosoftware/invenio-oauth2server/pulls{/number}","milestones_url":"https://api.github.com/repos/inveniosoftware/invenio-oauth2server/milestones{/number}","notifications_url":"https://api.github.com/repos/inveniosoftware/invenio-oauth2server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/inveniosoftware/invenio-oauth2server/labels{/name}","releases_url":"https://api.github.com/repos/inveniosoftware/invenio-oauth2server/releases{/id}","deployments_url":"https://api.github.com/repos/inveniosoftware/invenio-oauth2server/deployments","created_at":"2015-08-03T16:21:40Z","updated_at":"2016-05-11T12:45:22Z","pushed_at":"2016-09-13T08:37:20Z","git_url":"git://github.com/inveniosoftware/invenio-oauth2server.git","ssh_url":"git@github.com:inveniosoftware/invenio-oauth2server.git","clone_url":"https://github.com/inveniosoftware/invenio-oauth2server.git","svn_url":"https://github.com/inveniosoftware/invenio-oauth2server","homepage":"","size":348,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"open_issues_count":7,"forks":14,"open_issues":7,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/inveniosoftware/invenio-oauth2server/pulls/74"},"html":{"href":"https://github.com/inveniosoftware/invenio-oauth2server/pull/74"},"issue":{"href":"https://api.github.com/repos/inveniosoftware/invenio-oauth2server/issues/74"},"comments":{"href":"https://api.github.com/repos/inveniosoftware/invenio-oauth2server/issues/74/comments"},"review_comments":{"href":"https://api.github.com/repos/inveniosoftware/invenio-oauth2server/pulls/74/comments"},"review_comment":{"href":"https://api.github.com/repos/inveniosoftware/invenio-oauth2server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/inveniosoftware/invenio-oauth2server/pulls/74/commits"},"statuses":{"href":"https://api.github.com/repos/inveniosoftware/invenio-oauth2server/statuses/c5fa44c1885394e1dfeb6fe05fc60998d8af1d56"}}}}
{"actor":{"display_login":"hachreak"}}