{"action":"created","comment":{"url":"https://api.github.com/repos/auth0/webtask-userspace/pulls/comments/179842662","pull_request_review_id":110165053,"id":179842662,"diff_hunk":"@@ -0,0 +1,31 @@\n+# JSON Web Token Middleware\n+\n+This middleware allows to secure execution of a webtask using JWT tokens by validating issuer, audience, and scope claims.\n+\n+## Usage\n+\n+1. Set the `wt-node-dependencies` metadata property to the stringified JSON of an object with names of modules as the keys and values set to the latest version for the corresponding module.\n+\n+```\n+{\n+    \"@webtask/middleware-compiler\": \"1.3.0\", \n+    \"express-jwt\": \"5.3.1\",\n+    \"jws\": \"3.1.4\",\n+    \"jwks-rsa\": \"1.2.1\"\n+}\n+```\n+\n+2. Set the `wt-compiler` metadata property on your webtask to `@webtask/middleware-compiler`.\n+\n+3. Set the `wt-compiler` metadata property to `@webtask/jwt-middleware`.\n+\n+4. Set the `wt-authorize-execution` metadata property to any value other than `0` to secure the webtask.  Value of `0` or missing `wt-authorize-execution` metadata property will result with the webtask execution being unsecure.\n+\n+5. Set the `iss` metadata property to the value of `authorization_server` property obtained from the discovery endpoint of your deployment (located at `{deployment_url}//api/description`).\n+\n+6. Set the `aud` metadata property to the value of `audience` property obtained from the discovery endpoint of your deployment (located at `{deployment_url}//api/description`).","path":"packages/jwt-middleware/README.md","position":26,"original_position":26,"commit_id":"a98f70b7f6f39e7d0f307e051550e93007f1c9f8","original_commit_id":"a98f70b7f6f39e7d0f307e051550e93007f1c9f8","user":{"login":"ggoodman","id":50030,"avatar_url":"https://avatars3.githubusercontent.com/u/50030?v=4","gravatar_id":"","url":"https://api.github.com/users/ggoodman","html_url":"https://github.com/ggoodman","followers_url":"https://api.github.com/users/ggoodman/followers","following_url":"https://api.github.com/users/ggoodman/following{/other_user}","gists_url":"https://api.github.com/users/ggoodman/gists{/gist_id}","starred_url":"https://api.github.com/users/ggoodman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ggoodman/subscriptions","organizations_url":"https://api.github.com/users/ggoodman/orgs","repos_url":"https://api.github.com/users/ggoodman/repos","events_url":"https://api.github.com/users/ggoodman/events{/privacy}","received_events_url":"https://api.github.com/users/ggoodman/received_events","type":"User","site_admin":false},"body":"I'm on the fence here. In the spirit of 'not having anything to support until the feature is asked for', I think we should rely on clients, as @rwtombaugh suggested, to provide intelligent defaults.","created_at":"2018-04-06T18:37:30Z","updated_at":"2018-04-06T19:02:21Z","html_url":"https://github.com/auth0/webtask-userspace/pull/5#discussion_r179842662","pull_request_url":"https://api.github.com/repos/auth0/webtask-userspace/pulls/5","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/auth0/webtask-userspace/pulls/comments/179842662"},"html":{"href":"https://github.com/auth0/webtask-userspace/pull/5#discussion_r179842662"},"pull_request":{"href":"https://api.github.com/repos/auth0/webtask-userspace/pulls/5"}},"in_reply_to_id":179811622},"pull_request":{"url":"https://api.github.com/repos/auth0/webtask-userspace/pulls/5","id":179961124,"html_url":"https://github.com/auth0/webtask-userspace/pull/5","diff_url":"https://github.com/auth0/webtask-userspace/pull/5.diff","patch_url":"https://github.com/auth0/webtask-userspace/pull/5.patch","issue_url":"https://api.github.com/repos/auth0/webtask-userspace/issues/5","number":5,"state":"open","locked":false,"title":"Ex 358","user":{"login":"lzychowski","id":1878274,"avatar_url":"https://avatars2.githubusercontent.com/u/1878274?v=4","gravatar_id":"","url":"https://api.github.com/users/lzychowski","html_url":"https://github.com/lzychowski","followers_url":"https://api.github.com/users/lzychowski/followers","following_url":"https://api.github.com/users/lzychowski/following{/other_user}","gists_url":"https://api.github.com/users/lzychowski/gists{/gist_id}","starred_url":"https://api.github.com/users/lzychowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lzychowski/subscriptions","organizations_url":"https://api.github.com/users/lzychowski/orgs","repos_url":"https://api.github.com/users/lzychowski/repos","events_url":"https://api.github.com/users/lzychowski/events{/privacy}","received_events_url":"https://api.github.com/users/lzychowski/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-04-06T14:15:22Z","updated_at":"2018-04-06T19:02:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f440713ad1f2671b102312e5843b8581953f62ef","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/auth0/webtask-userspace/pulls/5/commits","review_comments_url":"https://api.github.com/repos/auth0/webtask-userspace/pulls/5/comments","review_comment_url":"https://api.github.com/repos/auth0/webtask-userspace/pulls/comments{/number}","comments_url":"https://api.github.com/repos/auth0/webtask-userspace/issues/5/comments","statuses_url":"https://api.github.com/repos/auth0/webtask-userspace/statuses/a98f70b7f6f39e7d0f307e051550e93007f1c9f8","head":{"label":"auth0:ex-358","ref":"ex-358","sha":"a98f70b7f6f39e7d0f307e051550e93007f1c9f8","user":{"login":"auth0","id":2824157,"avatar_url":"https://avatars1.githubusercontent.com/u/2824157?v=4","gravatar_id":"","url":"https://api.github.com/users/auth0","html_url":"https://github.com/auth0","followers_url":"https://api.github.com/users/auth0/followers","following_url":"https://api.github.com/users/auth0/following{/other_user}","gists_url":"https://api.github.com/users/auth0/gists{/gist_id}","starred_url":"https://api.github.com/users/auth0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/auth0/subscriptions","organizations_url":"https://api.github.com/users/auth0/orgs","repos_url":"https://api.github.com/users/auth0/repos","events_url":"https://api.github.com/users/auth0/events{/privacy}","received_events_url":"https://api.github.com/users/auth0/received_events","type":"Organization","site_admin":false},"repo":{"id":100721931,"name":"webtask-userspace","full_name":"auth0/webtask-userspace","owner":{"login":"auth0","id":2824157,"avatar_url":"https://avatars1.githubusercontent.com/u/2824157?v=4","gravatar_id":"","url":"https://api.github.com/users/auth0","html_url":"https://github.com/auth0","followers_url":"https://api.github.com/users/auth0/followers","following_url":"https://api.github.com/users/auth0/following{/other_user}","gists_url":"https://api.github.com/users/auth0/gists{/gist_id}","starred_url":"https://api.github.com/users/auth0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/auth0/subscriptions","organizations_url":"https://api.github.com/users/auth0/orgs","repos_url":"https://api.github.com/users/auth0/repos","events_url":"https://api.github.com/users/auth0/events{/privacy}","received_events_url":"https://api.github.com/users/auth0/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/auth0/webtask-userspace","description":"A collection of user-space webtask compilers, middleware and other utilities","fork":false,"url":"https://api.github.com/repos/auth0/webtask-userspace","forks_url":"https://api.github.com/repos/auth0/webtask-userspace/forks","keys_url":"https://api.github.com/repos/auth0/webtask-userspace/keys{/key_id}","collaborators_url":"https://api.github.com/repos/auth0/webtask-userspace/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/auth0/webtask-userspace/teams","hooks_url":"https://api.github.com/repos/auth0/webtask-userspace/hooks","issue_events_url":"https://api.github.com/repos/auth0/webtask-userspace/issues/events{/number}","events_url":"https://api.github.com/repos/auth0/webtask-userspace/events","assignees_url":"https://api.github.com/repos/auth0/webtask-userspace/assignees{/user}","branches_url":"https://api.github.com/repos/auth0/webtask-userspace/branches{/branch}","tags_url":"https://api.github.com/repos/auth0/webtask-userspace/tags","blobs_url":"https://api.github.com/repos/auth0/webtask-userspace/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/auth0/webtask-userspace/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/auth0/webtask-userspace/git/refs{/sha}","trees_url":"https://api.github.com/repos/auth0/webtask-userspace/git/trees{/sha}","statuses_url":"https://api.github.com/repos/auth0/webtask-userspace/statuses/{sha}","languages_url":"https://api.github.com/repos/auth0/webtask-userspace/languages","stargazers_url":"https://api.github.com/repos/auth0/webtask-userspace/stargazers","contributors_url":"https://api.github.com/repos/auth0/webtask-userspace/contributors","subscribers_url":"https://api.github.com/repos/auth0/webtask-userspace/subscribers","subscription_url":"https://api.github.com/repos/auth0/webtask-userspace/subscription","commits_url":"https://api.github.com/repos/auth0/webtask-userspace/commits{/sha}","git_commits_url":"https://api.github.com/repos/auth0/webtask-userspace/git/commits{/sha}","comments_url":"https://api.github.com/repos/auth0/webtask-userspace/comments{/number}","issue_comment_url":"https://api.github.com/repos/auth0/webtask-userspace/issues/comments{/number}","contents_url":"https://api.github.com/repos/auth0/webtask-userspace/contents/{+path}","compare_url":"https://api.github.com/repos/auth0/webtask-userspace/compare/{base}...{head}","merges_url":"https://api.github.com/repos/auth0/webtask-userspace/merges","archive_url":"https://api.github.com/repos/auth0/webtask-userspace/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/auth0/webtask-userspace/downloads","issues_url":"https://api.github.com/repos/auth0/webtask-userspace/issues{/number}","pulls_url":"https://api.github.com/repos/auth0/webtask-userspace/pulls{/number}","milestones_url":"https://api.github.com/repos/auth0/webtask-userspace/milestones{/number}","notifications_url":"https://api.github.com/repos/auth0/webtask-userspace/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/auth0/webtask-userspace/labels{/name}","releases_url":"https://api.github.com/repos/auth0/webtask-userspace/releases{/id}","deployments_url":"https://api.github.com/repos/auth0/webtask-userspace/deployments","created_at":"2017-08-18T14:48:16Z","updated_at":"2017-12-13T21:03:44Z","pushed_at":"2018-04-06T14:15:23Z","git_url":"git://github.com/auth0/webtask-userspace.git","ssh_url":"git@github.com:auth0/webtask-userspace.git","clone_url":"https://github.com/auth0/webtask-userspace.git","svn_url":"https://github.com/auth0/webtask-userspace","homepage":null,"size":62,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":4,"license":null,"forks":1,"open_issues":4,"watchers":2,"default_branch":"master"}},"base":{"label":"auth0:master","ref":"master","sha":"5710b7f6c91ec8dc0193a646f973b7c41f4936ab","user":{"login":"auth0","id":2824157,"avatar_url":"https://avatars1.githubusercontent.com/u/2824157?v=4","gravatar_id":"","url":"https://api.github.com/users/auth0","html_url":"https://github.com/auth0","followers_url":"https://api.github.com/users/auth0/followers","following_url":"https://api.github.com/users/auth0/following{/other_user}","gists_url":"https://api.github.com/users/auth0/gists{/gist_id}","starred_url":"https://api.github.com/users/auth0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/auth0/subscriptions","organizations_url":"https://api.github.com/users/auth0/orgs","repos_url":"https://api.github.com/users/auth0/repos","events_url":"https://api.github.com/users/auth0/events{/privacy}","received_events_url":"https://api.github.com/users/auth0/received_events","type":"Organization","site_admin":false},"repo":{"id":100721931,"name":"webtask-userspace","full_name":"auth0/webtask-userspace","owner":{"login":"auth0","id":2824157,"avatar_url":"https://avatars1.githubusercontent.com/u/2824157?v=4","gravatar_id":"","url":"https://api.github.com/users/auth0","html_url":"https://github.com/auth0","followers_url":"https://api.github.com/users/auth0/followers","following_url":"https://api.github.com/users/auth0/following{/other_user}","gists_url":"https://api.github.com/users/auth0/gists{/gist_id}","starred_url":"https://api.github.com/users/auth0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/auth0/subscriptions","organizations_url":"https://api.github.com/users/auth0/orgs","repos_url":"https://api.github.com/users/auth0/repos","events_url":"https://api.github.com/users/auth0/events{/privacy}","received_events_url":"https://api.github.com/users/auth0/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/auth0/webtask-userspace","description":"A collection of user-space webtask compilers, middleware and other utilities","fork":false,"url":"https://api.github.com/repos/auth0/webtask-userspace","forks_url":"https://api.github.com/repos/auth0/webtask-userspace/forks","keys_url":"https://api.github.com/repos/auth0/webtask-userspace/keys{/key_id}","collaborators_url":"https://api.github.com/repos/auth0/webtask-userspace/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/auth0/webtask-userspace/teams","hooks_url":"https://api.github.com/repos/auth0/webtask-userspace/hooks","issue_events_url":"https://api.github.com/repos/auth0/webtask-userspace/issues/events{/number}","events_url":"https://api.github.com/repos/auth0/webtask-userspace/events","assignees_url":"https://api.github.com/repos/auth0/webtask-userspace/assignees{/user}","branches_url":"https://api.github.com/repos/auth0/webtask-userspace/branches{/branch}","tags_url":"https://api.github.com/repos/auth0/webtask-userspace/tags","blobs_url":"https://api.github.com/repos/auth0/webtask-userspace/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/auth0/webtask-userspace/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/auth0/webtask-userspace/git/refs{/sha}","trees_url":"https://api.github.com/repos/auth0/webtask-userspace/git/trees{/sha}","statuses_url":"https://api.github.com/repos/auth0/webtask-userspace/statuses/{sha}","languages_url":"https://api.github.com/repos/auth0/webtask-userspace/languages","stargazers_url":"https://api.github.com/repos/auth0/webtask-userspace/stargazers","contributors_url":"https://api.github.com/repos/auth0/webtask-userspace/contributors","subscribers_url":"https://api.github.com/repos/auth0/webtask-userspace/subscribers","subscription_url":"https://api.github.com/repos/auth0/webtask-userspace/subscription","commits_url":"https://api.github.com/repos/auth0/webtask-userspace/commits{/sha}","git_commits_url":"https://api.github.com/repos/auth0/webtask-userspace/git/commits{/sha}","comments_url":"https://api.github.com/repos/auth0/webtask-userspace/comments{/number}","issue_comment_url":"https://api.github.com/repos/auth0/webtask-userspace/issues/comments{/number}","contents_url":"https://api.github.com/repos/auth0/webtask-userspace/contents/{+path}","compare_url":"https://api.github.com/repos/auth0/webtask-userspace/compare/{base}...{head}","merges_url":"https://api.github.com/repos/auth0/webtask-userspace/merges","archive_url":"https://api.github.com/repos/auth0/webtask-userspace/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/auth0/webtask-userspace/downloads","issues_url":"https://api.github.com/repos/auth0/webtask-userspace/issues{/number}","pulls_url":"https://api.github.com/repos/auth0/webtask-userspace/pulls{/number}","milestones_url":"https://api.github.com/repos/auth0/webtask-userspace/milestones{/number}","notifications_url":"https://api.github.com/repos/auth0/webtask-userspace/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/auth0/webtask-userspace/labels{/name}","releases_url":"https://api.github.com/repos/auth0/webtask-userspace/releases{/id}","deployments_url":"https://api.github.com/repos/auth0/webtask-userspace/deployments","created_at":"2017-08-18T14:48:16Z","updated_at":"2017-12-13T21:03:44Z","pushed_at":"2018-04-06T14:15:23Z","git_url":"git://github.com/auth0/webtask-userspace.git","ssh_url":"git@github.com:auth0/webtask-userspace.git","clone_url":"https://github.com/auth0/webtask-userspace.git","svn_url":"https://github.com/auth0/webtask-userspace","homepage":null,"size":62,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":4,"license":null,"forks":1,"open_issues":4,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/auth0/webtask-userspace/pulls/5"},"html":{"href":"https://github.com/auth0/webtask-userspace/pull/5"},"issue":{"href":"https://api.github.com/repos/auth0/webtask-userspace/issues/5"},"comments":{"href":"https://api.github.com/repos/auth0/webtask-userspace/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/auth0/webtask-userspace/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/auth0/webtask-userspace/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/auth0/webtask-userspace/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/auth0/webtask-userspace/statuses/a98f70b7f6f39e7d0f307e051550e93007f1c9f8"}},"author_association":"NONE"}}
{"actor":{"display_login":"ggoodman"}}