{"action":"created","comment":{"url":"https://api.github.com/repos/ory/hydra/pulls/comments/207741401","pull_request_review_id":143416212,"id":207741401,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNzc0MTQwMQ==","diff_hunk":"@@ -364,8 +364,35 @@ WHERE\n \t\treturn nil, sqlcon.HandleError(err)\n \t}\n \n+\treturn m.resolveHandledConsentRequests(a)\n+}\n+\n+func (m *SQLManager) FindPreviouslyGrantedConsentRequestsByUser(subject string, limit, offset int) ([]HandledConsentRequest, error) {\n+\tvar a []sqlHandledConsentRequest\n+\n+\tif err := m.db.Select(&a, m.db.Rebind(`SELECT h.* FROM\n+\thydra_oauth2_consent_request_handled as h\n+JOIN\n+\thydra_oauth2_consent_request as r ON (h.challenge = r.challenge)\n+WHERE\n+\t\tr.subject=? AND r.skip=FALSE\n+\tAND\n+\t\t(h.error='{}' AND h.remember=TRUE)\n+LIMIT ? OFFSET ?\n+`), subject, limit, offset); err != nil {\n+\t\tif err == sql.ErrNoRows {\n+\t\t\treturn nil, errors.WithStack(errNoPreviousConsentFound)","path":"consent/manager_sql.go","position":null,"original_position":21,"commit_id":"8225b23dccb1b3cf0eb03ff4b66a60d1c4f35b1d","original_commit_id":"6857f3621159895e82666bd5d1660d28d535ec4f","user":{"login":"kingjan1999","id":3208269,"node_id":"MDQ6VXNlcjMyMDgyNjk=","avatar_url":"https://avatars3.githubusercontent.com/u/3208269?v=4","gravatar_id":"","url":"https://api.github.com/users/kingjan1999","html_url":"https://github.com/kingjan1999","followers_url":"https://api.github.com/users/kingjan1999/followers","following_url":"https://api.github.com/users/kingjan1999/following{/other_user}","gists_url":"https://api.github.com/users/kingjan1999/gists{/gist_id}","starred_url":"https://api.github.com/users/kingjan1999/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kingjan1999/subscriptions","organizations_url":"https://api.github.com/users/kingjan1999/orgs","repos_url":"https://api.github.com/users/kingjan1999/repos","events_url":"https://api.github.com/users/kingjan1999/events{/privacy}","received_events_url":"https://api.github.com/users/kingjan1999/received_events","type":"User","site_admin":false},"body":"Thanks for your help and your feedback! I have gladly implemented your suggestions. \r\n\r\nHowever, I'm a little unsure at this point and need your help: Does `db.Select` really return an `ErrNoRows` error if no rows could be found? According to my understanding of SQLX / Go SQL documentation, this does not happen here. I have not been able to force such behaviour in my experiments.\r\n\r\nOr did I misunderstand and the manager should generate and return an `sqlcon.ErrNoRows`?","created_at":"2018-08-05T16:16:34Z","updated_at":"2018-08-05T16:16:34Z","html_url":"https://github.com/ory/hydra/pull/954#discussion_r207741401","pull_request_url":"https://api.github.com/repos/ory/hydra/pulls/954","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/ory/hydra/pulls/comments/207741401"},"html":{"href":"https://github.com/ory/hydra/pull/954#discussion_r207741401"},"pull_request":{"href":"https://api.github.com/repos/ory/hydra/pulls/954"}},"in_reply_to_id":207308817},"pull_request":{"url":"https://api.github.com/repos/ory/hydra/pulls/954","id":204644318,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA0NjQ0MzE4","html_url":"https://github.com/ory/hydra/pull/954","diff_url":"https://github.com/ory/hydra/pull/954.diff","patch_url":"https://github.com/ory/hydra/pull/954.patch","issue_url":"https://api.github.com/repos/ory/hydra/issues/954","number":954,"state":"open","locked":false,"title":"Add api endpoint to list all authorized clients by user","user":{"login":"kingjan1999","id":3208269,"node_id":"MDQ6VXNlcjMyMDgyNjk=","avatar_url":"https://avatars3.githubusercontent.com/u/3208269?v=4","gravatar_id":"","url":"https://api.github.com/users/kingjan1999","html_url":"https://github.com/kingjan1999","followers_url":"https://api.github.com/users/kingjan1999/followers","following_url":"https://api.github.com/users/kingjan1999/following{/other_user}","gists_url":"https://api.github.com/users/kingjan1999/gists{/gist_id}","starred_url":"https://api.github.com/users/kingjan1999/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kingjan1999/subscriptions","organizations_url":"https://api.github.com/users/kingjan1999/orgs","repos_url":"https://api.github.com/users/kingjan1999/repos","events_url":"https://api.github.com/users/kingjan1999/events{/privacy}","received_events_url":"https://api.github.com/users/kingjan1999/received_events","type":"User","site_admin":false},"body":"Resolves #953 \r\n\r\nAs already mentioned in #953, I'm rather beginner in Go, so I'm open to comments and suggestions for improvement and ask for leniency for possible mistakes.\r\n\r\nSigned-off-by: Jan Beckmann <king-jan1999@hotmail.de>\r\n\r\n<!--\r\nBefore creating your pull request, make sure that you have\r\n[signed the DOC](https://github.com/ory/hydra/blob/master/.github/CONTRIBUTING.md#developers-certificate-of-origin).\r\nYou can ammend your signature to the current commit using `git commit --amend -s`.\r\n\r\nPlease create PRs only for bugs, or features that have been discussed with the maintainers, either at the\r\n[ORY Community](https://community.ory.sh/) or join the [ORY Chat](https://www.ory.sh/chat).\r\n\r\nIf you think you found a security vulnerability, please refrain from posting it publicly on the forums, the chat, or GitHub\r\nand send us an email to [hi@ory.am](mailto:hi@ory.am) instead.\r\n-->\r\n","created_at":"2018-07-29T14:17:14Z","updated_at":"2018-08-05T16:16:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"524bbd86f57fd08853527a178027cce62e38fac6","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ory/hydra/pulls/954/commits","review_comments_url":"https://api.github.com/repos/ory/hydra/pulls/954/comments","review_comment_url":"https://api.github.com/repos/ory/hydra/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ory/hydra/issues/954/comments","statuses_url":"https://api.github.com/repos/ory/hydra/statuses/8225b23dccb1b3cf0eb03ff4b66a60d1c4f35b1d","head":{"label":"kingjan1999:list-consents","ref":"list-consents","sha":"8225b23dccb1b3cf0eb03ff4b66a60d1c4f35b1d","user":{"login":"kingjan1999","id":3208269,"node_id":"MDQ6VXNlcjMyMDgyNjk=","avatar_url":"https://avatars3.githubusercontent.com/u/3208269?v=4","gravatar_id":"","url":"https://api.github.com/users/kingjan1999","html_url":"https://github.com/kingjan1999","followers_url":"https://api.github.com/users/kingjan1999/followers","following_url":"https://api.github.com/users/kingjan1999/following{/other_user}","gists_url":"https://api.github.com/users/kingjan1999/gists{/gist_id}","starred_url":"https://api.github.com/users/kingjan1999/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kingjan1999/subscriptions","organizations_url":"https://api.github.com/users/kingjan1999/orgs","repos_url":"https://api.github.com/users/kingjan1999/repos","events_url":"https://api.github.com/users/kingjan1999/events{/privacy}","received_events_url":"https://api.github.com/users/kingjan1999/received_events","type":"User","site_admin":false},"repo":{"id":142340338,"node_id":"MDEwOlJlcG9zaXRvcnkxNDIzNDAzMzg=","name":"hydra","full_name":"kingjan1999/hydra","owner":{"login":"kingjan1999","id":3208269,"node_id":"MDQ6VXNlcjMyMDgyNjk=","avatar_url":"https://avatars3.githubusercontent.com/u/3208269?v=4","gravatar_id":"","url":"https://api.github.com/users/kingjan1999","html_url":"https://github.com/kingjan1999","followers_url":"https://api.github.com/users/kingjan1999/followers","following_url":"https://api.github.com/users/kingjan1999/following{/other_user}","gists_url":"https://api.github.com/users/kingjan1999/gists{/gist_id}","starred_url":"https://api.github.com/users/kingjan1999/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kingjan1999/subscriptions","organizations_url":"https://api.github.com/users/kingjan1999/orgs","repos_url":"https://api.github.com/users/kingjan1999/repos","events_url":"https://api.github.com/users/kingjan1999/events{/privacy}","received_events_url":"https://api.github.com/users/kingjan1999/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kingjan1999/hydra","description":"OpenID Connect certified OAuth2 Server - cloud native, security-first, open source API security for your infrastructure. Written in Go. SDKs for any language.","fork":true,"url":"https://api.github.com/repos/kingjan1999/hydra","forks_url":"https://api.github.com/repos/kingjan1999/hydra/forks","keys_url":"https://api.github.com/repos/kingjan1999/hydra/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kingjan1999/hydra/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kingjan1999/hydra/teams","hooks_url":"https://api.github.com/repos/kingjan1999/hydra/hooks","issue_events_url":"https://api.github.com/repos/kingjan1999/hydra/issues/events{/number}","events_url":"https://api.github.com/repos/kingjan1999/hydra/events","assignees_url":"https://api.github.com/repos/kingjan1999/hydra/assignees{/user}","branches_url":"https://api.github.com/repos/kingjan1999/hydra/branches{/branch}","tags_url":"https://api.github.com/repos/kingjan1999/hydra/tags","blobs_url":"https://api.github.com/repos/kingjan1999/hydra/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kingjan1999/hydra/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kingjan1999/hydra/git/refs{/sha}","trees_url":"https://api.github.com/repos/kingjan1999/hydra/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kingjan1999/hydra/statuses/{sha}","languages_url":"https://api.github.com/repos/kingjan1999/hydra/languages","stargazers_url":"https://api.github.com/repos/kingjan1999/hydra/stargazers","contributors_url":"https://api.github.com/repos/kingjan1999/hydra/contributors","subscribers_url":"https://api.github.com/repos/kingjan1999/hydra/subscribers","subscription_url":"https://api.github.com/repos/kingjan1999/hydra/subscription","commits_url":"https://api.github.com/repos/kingjan1999/hydra/commits{/sha}","git_commits_url":"https://api.github.com/repos/kingjan1999/hydra/git/commits{/sha}","comments_url":"https://api.github.com/repos/kingjan1999/hydra/comments{/number}","issue_comment_url":"https://api.github.com/repos/kingjan1999/hydra/issues/comments{/number}","contents_url":"https://api.github.com/repos/kingjan1999/hydra/contents/{+path}","compare_url":"https://api.github.com/repos/kingjan1999/hydra/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kingjan1999/hydra/merges","archive_url":"https://api.github.com/repos/kingjan1999/hydra/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kingjan1999/hydra/downloads","issues_url":"https://api.github.com/repos/kingjan1999/hydra/issues{/number}","pulls_url":"https://api.github.com/repos/kingjan1999/hydra/pulls{/number}","milestones_url":"https://api.github.com/repos/kingjan1999/hydra/milestones{/number}","notifications_url":"https://api.github.com/repos/kingjan1999/hydra/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kingjan1999/hydra/labels{/name}","releases_url":"https://api.github.com/repos/kingjan1999/hydra/releases{/id}","deployments_url":"https://api.github.com/repos/kingjan1999/hydra/deployments","created_at":"2018-07-25T18:45:31Z","updated_at":"2018-07-25T18:45:34Z","pushed_at":"2018-08-05T16:13:34Z","git_url":"git://github.com/kingjan1999/hydra.git","ssh_url":"git@github.com:kingjan1999/hydra.git","clone_url":"https://github.com/kingjan1999/hydra.git","svn_url":"https://github.com/kingjan1999/hydra","homepage":"https://www.ory.sh/?utm_source=github&utm_medium=banner&utm_campaign=hydra","size":33690,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ory:master","ref":"master","sha":"8632a2e9b50e67d298d24322bc28d86b69e70589","user":{"login":"ory","id":25334553,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1MzM0NTUz","avatar_url":"https://avatars1.githubusercontent.com/u/25334553?v=4","gravatar_id":"","url":"https://api.github.com/users/ory","html_url":"https://github.com/ory","followers_url":"https://api.github.com/users/ory/followers","following_url":"https://api.github.com/users/ory/following{/other_user}","gists_url":"https://api.github.com/users/ory/gists{/gist_id}","starred_url":"https://api.github.com/users/ory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ory/subscriptions","organizations_url":"https://api.github.com/users/ory/orgs","repos_url":"https://api.github.com/users/ory/repos","events_url":"https://api.github.com/users/ory/events{/privacy}","received_events_url":"https://api.github.com/users/ory/received_events","type":"Organization","site_admin":false},"repo":{"id":36071697,"node_id":"MDEwOlJlcG9zaXRvcnkzNjA3MTY5Nw==","name":"hydra","full_name":"ory/hydra","owner":{"login":"ory","id":25334553,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1MzM0NTUz","avatar_url":"https://avatars1.githubusercontent.com/u/25334553?v=4","gravatar_id":"","url":"https://api.github.com/users/ory","html_url":"https://github.com/ory","followers_url":"https://api.github.com/users/ory/followers","following_url":"https://api.github.com/users/ory/following{/other_user}","gists_url":"https://api.github.com/users/ory/gists{/gist_id}","starred_url":"https://api.github.com/users/ory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ory/subscriptions","organizations_url":"https://api.github.com/users/ory/orgs","repos_url":"https://api.github.com/users/ory/repos","events_url":"https://api.github.com/users/ory/events{/privacy}","received_events_url":"https://api.github.com/users/ory/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ory/hydra","description":"OpenID Connect certified OAuth2 Server - cloud native, security-first, open source API security for your infrastructure. Written in Go. SDKs for any language.","fork":false,"url":"https://api.github.com/repos/ory/hydra","forks_url":"https://api.github.com/repos/ory/hydra/forks","keys_url":"https://api.github.com/repos/ory/hydra/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ory/hydra/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ory/hydra/teams","hooks_url":"https://api.github.com/repos/ory/hydra/hooks","issue_events_url":"https://api.github.com/repos/ory/hydra/issues/events{/number}","events_url":"https://api.github.com/repos/ory/hydra/events","assignees_url":"https://api.github.com/repos/ory/hydra/assignees{/user}","branches_url":"https://api.github.com/repos/ory/hydra/branches{/branch}","tags_url":"https://api.github.com/repos/ory/hydra/tags","blobs_url":"https://api.github.com/repos/ory/hydra/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ory/hydra/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ory/hydra/git/refs{/sha}","trees_url":"https://api.github.com/repos/ory/hydra/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ory/hydra/statuses/{sha}","languages_url":"https://api.github.com/repos/ory/hydra/languages","stargazers_url":"https://api.github.com/repos/ory/hydra/stargazers","contributors_url":"https://api.github.com/repos/ory/hydra/contributors","subscribers_url":"https://api.github.com/repos/ory/hydra/subscribers","subscription_url":"https://api.github.com/repos/ory/hydra/subscription","commits_url":"https://api.github.com/repos/ory/hydra/commits{/sha}","git_commits_url":"https://api.github.com/repos/ory/hydra/git/commits{/sha}","comments_url":"https://api.github.com/repos/ory/hydra/comments{/number}","issue_comment_url":"https://api.github.com/repos/ory/hydra/issues/comments{/number}","contents_url":"https://api.github.com/repos/ory/hydra/contents/{+path}","compare_url":"https://api.github.com/repos/ory/hydra/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ory/hydra/merges","archive_url":"https://api.github.com/repos/ory/hydra/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ory/hydra/downloads","issues_url":"https://api.github.com/repos/ory/hydra/issues{/number}","pulls_url":"https://api.github.com/repos/ory/hydra/pulls{/number}","milestones_url":"https://api.github.com/repos/ory/hydra/milestones{/number}","notifications_url":"https://api.github.com/repos/ory/hydra/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ory/hydra/labels{/name}","releases_url":"https://api.github.com/repos/ory/hydra/releases{/id}","deployments_url":"https://api.github.com/repos/ory/hydra/deployments","created_at":"2015-05-22T12:42:08Z","updated_at":"2018-08-05T16:13:24Z","pushed_at":"2018-08-05T16:13:36Z","git_url":"git://github.com/ory/hydra.git","ssh_url":"git@github.com:ory/hydra.git","clone_url":"https://github.com/ory/hydra.git","svn_url":"https://github.com/ory/hydra","homepage":"https://www.ory.sh/?utm_source=github&utm_medium=banner&utm_campaign=hydra","size":33633,"stargazers_count":4532,"watchers_count":4532,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":354,"mirror_url":null,"archived":false,"open_issues_count":26,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":354,"open_issues":26,"watchers":4532,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ory/hydra/pulls/954"},"html":{"href":"https://github.com/ory/hydra/pull/954"},"issue":{"href":"https://api.github.com/repos/ory/hydra/issues/954"},"comments":{"href":"https://api.github.com/repos/ory/hydra/issues/954/comments"},"review_comments":{"href":"https://api.github.com/repos/ory/hydra/pulls/954/comments"},"review_comment":{"href":"https://api.github.com/repos/ory/hydra/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ory/hydra/pulls/954/commits"},"statuses":{"href":"https://api.github.com/repos/ory/hydra/statuses/8225b23dccb1b3cf0eb03ff4b66a60d1c4f35b1d"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"kingjan1999"}}