{"action":"created","comment":{"url":"https://api.github.com/repos/Mashape/kong/pulls/comments/48888007","id":48888007,"diff_hunk":"@@ -65,10 +65,15 @@ function _M.execute(conf)\n \n   local claims = jwt.claims\n \n-  local jwt_secret_key = claims.iss\n+  local jwt_secret_key_field = \"iss\"\n+  if conf.secret_key_field then\n+    jwt_secret_key_field = conf.secret_key_field\n+  end","path":"kong/plugins/jwt/access.lua","position":null,"original_position":8,"commit_id":"e5c0c956310f80f3bfc05511367478e5f7a05da8","original_commit_id":"3606f93af1c00db7e137a56830a57641806683ea","user":{"login":"ryanbreen","id":253618,"avatar_url":"https://avatars.githubusercontent.com/u/253618?v=3","gravatar_id":"","url":"https://api.github.com/users/ryanbreen","html_url":"https://github.com/ryanbreen","followers_url":"https://api.github.com/users/ryanbreen/followers","following_url":"https://api.github.com/users/ryanbreen/following{/other_user}","gists_url":"https://api.github.com/users/ryanbreen/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanbreen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanbreen/subscriptions","organizations_url":"https://api.github.com/users/ryanbreen/orgs","repos_url":"https://api.github.com/users/ryanbreen/repos","events_url":"https://api.github.com/users/ryanbreen/events{/privacy}","received_events_url":"https://api.github.com/users/ryanbreen/received_events","type":"User","site_admin":false},"body":"Cool, cleaned that up.","created_at":"2016-01-05T19:49:56Z","updated_at":"2016-01-05T19:49:56Z","html_url":"https://github.com/Mashape/kong/pull/837#discussion_r48888007","pull_request_url":"https://api.github.com/repos/Mashape/kong/pulls/837","_links":{"self":{"href":"https://api.github.com/repos/Mashape/kong/pulls/comments/48888007"},"html":{"href":"https://github.com/Mashape/kong/pull/837#discussion_r48888007"},"pull_request":{"href":"https://api.github.com/repos/Mashape/kong/pulls/837"}}},"pull_request":{"url":"https://api.github.com/repos/Mashape/kong/pulls/837","id":55120867,"html_url":"https://github.com/Mashape/kong/pull/837","diff_url":"https://github.com/Mashape/kong/pull/837.diff","patch_url":"https://github.com/Mashape/kong/pull/837.patch","issue_url":"https://api.github.com/repos/Mashape/kong/issues/837","number":837,"state":"open","locked":false,"title":"Allow for configuration of the JWT field from which secret key is drawn","user":{"login":"ryanbreen","id":253618,"avatar_url":"https://avatars.githubusercontent.com/u/253618?v=3","gravatar_id":"","url":"https://api.github.com/users/ryanbreen","html_url":"https://github.com/ryanbreen","followers_url":"https://api.github.com/users/ryanbreen/followers","following_url":"https://api.github.com/users/ryanbreen/following{/other_user}","gists_url":"https://api.github.com/users/ryanbreen/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanbreen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanbreen/subscriptions","organizations_url":"https://api.github.com/users/ryanbreen/orgs","repos_url":"https://api.github.com/users/ryanbreen/repos","events_url":"https://api.github.com/users/ryanbreen/events{/privacy}","received_events_url":"https://api.github.com/users/ryanbreen/received_events","type":"User","site_admin":false},"body":"The default remains `iss`, but this gives users more flexibility.  For example, we are using Auth0 as our source of JWT.  We will have a bunch of different APIs with different `aud` values but the same `iss`, so it is much better for us to key off of `aud`.","created_at":"2016-01-05T17:47:40Z","updated_at":"2016-01-05T19:49:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"96f6ffb80932d4408eae565d8710fd7345ee42be","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Mashape/kong/pulls/837/commits","review_comments_url":"https://api.github.com/repos/Mashape/kong/pulls/837/comments","review_comment_url":"https://api.github.com/repos/Mashape/kong/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Mashape/kong/issues/837/comments","statuses_url":"https://api.github.com/repos/Mashape/kong/statuses/e5c0c956310f80f3bfc05511367478e5f7a05da8","head":{"label":"ryanbreen:master","ref":"master","sha":"e5c0c956310f80f3bfc05511367478e5f7a05da8","user":{"login":"ryanbreen","id":253618,"avatar_url":"https://avatars.githubusercontent.com/u/253618?v=3","gravatar_id":"","url":"https://api.github.com/users/ryanbreen","html_url":"https://github.com/ryanbreen","followers_url":"https://api.github.com/users/ryanbreen/followers","following_url":"https://api.github.com/users/ryanbreen/following{/other_user}","gists_url":"https://api.github.com/users/ryanbreen/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanbreen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanbreen/subscriptions","organizations_url":"https://api.github.com/users/ryanbreen/orgs","repos_url":"https://api.github.com/users/ryanbreen/repos","events_url":"https://api.github.com/users/ryanbreen/events{/privacy}","received_events_url":"https://api.github.com/users/ryanbreen/received_events","type":"User","site_admin":false},"repo":{"id":49082094,"name":"kong","full_name":"ryanbreen/kong","owner":{"login":"ryanbreen","id":253618,"avatar_url":"https://avatars.githubusercontent.com/u/253618?v=3","gravatar_id":"","url":"https://api.github.com/users/ryanbreen","html_url":"https://github.com/ryanbreen","followers_url":"https://api.github.com/users/ryanbreen/followers","following_url":"https://api.github.com/users/ryanbreen/following{/other_user}","gists_url":"https://api.github.com/users/ryanbreen/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanbreen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanbreen/subscriptions","organizations_url":"https://api.github.com/users/ryanbreen/orgs","repos_url":"https://api.github.com/users/ryanbreen/repos","events_url":"https://api.github.com/users/ryanbreen/events{/privacy}","received_events_url":"https://api.github.com/users/ryanbreen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ryanbreen/kong","description":":monkey: Open-source, Microservice & API Management Layer built on top of NGINX","fork":true,"url":"https://api.github.com/repos/ryanbreen/kong","forks_url":"https://api.github.com/repos/ryanbreen/kong/forks","keys_url":"https://api.github.com/repos/ryanbreen/kong/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ryanbreen/kong/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ryanbreen/kong/teams","hooks_url":"https://api.github.com/repos/ryanbreen/kong/hooks","issue_events_url":"https://api.github.com/repos/ryanbreen/kong/issues/events{/number}","events_url":"https://api.github.com/repos/ryanbreen/kong/events","assignees_url":"https://api.github.com/repos/ryanbreen/kong/assignees{/user}","branches_url":"https://api.github.com/repos/ryanbreen/kong/branches{/branch}","tags_url":"https://api.github.com/repos/ryanbreen/kong/tags","blobs_url":"https://api.github.com/repos/ryanbreen/kong/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ryanbreen/kong/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ryanbreen/kong/git/refs{/sha}","trees_url":"https://api.github.com/repos/ryanbreen/kong/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ryanbreen/kong/statuses/{sha}","languages_url":"https://api.github.com/repos/ryanbreen/kong/languages","stargazers_url":"https://api.github.com/repos/ryanbreen/kong/stargazers","contributors_url":"https://api.github.com/repos/ryanbreen/kong/contributors","subscribers_url":"https://api.github.com/repos/ryanbreen/kong/subscribers","subscription_url":"https://api.github.com/repos/ryanbreen/kong/subscription","commits_url":"https://api.github.com/repos/ryanbreen/kong/commits{/sha}","git_commits_url":"https://api.github.com/repos/ryanbreen/kong/git/commits{/sha}","comments_url":"https://api.github.com/repos/ryanbreen/kong/comments{/number}","issue_comment_url":"https://api.github.com/repos/ryanbreen/kong/issues/comments{/number}","contents_url":"https://api.github.com/repos/ryanbreen/kong/contents/{+path}","compare_url":"https://api.github.com/repos/ryanbreen/kong/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ryanbreen/kong/merges","archive_url":"https://api.github.com/repos/ryanbreen/kong/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ryanbreen/kong/downloads","issues_url":"https://api.github.com/repos/ryanbreen/kong/issues{/number}","pulls_url":"https://api.github.com/repos/ryanbreen/kong/pulls{/number}","milestones_url":"https://api.github.com/repos/ryanbreen/kong/milestones{/number}","notifications_url":"https://api.github.com/repos/ryanbreen/kong/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ryanbreen/kong/labels{/name}","releases_url":"https://api.github.com/repos/ryanbreen/kong/releases{/id}","created_at":"2016-01-05T17:42:04Z","updated_at":"2016-01-05T17:42:05Z","pushed_at":"2016-01-05T19:49:25Z","git_url":"git://github.com/ryanbreen/kong.git","ssh_url":"git@github.com:ryanbreen/kong.git","clone_url":"https://github.com/ryanbreen/kong.git","svn_url":"https://github.com/ryanbreen/kong","homepage":"https://getkong.org","size":2676,"stargazers_count":0,"watchers_count":0,"language":"Lua","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":"Mashape:master","ref":"master","sha":"f95a34ae384d54f12957b4883370cc63e2110e68","user":{"login":"Mashape","id":962416,"avatar_url":"https://avatars.githubusercontent.com/u/962416?v=3","gravatar_id":"","url":"https://api.github.com/users/Mashape","html_url":"https://github.com/Mashape","followers_url":"https://api.github.com/users/Mashape/followers","following_url":"https://api.github.com/users/Mashape/following{/other_user}","gists_url":"https://api.github.com/users/Mashape/gists{/gist_id}","starred_url":"https://api.github.com/users/Mashape/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mashape/subscriptions","organizations_url":"https://api.github.com/users/Mashape/orgs","repos_url":"https://api.github.com/users/Mashape/repos","events_url":"https://api.github.com/users/Mashape/events{/privacy}","received_events_url":"https://api.github.com/users/Mashape/received_events","type":"Organization","site_admin":false},"repo":{"id":26783295,"name":"kong","full_name":"Mashape/kong","owner":{"login":"Mashape","id":962416,"avatar_url":"https://avatars.githubusercontent.com/u/962416?v=3","gravatar_id":"","url":"https://api.github.com/users/Mashape","html_url":"https://github.com/Mashape","followers_url":"https://api.github.com/users/Mashape/followers","following_url":"https://api.github.com/users/Mashape/following{/other_user}","gists_url":"https://api.github.com/users/Mashape/gists{/gist_id}","starred_url":"https://api.github.com/users/Mashape/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mashape/subscriptions","organizations_url":"https://api.github.com/users/Mashape/orgs","repos_url":"https://api.github.com/users/Mashape/repos","events_url":"https://api.github.com/users/Mashape/events{/privacy}","received_events_url":"https://api.github.com/users/Mashape/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Mashape/kong","description":":monkey: Open-source, Microservice & API Management Layer built on top of NGINX","fork":false,"url":"https://api.github.com/repos/Mashape/kong","forks_url":"https://api.github.com/repos/Mashape/kong/forks","keys_url":"https://api.github.com/repos/Mashape/kong/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Mashape/kong/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Mashape/kong/teams","hooks_url":"https://api.github.com/repos/Mashape/kong/hooks","issue_events_url":"https://api.github.com/repos/Mashape/kong/issues/events{/number}","events_url":"https://api.github.com/repos/Mashape/kong/events","assignees_url":"https://api.github.com/repos/Mashape/kong/assignees{/user}","branches_url":"https://api.github.com/repos/Mashape/kong/branches{/branch}","tags_url":"https://api.github.com/repos/Mashape/kong/tags","blobs_url":"https://api.github.com/repos/Mashape/kong/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Mashape/kong/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Mashape/kong/git/refs{/sha}","trees_url":"https://api.github.com/repos/Mashape/kong/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Mashape/kong/statuses/{sha}","languages_url":"https://api.github.com/repos/Mashape/kong/languages","stargazers_url":"https://api.github.com/repos/Mashape/kong/stargazers","contributors_url":"https://api.github.com/repos/Mashape/kong/contributors","subscribers_url":"https://api.github.com/repos/Mashape/kong/subscribers","subscription_url":"https://api.github.com/repos/Mashape/kong/subscription","commits_url":"https://api.github.com/repos/Mashape/kong/commits{/sha}","git_commits_url":"https://api.github.com/repos/Mashape/kong/git/commits{/sha}","comments_url":"https://api.github.com/repos/Mashape/kong/comments{/number}","issue_comment_url":"https://api.github.com/repos/Mashape/kong/issues/comments{/number}","contents_url":"https://api.github.com/repos/Mashape/kong/contents/{+path}","compare_url":"https://api.github.com/repos/Mashape/kong/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Mashape/kong/merges","archive_url":"https://api.github.com/repos/Mashape/kong/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Mashape/kong/downloads","issues_url":"https://api.github.com/repos/Mashape/kong/issues{/number}","pulls_url":"https://api.github.com/repos/Mashape/kong/pulls{/number}","milestones_url":"https://api.github.com/repos/Mashape/kong/milestones{/number}","notifications_url":"https://api.github.com/repos/Mashape/kong/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Mashape/kong/labels{/name}","releases_url":"https://api.github.com/repos/Mashape/kong/releases{/id}","created_at":"2014-11-17T23:56:08Z","updated_at":"2016-01-05T19:33:22Z","pushed_at":"2016-01-05T19:49:26Z","git_url":"git://github.com/Mashape/kong.git","ssh_url":"git@github.com:Mashape/kong.git","clone_url":"https://github.com/Mashape/kong.git","svn_url":"https://github.com/Mashape/kong","homepage":"https://getkong.org","size":105410,"stargazers_count":3748,"watchers_count":3748,"language":"Lua","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":241,"mirror_url":null,"open_issues_count":168,"forks":241,"open_issues":168,"watchers":3748,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Mashape/kong/pulls/837"},"html":{"href":"https://github.com/Mashape/kong/pull/837"},"issue":{"href":"https://api.github.com/repos/Mashape/kong/issues/837"},"comments":{"href":"https://api.github.com/repos/Mashape/kong/issues/837/comments"},"review_comments":{"href":"https://api.github.com/repos/Mashape/kong/pulls/837/comments"},"review_comment":{"href":"https://api.github.com/repos/Mashape/kong/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Mashape/kong/pulls/837/commits"},"statuses":{"href":"https://api.github.com/repos/Mashape/kong/statuses/e5c0c956310f80f3bfc05511367478e5f7a05da8"}}}}