{"action":"created","comment":{"url":"https://api.github.com/repos/dherault/serverless-offline/pulls/comments/211638780","pull_request_review_id":148102300,"id":211638780,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMTYzODc4MA==","diff_hunk":"@@ -480,7 +480,14 @@ class Offline {\n                   return errorResponse(reply);\n                 }\n               }\n-              else {\n+              else if (request.auth && request.auth.credentials && 'usageIdentifierKey' in request.auth.credentials) {\n+                const usageIdentifierKey = request.auth.credentials['usageIdentifierKey'];","path":"src/index.js","position":6,"original_position":6,"commit_id":"bba043d0d1761dab17fd55bab2432283ea31f0af","original_commit_id":"bba043d0d1761dab17fd55bab2432283ea31f0af","user":{"login":"dherault","id":4154003,"node_id":"MDQ6VXNlcjQxNTQwMDM=","avatar_url":"https://avatars2.githubusercontent.com/u/4154003?v=4","gravatar_id":"","url":"https://api.github.com/users/dherault","html_url":"https://github.com/dherault","followers_url":"https://api.github.com/users/dherault/followers","following_url":"https://api.github.com/users/dherault/following{/other_user}","gists_url":"https://api.github.com/users/dherault/gists{/gist_id}","starred_url":"https://api.github.com/users/dherault/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dherault/subscriptions","organizations_url":"https://api.github.com/users/dherault/orgs","repos_url":"https://api.github.com/users/dherault/repos","events_url":"https://api.github.com/users/dherault/events{/privacy}","received_events_url":"https://api.github.com/users/dherault/received_events","type":"User","site_admin":false},"body":"I did not merge because of the lint error here: `request.auth.credentials['usageIdentifierKey']` should be `request.auth.credentials.usageIdentifierKey`","created_at":"2018-08-21T14:56:41Z","updated_at":"2018-08-21T14:56:41Z","html_url":"https://github.com/dherault/serverless-offline/pull/441#discussion_r211638780","pull_request_url":"https://api.github.com/repos/dherault/serverless-offline/pulls/441","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/dherault/serverless-offline/pulls/comments/211638780"},"html":{"href":"https://github.com/dherault/serverless-offline/pull/441#discussion_r211638780"},"pull_request":{"href":"https://api.github.com/repos/dherault/serverless-offline/pulls/441"}}},"pull_request":{"url":"https://api.github.com/repos/dherault/serverless-offline/pulls/441","id":198470372,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk4NDcwMzcy","html_url":"https://github.com/dherault/serverless-offline/pull/441","diff_url":"https://github.com/dherault/serverless-offline/pull/441.diff","patch_url":"https://github.com/dherault/serverless-offline/pull/441.patch","issue_url":"https://api.github.com/repos/dherault/serverless-offline/issues/441","number":441,"state":"open","locked":false,"title":"Check if usageIdentifierKey returned by an authorizer is a valid API key","user":{"login":"OrKoN","id":399150,"node_id":"MDQ6VXNlcjM5OTE1MA==","avatar_url":"https://avatars3.githubusercontent.com/u/399150?v=4","gravatar_id":"","url":"https://api.github.com/users/OrKoN","html_url":"https://github.com/OrKoN","followers_url":"https://api.github.com/users/OrKoN/followers","following_url":"https://api.github.com/users/OrKoN/following{/other_user}","gists_url":"https://api.github.com/users/OrKoN/gists{/gist_id}","starred_url":"https://api.github.com/users/OrKoN/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OrKoN/subscriptions","organizations_url":"https://api.github.com/users/OrKoN/orgs","repos_url":"https://api.github.com/users/OrKoN/repos","events_url":"https://api.github.com/users/OrKoN/events{/privacy}","received_events_url":"https://api.github.com/users/OrKoN/received_events","type":"User","site_admin":false},"body":"AWS API Gateway allows providing an API key from authorizer functions: https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-usage-plans.html#api-gateway-create-usage-plans\r\n\r\nThis fixes the bug that API keys returned from authorizer functions were not considered valid by serverless-offline.\r\n\r\n","created_at":"2018-06-30T10:21:26Z","updated_at":"2018-08-21T14:56:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bc3df0be2349f2e3539de4f9db3642906c11edc8","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/dherault/serverless-offline/pulls/441/commits","review_comments_url":"https://api.github.com/repos/dherault/serverless-offline/pulls/441/comments","review_comment_url":"https://api.github.com/repos/dherault/serverless-offline/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dherault/serverless-offline/issues/441/comments","statuses_url":"https://api.github.com/repos/dherault/serverless-offline/statuses/bba043d0d1761dab17fd55bab2432283ea31f0af","head":{"label":"OrKoN:fix-request-authorizer","ref":"fix-request-authorizer","sha":"bba043d0d1761dab17fd55bab2432283ea31f0af","user":{"login":"OrKoN","id":399150,"node_id":"MDQ6VXNlcjM5OTE1MA==","avatar_url":"https://avatars3.githubusercontent.com/u/399150?v=4","gravatar_id":"","url":"https://api.github.com/users/OrKoN","html_url":"https://github.com/OrKoN","followers_url":"https://api.github.com/users/OrKoN/followers","following_url":"https://api.github.com/users/OrKoN/following{/other_user}","gists_url":"https://api.github.com/users/OrKoN/gists{/gist_id}","starred_url":"https://api.github.com/users/OrKoN/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OrKoN/subscriptions","organizations_url":"https://api.github.com/users/OrKoN/orgs","repos_url":"https://api.github.com/users/OrKoN/repos","events_url":"https://api.github.com/users/OrKoN/events{/privacy}","received_events_url":"https://api.github.com/users/OrKoN/received_events","type":"User","site_admin":false},"repo":{"id":125749788,"node_id":"MDEwOlJlcG9zaXRvcnkxMjU3NDk3ODg=","name":"serverless-offline","full_name":"OrKoN/serverless-offline","owner":{"login":"OrKoN","id":399150,"node_id":"MDQ6VXNlcjM5OTE1MA==","avatar_url":"https://avatars3.githubusercontent.com/u/399150?v=4","gravatar_id":"","url":"https://api.github.com/users/OrKoN","html_url":"https://github.com/OrKoN","followers_url":"https://api.github.com/users/OrKoN/followers","following_url":"https://api.github.com/users/OrKoN/following{/other_user}","gists_url":"https://api.github.com/users/OrKoN/gists{/gist_id}","starred_url":"https://api.github.com/users/OrKoN/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OrKoN/subscriptions","organizations_url":"https://api.github.com/users/OrKoN/orgs","repos_url":"https://api.github.com/users/OrKoN/repos","events_url":"https://api.github.com/users/OrKoN/events{/privacy}","received_events_url":"https://api.github.com/users/OrKoN/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/OrKoN/serverless-offline","description":"Emulate AWS λ and API Gateway locally when developing your Serverless project","fork":true,"url":"https://api.github.com/repos/OrKoN/serverless-offline","forks_url":"https://api.github.com/repos/OrKoN/serverless-offline/forks","keys_url":"https://api.github.com/repos/OrKoN/serverless-offline/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OrKoN/serverless-offline/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OrKoN/serverless-offline/teams","hooks_url":"https://api.github.com/repos/OrKoN/serverless-offline/hooks","issue_events_url":"https://api.github.com/repos/OrKoN/serverless-offline/issues/events{/number}","events_url":"https://api.github.com/repos/OrKoN/serverless-offline/events","assignees_url":"https://api.github.com/repos/OrKoN/serverless-offline/assignees{/user}","branches_url":"https://api.github.com/repos/OrKoN/serverless-offline/branches{/branch}","tags_url":"https://api.github.com/repos/OrKoN/serverless-offline/tags","blobs_url":"https://api.github.com/repos/OrKoN/serverless-offline/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OrKoN/serverless-offline/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OrKoN/serverless-offline/git/refs{/sha}","trees_url":"https://api.github.com/repos/OrKoN/serverless-offline/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OrKoN/serverless-offline/statuses/{sha}","languages_url":"https://api.github.com/repos/OrKoN/serverless-offline/languages","stargazers_url":"https://api.github.com/repos/OrKoN/serverless-offline/stargazers","contributors_url":"https://api.github.com/repos/OrKoN/serverless-offline/contributors","subscribers_url":"https://api.github.com/repos/OrKoN/serverless-offline/subscribers","subscription_url":"https://api.github.com/repos/OrKoN/serverless-offline/subscription","commits_url":"https://api.github.com/repos/OrKoN/serverless-offline/commits{/sha}","git_commits_url":"https://api.github.com/repos/OrKoN/serverless-offline/git/commits{/sha}","comments_url":"https://api.github.com/repos/OrKoN/serverless-offline/comments{/number}","issue_comment_url":"https://api.github.com/repos/OrKoN/serverless-offline/issues/comments{/number}","contents_url":"https://api.github.com/repos/OrKoN/serverless-offline/contents/{+path}","compare_url":"https://api.github.com/repos/OrKoN/serverless-offline/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OrKoN/serverless-offline/merges","archive_url":"https://api.github.com/repos/OrKoN/serverless-offline/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OrKoN/serverless-offline/downloads","issues_url":"https://api.github.com/repos/OrKoN/serverless-offline/issues{/number}","pulls_url":"https://api.github.com/repos/OrKoN/serverless-offline/pulls{/number}","milestones_url":"https://api.github.com/repos/OrKoN/serverless-offline/milestones{/number}","notifications_url":"https://api.github.com/repos/OrKoN/serverless-offline/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OrKoN/serverless-offline/labels{/name}","releases_url":"https://api.github.com/repos/OrKoN/serverless-offline/releases{/id}","deployments_url":"https://api.github.com/repos/OrKoN/serverless-offline/deployments","created_at":"2018-03-18T17:25:20Z","updated_at":"2018-06-30T10:05:22Z","pushed_at":"2018-06-30T10:19:18Z","git_url":"git://github.com/OrKoN/serverless-offline.git","ssh_url":"git@github.com:OrKoN/serverless-offline.git","clone_url":"https://github.com/OrKoN/serverless-offline.git","svn_url":"https://github.com/OrKoN/serverless-offline","homepage":"","size":1111,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dherault:master","ref":"master","sha":"b6996d5fe4254153932ac6807fe7400a0a62482c","user":{"login":"dherault","id":4154003,"node_id":"MDQ6VXNlcjQxNTQwMDM=","avatar_url":"https://avatars2.githubusercontent.com/u/4154003?v=4","gravatar_id":"","url":"https://api.github.com/users/dherault","html_url":"https://github.com/dherault","followers_url":"https://api.github.com/users/dherault/followers","following_url":"https://api.github.com/users/dherault/following{/other_user}","gists_url":"https://api.github.com/users/dherault/gists{/gist_id}","starred_url":"https://api.github.com/users/dherault/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dherault/subscriptions","organizations_url":"https://api.github.com/users/dherault/orgs","repos_url":"https://api.github.com/users/dherault/repos","events_url":"https://api.github.com/users/dherault/events{/privacy}","received_events_url":"https://api.github.com/users/dherault/received_events","type":"User","site_admin":false},"repo":{"id":51905436,"node_id":"MDEwOlJlcG9zaXRvcnk1MTkwNTQzNg==","name":"serverless-offline","full_name":"dherault/serverless-offline","owner":{"login":"dherault","id":4154003,"node_id":"MDQ6VXNlcjQxNTQwMDM=","avatar_url":"https://avatars2.githubusercontent.com/u/4154003?v=4","gravatar_id":"","url":"https://api.github.com/users/dherault","html_url":"https://github.com/dherault","followers_url":"https://api.github.com/users/dherault/followers","following_url":"https://api.github.com/users/dherault/following{/other_user}","gists_url":"https://api.github.com/users/dherault/gists{/gist_id}","starred_url":"https://api.github.com/users/dherault/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dherault/subscriptions","organizations_url":"https://api.github.com/users/dherault/orgs","repos_url":"https://api.github.com/users/dherault/repos","events_url":"https://api.github.com/users/dherault/events{/privacy}","received_events_url":"https://api.github.com/users/dherault/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dherault/serverless-offline","description":"Emulate AWS λ and API Gateway locally when developing your Serverless project","fork":false,"url":"https://api.github.com/repos/dherault/serverless-offline","forks_url":"https://api.github.com/repos/dherault/serverless-offline/forks","keys_url":"https://api.github.com/repos/dherault/serverless-offline/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dherault/serverless-offline/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dherault/serverless-offline/teams","hooks_url":"https://api.github.com/repos/dherault/serverless-offline/hooks","issue_events_url":"https://api.github.com/repos/dherault/serverless-offline/issues/events{/number}","events_url":"https://api.github.com/repos/dherault/serverless-offline/events","assignees_url":"https://api.github.com/repos/dherault/serverless-offline/assignees{/user}","branches_url":"https://api.github.com/repos/dherault/serverless-offline/branches{/branch}","tags_url":"https://api.github.com/repos/dherault/serverless-offline/tags","blobs_url":"https://api.github.com/repos/dherault/serverless-offline/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dherault/serverless-offline/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dherault/serverless-offline/git/refs{/sha}","trees_url":"https://api.github.com/repos/dherault/serverless-offline/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dherault/serverless-offline/statuses/{sha}","languages_url":"https://api.github.com/repos/dherault/serverless-offline/languages","stargazers_url":"https://api.github.com/repos/dherault/serverless-offline/stargazers","contributors_url":"https://api.github.com/repos/dherault/serverless-offline/contributors","subscribers_url":"https://api.github.com/repos/dherault/serverless-offline/subscribers","subscription_url":"https://api.github.com/repos/dherault/serverless-offline/subscription","commits_url":"https://api.github.com/repos/dherault/serverless-offline/commits{/sha}","git_commits_url":"https://api.github.com/repos/dherault/serverless-offline/git/commits{/sha}","comments_url":"https://api.github.com/repos/dherault/serverless-offline/comments{/number}","issue_comment_url":"https://api.github.com/repos/dherault/serverless-offline/issues/comments{/number}","contents_url":"https://api.github.com/repos/dherault/serverless-offline/contents/{+path}","compare_url":"https://api.github.com/repos/dherault/serverless-offline/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dherault/serverless-offline/merges","archive_url":"https://api.github.com/repos/dherault/serverless-offline/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dherault/serverless-offline/downloads","issues_url":"https://api.github.com/repos/dherault/serverless-offline/issues{/number}","pulls_url":"https://api.github.com/repos/dherault/serverless-offline/pulls{/number}","milestones_url":"https://api.github.com/repos/dherault/serverless-offline/milestones{/number}","notifications_url":"https://api.github.com/repos/dherault/serverless-offline/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dherault/serverless-offline/labels{/name}","releases_url":"https://api.github.com/repos/dherault/serverless-offline/releases{/id}","deployments_url":"https://api.github.com/repos/dherault/serverless-offline/deployments","created_at":"2016-02-17T08:01:47Z","updated_at":"2018-08-20T17:55:13Z","pushed_at":"2018-08-16T11:23:10Z","git_url":"git://github.com/dherault/serverless-offline.git","ssh_url":"git@github.com:dherault/serverless-offline.git","clone_url":"https://github.com/dherault/serverless-offline.git","svn_url":"https://github.com/dherault/serverless-offline","homepage":"","size":1152,"stargazers_count":1604,"watchers_count":1604,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":266,"mirror_url":null,"archived":false,"open_issues_count":69,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":266,"open_issues":69,"watchers":1604,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dherault/serverless-offline/pulls/441"},"html":{"href":"https://github.com/dherault/serverless-offline/pull/441"},"issue":{"href":"https://api.github.com/repos/dherault/serverless-offline/issues/441"},"comments":{"href":"https://api.github.com/repos/dherault/serverless-offline/issues/441/comments"},"review_comments":{"href":"https://api.github.com/repos/dherault/serverless-offline/pulls/441/comments"},"review_comment":{"href":"https://api.github.com/repos/dherault/serverless-offline/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dherault/serverless-offline/pulls/441/commits"},"statuses":{"href":"https://api.github.com/repos/dherault/serverless-offline/statuses/bba043d0d1761dab17fd55bab2432283ea31f0af"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"dherault"}}