{"action":"created","comment":{"url":"https://api.github.com/repos/strongloop/loopback-next/pulls/comments/113813258","pull_request_review_id":35235482,"id":113813258,"diff_hunk":"@@ -0,0 +1,31 @@\n+// Copyright IBM Corp. 2013,2017. All Rights Reserved.\n+// Node module: loopback\n+// This file is licensed under the MIT License.\n+// License text available at https://opensource.org/licenses/MIT\n+\n+import * as assert from 'assert';\n+import 'reflect-metadata';\n+\n+export class AuthenticationMetadata {\n+  strategyName : string;\n+  options: string[];\n+  constructor(strategyName: string, options: string[]) {\n+    this.strategyName = strategyName;\n+    this.options = options;\n+  }\n+  getMetadata() {\n+    return {strategy: this.strategyName, options: this.options};\n+  }\n+}\n+\n+export function authenticate(strategyName: string, options? : string[]) {\n+  return function(controllerClass: Object, methodName: string) {\n+    let metadataObject: AuthenticationMetadata;\n+    metadataObject = new AuthenticationMetadata(strategyName, options || []);\n+    Reflect.defineMetadata('loopback:authenticate', metadataObject.getMetadata(), controllerClass, methodName);","path":"packages/authentication/src/authenticate.ts","position":25,"original_position":25,"commit_id":"8e8ff1ff91373602483b2d6fe8782a3ee7021022","original_commit_id":"8e8ff1ff91373602483b2d6fe8782a3ee7021022","user":{"login":"superkhau","id":1617364,"avatar_url":"https://avatars1.githubusercontent.com/u/1617364?v=3","gravatar_id":"","url":"https://api.github.com/users/superkhau","html_url":"https://github.com/superkhau","followers_url":"https://api.github.com/users/superkhau/followers","following_url":"https://api.github.com/users/superkhau/following{/other_user}","gists_url":"https://api.github.com/users/superkhau/gists{/gist_id}","starred_url":"https://api.github.com/users/superkhau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/superkhau/subscriptions","organizations_url":"https://api.github.com/users/superkhau/orgs","repos_url":"https://api.github.com/users/superkhau/repos","events_url":"https://api.github.com/users/superkhau/events{/privacy}","received_events_url":"https://api.github.com/users/superkhau/received_events","type":"User","site_admin":false},"body":"meataData","created_at":"2017-04-27T22:02:55Z","updated_at":"2017-04-27T22:02:55Z","html_url":"https://github.com/strongloop/loopback-next/pull/224#discussion_r113813258","pull_request_url":"https://api.github.com/repos/strongloop/loopback-next/pulls/224","_links":{"self":{"href":"https://api.github.com/repos/strongloop/loopback-next/pulls/comments/113813258"},"html":{"href":"https://github.com/strongloop/loopback-next/pull/224#discussion_r113813258"},"pull_request":{"href":"https://api.github.com/repos/strongloop/loopback-next/pulls/224"}}},"pull_request":{"url":"https://api.github.com/repos/strongloop/loopback-next/pulls/224","id":117822731,"html_url":"https://github.com/strongloop/loopback-next/pull/224","diff_url":"https://github.com/strongloop/loopback-next/pull/224.diff","patch_url":"https://github.com/strongloop/loopback-next/pull/224.patch","issue_url":"https://api.github.com/repos/strongloop/loopback-next/issues/224","number":224,"state":"open","locked":false,"title":"Implement authenticate annotation","user":{"login":"siddhipai","id":15273582,"avatar_url":"https://avatars3.githubusercontent.com/u/15273582?v=3","gravatar_id":"","url":"https://api.github.com/users/siddhipai","html_url":"https://github.com/siddhipai","followers_url":"https://api.github.com/users/siddhipai/followers","following_url":"https://api.github.com/users/siddhipai/following{/other_user}","gists_url":"https://api.github.com/users/siddhipai/gists{/gist_id}","starred_url":"https://api.github.com/users/siddhipai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/siddhipai/subscriptions","organizations_url":"https://api.github.com/users/siddhipai/orgs","repos_url":"https://api.github.com/users/siddhipai/repos","events_url":"https://api.github.com/users/siddhipai/events{/privacy}","received_events_url":"https://api.github.com/users/siddhipai/received_events","type":"User","site_admin":false},"body":"* Create a new metadata file\r\n* Create a new unit test case file\r\n\r\ncc @bajtos @raymondfeng @ritch @superkhau\r\n\r\nconnected to https://github.com/strongloop-internal/scrum-asteroid/issues/95","created_at":"2017-04-26T22:21:12Z","updated_at":"2017-04-27T22:02:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7ac971aa0002b172795ab2fcfd1925efcb4a8e64","assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/strongloop/loopback-next/milestones/15","html_url":"https://github.com/strongloop/loopback-next/milestone/15","labels_url":"https://api.github.com/repos/strongloop/loopback-next/milestones/15/labels","id":2307161,"number":15,"title":"Sprint 34 - Asteroid","description":"","creator":{"login":"cgole","id":991632,"avatar_url":"https://avatars3.githubusercontent.com/u/991632?v=3","gravatar_id":"","url":"https://api.github.com/users/cgole","html_url":"https://github.com/cgole","followers_url":"https://api.github.com/users/cgole/followers","following_url":"https://api.github.com/users/cgole/following{/other_user}","gists_url":"https://api.github.com/users/cgole/gists{/gist_id}","starred_url":"https://api.github.com/users/cgole/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cgole/subscriptions","organizations_url":"https://api.github.com/users/cgole/orgs","repos_url":"https://api.github.com/users/cgole/repos","events_url":"https://api.github.com/users/cgole/events{/privacy}","received_events_url":"https://api.github.com/users/cgole/received_events","type":"User","site_admin":false},"open_issues":11,"closed_issues":31,"state":"open","created_at":"2017-02-07T21:57:01Z","updated_at":"2017-04-27T16:19:36Z","due_on":"2017-05-01T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/strongloop/loopback-next/pulls/224/commits","review_comments_url":"https://api.github.com/repos/strongloop/loopback-next/pulls/224/comments","review_comment_url":"https://api.github.com/repos/strongloop/loopback-next/pulls/comments{/number}","comments_url":"https://api.github.com/repos/strongloop/loopback-next/issues/224/comments","statuses_url":"https://api.github.com/repos/strongloop/loopback-next/statuses/8e8ff1ff91373602483b2d6fe8782a3ee7021022","head":{"label":"strongloop:implement/decorator-authenticate","ref":"implement/decorator-authenticate","sha":"8e8ff1ff91373602483b2d6fe8782a3ee7021022","user":{"login":"strongloop","id":3020012,"avatar_url":"https://avatars2.githubusercontent.com/u/3020012?v=3","gravatar_id":"","url":"https://api.github.com/users/strongloop","html_url":"https://github.com/strongloop","followers_url":"https://api.github.com/users/strongloop/followers","following_url":"https://api.github.com/users/strongloop/following{/other_user}","gists_url":"https://api.github.com/users/strongloop/gists{/gist_id}","starred_url":"https://api.github.com/users/strongloop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strongloop/subscriptions","organizations_url":"https://api.github.com/users/strongloop/orgs","repos_url":"https://api.github.com/users/strongloop/repos","events_url":"https://api.github.com/users/strongloop/events{/privacy}","received_events_url":"https://api.github.com/users/strongloop/received_events","type":"Organization","site_admin":false},"repo":{"id":78452015,"name":"loopback-next","full_name":"strongloop/loopback-next","owner":{"login":"strongloop","id":3020012,"avatar_url":"https://avatars2.githubusercontent.com/u/3020012?v=3","gravatar_id":"","url":"https://api.github.com/users/strongloop","html_url":"https://github.com/strongloop","followers_url":"https://api.github.com/users/strongloop/followers","following_url":"https://api.github.com/users/strongloop/following{/other_user}","gists_url":"https://api.github.com/users/strongloop/gists{/gist_id}","starred_url":"https://api.github.com/users/strongloop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strongloop/subscriptions","organizations_url":"https://api.github.com/users/strongloop/orgs","repos_url":"https://api.github.com/users/strongloop/repos","events_url":"https://api.github.com/users/strongloop/events{/privacy}","received_events_url":"https://api.github.com/users/strongloop/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/strongloop/loopback-next","description":"LoopBack makes it easy to build modern applications that require complex integrations.","fork":false,"url":"https://api.github.com/repos/strongloop/loopback-next","forks_url":"https://api.github.com/repos/strongloop/loopback-next/forks","keys_url":"https://api.github.com/repos/strongloop/loopback-next/keys{/key_id}","collaborators_url":"https://api.github.com/repos/strongloop/loopback-next/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/strongloop/loopback-next/teams","hooks_url":"https://api.github.com/repos/strongloop/loopback-next/hooks","issue_events_url":"https://api.github.com/repos/strongloop/loopback-next/issues/events{/number}","events_url":"https://api.github.com/repos/strongloop/loopback-next/events","assignees_url":"https://api.github.com/repos/strongloop/loopback-next/assignees{/user}","branches_url":"https://api.github.com/repos/strongloop/loopback-next/branches{/branch}","tags_url":"https://api.github.com/repos/strongloop/loopback-next/tags","blobs_url":"https://api.github.com/repos/strongloop/loopback-next/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/strongloop/loopback-next/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/strongloop/loopback-next/git/refs{/sha}","trees_url":"https://api.github.com/repos/strongloop/loopback-next/git/trees{/sha}","statuses_url":"https://api.github.com/repos/strongloop/loopback-next/statuses/{sha}","languages_url":"https://api.github.com/repos/strongloop/loopback-next/languages","stargazers_url":"https://api.github.com/repos/strongloop/loopback-next/stargazers","contributors_url":"https://api.github.com/repos/strongloop/loopback-next/contributors","subscribers_url":"https://api.github.com/repos/strongloop/loopback-next/subscribers","subscription_url":"https://api.github.com/repos/strongloop/loopback-next/subscription","commits_url":"https://api.github.com/repos/strongloop/loopback-next/commits{/sha}","git_commits_url":"https://api.github.com/repos/strongloop/loopback-next/git/commits{/sha}","comments_url":"https://api.github.com/repos/strongloop/loopback-next/comments{/number}","issue_comment_url":"https://api.github.com/repos/strongloop/loopback-next/issues/comments{/number}","contents_url":"https://api.github.com/repos/strongloop/loopback-next/contents/{+path}","compare_url":"https://api.github.com/repos/strongloop/loopback-next/compare/{base}...{head}","merges_url":"https://api.github.com/repos/strongloop/loopback-next/merges","archive_url":"https://api.github.com/repos/strongloop/loopback-next/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/strongloop/loopback-next/downloads","issues_url":"https://api.github.com/repos/strongloop/loopback-next/issues{/number}","pulls_url":"https://api.github.com/repos/strongloop/loopback-next/pulls{/number}","milestones_url":"https://api.github.com/repos/strongloop/loopback-next/milestones{/number}","notifications_url":"https://api.github.com/repos/strongloop/loopback-next/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/strongloop/loopback-next/labels{/name}","releases_url":"https://api.github.com/repos/strongloop/loopback-next/releases{/id}","deployments_url":"https://api.github.com/repos/strongloop/loopback-next/deployments","created_at":"2017-01-09T17:27:14Z","updated_at":"2017-04-25T10:34:59Z","pushed_at":"2017-04-27T21:40:16Z","git_url":"git://github.com/strongloop/loopback-next.git","ssh_url":"git@github.com:strongloop/loopback-next.git","clone_url":"https://github.com/strongloop/loopback-next.git","svn_url":"https://github.com/strongloop/loopback-next","homepage":"http://loopback.io","size":446,"stargazers_count":28,"watchers_count":28,"language":"TypeScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":85,"forks":2,"open_issues":85,"watchers":28,"default_branch":"master"}},"base":{"label":"strongloop:master","ref":"master","sha":"8e9526d4a1f1e740c9fd41f355b95dd15f2d5542","user":{"login":"strongloop","id":3020012,"avatar_url":"https://avatars2.githubusercontent.com/u/3020012?v=3","gravatar_id":"","url":"https://api.github.com/users/strongloop","html_url":"https://github.com/strongloop","followers_url":"https://api.github.com/users/strongloop/followers","following_url":"https://api.github.com/users/strongloop/following{/other_user}","gists_url":"https://api.github.com/users/strongloop/gists{/gist_id}","starred_url":"https://api.github.com/users/strongloop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strongloop/subscriptions","organizations_url":"https://api.github.com/users/strongloop/orgs","repos_url":"https://api.github.com/users/strongloop/repos","events_url":"https://api.github.com/users/strongloop/events{/privacy}","received_events_url":"https://api.github.com/users/strongloop/received_events","type":"Organization","site_admin":false},"repo":{"id":78452015,"name":"loopback-next","full_name":"strongloop/loopback-next","owner":{"login":"strongloop","id":3020012,"avatar_url":"https://avatars2.githubusercontent.com/u/3020012?v=3","gravatar_id":"","url":"https://api.github.com/users/strongloop","html_url":"https://github.com/strongloop","followers_url":"https://api.github.com/users/strongloop/followers","following_url":"https://api.github.com/users/strongloop/following{/other_user}","gists_url":"https://api.github.com/users/strongloop/gists{/gist_id}","starred_url":"https://api.github.com/users/strongloop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strongloop/subscriptions","organizations_url":"https://api.github.com/users/strongloop/orgs","repos_url":"https://api.github.com/users/strongloop/repos","events_url":"https://api.github.com/users/strongloop/events{/privacy}","received_events_url":"https://api.github.com/users/strongloop/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/strongloop/loopback-next","description":"LoopBack makes it easy to build modern applications that require complex integrations.","fork":false,"url":"https://api.github.com/repos/strongloop/loopback-next","forks_url":"https://api.github.com/repos/strongloop/loopback-next/forks","keys_url":"https://api.github.com/repos/strongloop/loopback-next/keys{/key_id}","collaborators_url":"https://api.github.com/repos/strongloop/loopback-next/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/strongloop/loopback-next/teams","hooks_url":"https://api.github.com/repos/strongloop/loopback-next/hooks","issue_events_url":"https://api.github.com/repos/strongloop/loopback-next/issues/events{/number}","events_url":"https://api.github.com/repos/strongloop/loopback-next/events","assignees_url":"https://api.github.com/repos/strongloop/loopback-next/assignees{/user}","branches_url":"https://api.github.com/repos/strongloop/loopback-next/branches{/branch}","tags_url":"https://api.github.com/repos/strongloop/loopback-next/tags","blobs_url":"https://api.github.com/repos/strongloop/loopback-next/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/strongloop/loopback-next/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/strongloop/loopback-next/git/refs{/sha}","trees_url":"https://api.github.com/repos/strongloop/loopback-next/git/trees{/sha}","statuses_url":"https://api.github.com/repos/strongloop/loopback-next/statuses/{sha}","languages_url":"https://api.github.com/repos/strongloop/loopback-next/languages","stargazers_url":"https://api.github.com/repos/strongloop/loopback-next/stargazers","contributors_url":"https://api.github.com/repos/strongloop/loopback-next/contributors","subscribers_url":"https://api.github.com/repos/strongloop/loopback-next/subscribers","subscription_url":"https://api.github.com/repos/strongloop/loopback-next/subscription","commits_url":"https://api.github.com/repos/strongloop/loopback-next/commits{/sha}","git_commits_url":"https://api.github.com/repos/strongloop/loopback-next/git/commits{/sha}","comments_url":"https://api.github.com/repos/strongloop/loopback-next/comments{/number}","issue_comment_url":"https://api.github.com/repos/strongloop/loopback-next/issues/comments{/number}","contents_url":"https://api.github.com/repos/strongloop/loopback-next/contents/{+path}","compare_url":"https://api.github.com/repos/strongloop/loopback-next/compare/{base}...{head}","merges_url":"https://api.github.com/repos/strongloop/loopback-next/merges","archive_url":"https://api.github.com/repos/strongloop/loopback-next/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/strongloop/loopback-next/downloads","issues_url":"https://api.github.com/repos/strongloop/loopback-next/issues{/number}","pulls_url":"https://api.github.com/repos/strongloop/loopback-next/pulls{/number}","milestones_url":"https://api.github.com/repos/strongloop/loopback-next/milestones{/number}","notifications_url":"https://api.github.com/repos/strongloop/loopback-next/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/strongloop/loopback-next/labels{/name}","releases_url":"https://api.github.com/repos/strongloop/loopback-next/releases{/id}","deployments_url":"https://api.github.com/repos/strongloop/loopback-next/deployments","created_at":"2017-01-09T17:27:14Z","updated_at":"2017-04-25T10:34:59Z","pushed_at":"2017-04-27T21:40:16Z","git_url":"git://github.com/strongloop/loopback-next.git","ssh_url":"git@github.com:strongloop/loopback-next.git","clone_url":"https://github.com/strongloop/loopback-next.git","svn_url":"https://github.com/strongloop/loopback-next","homepage":"http://loopback.io","size":446,"stargazers_count":28,"watchers_count":28,"language":"TypeScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":85,"forks":2,"open_issues":85,"watchers":28,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/strongloop/loopback-next/pulls/224"},"html":{"href":"https://github.com/strongloop/loopback-next/pull/224"},"issue":{"href":"https://api.github.com/repos/strongloop/loopback-next/issues/224"},"comments":{"href":"https://api.github.com/repos/strongloop/loopback-next/issues/224/comments"},"review_comments":{"href":"https://api.github.com/repos/strongloop/loopback-next/pulls/224/comments"},"review_comment":{"href":"https://api.github.com/repos/strongloop/loopback-next/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/strongloop/loopback-next/pulls/224/commits"},"statuses":{"href":"https://api.github.com/repos/strongloop/loopback-next/statuses/8e8ff1ff91373602483b2d6fe8782a3ee7021022"}}}}
{"actor":{"display_login":"superkhau"}}