{"action":"created","comment":{"url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/pulls/comments/167562594","pull_request_review_id":95797781,"id":167562594,"diff_hunk":"@@ -0,0 +1,34 @@\n+'use strict';\n+\n+import log = require('./log');\n+import _ = require('underscore');\n+import md5 = require('md5');\n+\n+var config = require('../../config/config.js');\n+\n+interface IStaticAuthUser {\n+  name: string;\n+  pass: string;\n+  groups: string[];\n+}\n+\n+export function authenticate(user: string, password: string, requiredGroup: string, cb: Function) {\n+\n+  log.info('Trying to authenticate', {user: user});\n+\n+  var userObject = _.findWhere<IStaticAuthUser, Object>(\n+    config.auth.static.users,\n+    { name: user, pass: md5(password) }\n+    );","path":"backend/src/staticAuth.ts","position":22,"original_position":22,"commit_id":"6446549b645143ce217143bd340a1e15c8041cc7","original_commit_id":"6446549b645143ce217143bd340a1e15c8041cc7","user":{"login":"Blizzara","id":1384385,"avatar_url":"https://avatars2.githubusercontent.com/u/1384385?v=4","gravatar_id":"","url":"https://api.github.com/users/Blizzara","html_url":"https://github.com/Blizzara","followers_url":"https://api.github.com/users/Blizzara/followers","following_url":"https://api.github.com/users/Blizzara/following{/other_user}","gists_url":"https://api.github.com/users/Blizzara/gists{/gist_id}","starred_url":"https://api.github.com/users/Blizzara/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Blizzara/subscriptions","organizations_url":"https://api.github.com/users/Blizzara/orgs","repos_url":"https://api.github.com/users/Blizzara/repos","events_url":"https://api.github.com/users/Blizzara/events{/privacy}","received_events_url":"https://api.github.com/users/Blizzara/received_events","type":"User","site_admin":false},"body":"Fix indent (-2 spaces), the closing brace should be on the same level as the line where the opening brace is.","created_at":"2018-02-12T14:00:37Z","updated_at":"2018-02-12T14:13:57Z","html_url":"https://github.com/teekkarispeksi/nappikauppa2/pull/109#discussion_r167562594","pull_request_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/pulls/109","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/pulls/comments/167562594"},"html":{"href":"https://github.com/teekkarispeksi/nappikauppa2/pull/109#discussion_r167562594"},"pull_request":{"href":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/pulls/109"}}},"pull_request":{"url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/pulls/109","id":168068248,"html_url":"https://github.com/teekkarispeksi/nappikauppa2/pull/109","diff_url":"https://github.com/teekkarispeksi/nappikauppa2/pull/109.diff","patch_url":"https://github.com/teekkarispeksi/nappikauppa2/pull/109.patch","issue_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/issues/109","number":109,"state":"open","locked":false,"title":"Update static auth","user":{"login":"OpaL2","id":22866662,"avatar_url":"https://avatars0.githubusercontent.com/u/22866662?v=4","gravatar_id":"","url":"https://api.github.com/users/OpaL2","html_url":"https://github.com/OpaL2","followers_url":"https://api.github.com/users/OpaL2/followers","following_url":"https://api.github.com/users/OpaL2/following{/other_user}","gists_url":"https://api.github.com/users/OpaL2/gists{/gist_id}","starred_url":"https://api.github.com/users/OpaL2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpaL2/subscriptions","organizations_url":"https://api.github.com/users/OpaL2/orgs","repos_url":"https://api.github.com/users/OpaL2/repos","events_url":"https://api.github.com/users/OpaL2/events{/privacy}","received_events_url":"https://api.github.com/users/OpaL2/received_events","type":"User","site_admin":false},"body":"## Content:\r\n* Add support for static authentication by using config files.\r\n* Add support for npm start in production server.\r\n* Remov some unneccecary files.\r\n* Update gitignore, now ignores tarballs.\r\n","created_at":"2018-02-08T19:42:21Z","updated_at":"2018-02-12T14:13:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"09c25d7f8e0ee488a92d646bc2198d1d58049570","assignee":{"login":"OpaL2","id":22866662,"avatar_url":"https://avatars0.githubusercontent.com/u/22866662?v=4","gravatar_id":"","url":"https://api.github.com/users/OpaL2","html_url":"https://github.com/OpaL2","followers_url":"https://api.github.com/users/OpaL2/followers","following_url":"https://api.github.com/users/OpaL2/following{/other_user}","gists_url":"https://api.github.com/users/OpaL2/gists{/gist_id}","starred_url":"https://api.github.com/users/OpaL2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpaL2/subscriptions","organizations_url":"https://api.github.com/users/OpaL2/orgs","repos_url":"https://api.github.com/users/OpaL2/repos","events_url":"https://api.github.com/users/OpaL2/events{/privacy}","received_events_url":"https://api.github.com/users/OpaL2/received_events","type":"User","site_admin":false},"assignees":[{"login":"OpaL2","id":22866662,"avatar_url":"https://avatars0.githubusercontent.com/u/22866662?v=4","gravatar_id":"","url":"https://api.github.com/users/OpaL2","html_url":"https://github.com/OpaL2","followers_url":"https://api.github.com/users/OpaL2/followers","following_url":"https://api.github.com/users/OpaL2/following{/other_user}","gists_url":"https://api.github.com/users/OpaL2/gists{/gist_id}","starred_url":"https://api.github.com/users/OpaL2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpaL2/subscriptions","organizations_url":"https://api.github.com/users/OpaL2/orgs","repos_url":"https://api.github.com/users/OpaL2/repos","events_url":"https://api.github.com/users/OpaL2/events{/privacy}","received_events_url":"https://api.github.com/users/OpaL2/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/pulls/109/commits","review_comments_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/pulls/109/comments","review_comment_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/issues/109/comments","statuses_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/statuses/6446549b645143ce217143bd340a1e15c8041cc7","head":{"label":"teekkarispeksi:update-static-auth","ref":"update-static-auth","sha":"6446549b645143ce217143bd340a1e15c8041cc7","user":{"login":"teekkarispeksi","id":3393770,"avatar_url":"https://avatars3.githubusercontent.com/u/3393770?v=4","gravatar_id":"","url":"https://api.github.com/users/teekkarispeksi","html_url":"https://github.com/teekkarispeksi","followers_url":"https://api.github.com/users/teekkarispeksi/followers","following_url":"https://api.github.com/users/teekkarispeksi/following{/other_user}","gists_url":"https://api.github.com/users/teekkarispeksi/gists{/gist_id}","starred_url":"https://api.github.com/users/teekkarispeksi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teekkarispeksi/subscriptions","organizations_url":"https://api.github.com/users/teekkarispeksi/orgs","repos_url":"https://api.github.com/users/teekkarispeksi/repos","events_url":"https://api.github.com/users/teekkarispeksi/events{/privacy}","received_events_url":"https://api.github.com/users/teekkarispeksi/received_events","type":"User","site_admin":false},"repo":{"id":39674726,"name":"nappikauppa2","full_name":"teekkarispeksi/nappikauppa2","owner":{"login":"teekkarispeksi","id":3393770,"avatar_url":"https://avatars3.githubusercontent.com/u/3393770?v=4","gravatar_id":"","url":"https://api.github.com/users/teekkarispeksi","html_url":"https://github.com/teekkarispeksi","followers_url":"https://api.github.com/users/teekkarispeksi/followers","following_url":"https://api.github.com/users/teekkarispeksi/following{/other_user}","gists_url":"https://api.github.com/users/teekkarispeksi/gists{/gist_id}","starred_url":"https://api.github.com/users/teekkarispeksi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teekkarispeksi/subscriptions","organizations_url":"https://api.github.com/users/teekkarispeksi/orgs","repos_url":"https://api.github.com/users/teekkarispeksi/repos","events_url":"https://api.github.com/users/teekkarispeksi/events{/privacy}","received_events_url":"https://api.github.com/users/teekkarispeksi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/teekkarispeksi/nappikauppa2","description":null,"fork":false,"url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2","forks_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/forks","keys_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/teams","hooks_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/hooks","issue_events_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/issues/events{/number}","events_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/events","assignees_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/assignees{/user}","branches_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/branches{/branch}","tags_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/tags","blobs_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/git/refs{/sha}","trees_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/statuses/{sha}","languages_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/languages","stargazers_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/stargazers","contributors_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/contributors","subscribers_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/subscribers","subscription_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/subscription","commits_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/commits{/sha}","git_commits_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/git/commits{/sha}","comments_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/comments{/number}","issue_comment_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/issues/comments{/number}","contents_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/contents/{+path}","compare_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/merges","archive_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/downloads","issues_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/issues{/number}","pulls_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/pulls{/number}","milestones_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/milestones{/number}","notifications_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/labels{/name}","releases_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/releases{/id}","deployments_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/deployments","created_at":"2015-07-25T06:15:12Z","updated_at":"2016-10-22T16:32:45Z","pushed_at":"2018-02-12T13:54:27Z","git_url":"git://github.com/teekkarispeksi/nappikauppa2.git","ssh_url":"git@github.com:teekkarispeksi/nappikauppa2.git","clone_url":"https://github.com/teekkarispeksi/nappikauppa2.git","svn_url":"https://github.com/teekkarispeksi/nappikauppa2","homepage":null,"size":41264,"stargazers_count":1,"watchers_count":1,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":9,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":2,"open_issues":9,"watchers":1,"default_branch":"master"}},"base":{"label":"teekkarispeksi:master","ref":"master","sha":"d4f134e8a7a666e87fa7574435fdb957caa2dfac","user":{"login":"teekkarispeksi","id":3393770,"avatar_url":"https://avatars3.githubusercontent.com/u/3393770?v=4","gravatar_id":"","url":"https://api.github.com/users/teekkarispeksi","html_url":"https://github.com/teekkarispeksi","followers_url":"https://api.github.com/users/teekkarispeksi/followers","following_url":"https://api.github.com/users/teekkarispeksi/following{/other_user}","gists_url":"https://api.github.com/users/teekkarispeksi/gists{/gist_id}","starred_url":"https://api.github.com/users/teekkarispeksi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teekkarispeksi/subscriptions","organizations_url":"https://api.github.com/users/teekkarispeksi/orgs","repos_url":"https://api.github.com/users/teekkarispeksi/repos","events_url":"https://api.github.com/users/teekkarispeksi/events{/privacy}","received_events_url":"https://api.github.com/users/teekkarispeksi/received_events","type":"User","site_admin":false},"repo":{"id":39674726,"name":"nappikauppa2","full_name":"teekkarispeksi/nappikauppa2","owner":{"login":"teekkarispeksi","id":3393770,"avatar_url":"https://avatars3.githubusercontent.com/u/3393770?v=4","gravatar_id":"","url":"https://api.github.com/users/teekkarispeksi","html_url":"https://github.com/teekkarispeksi","followers_url":"https://api.github.com/users/teekkarispeksi/followers","following_url":"https://api.github.com/users/teekkarispeksi/following{/other_user}","gists_url":"https://api.github.com/users/teekkarispeksi/gists{/gist_id}","starred_url":"https://api.github.com/users/teekkarispeksi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teekkarispeksi/subscriptions","organizations_url":"https://api.github.com/users/teekkarispeksi/orgs","repos_url":"https://api.github.com/users/teekkarispeksi/repos","events_url":"https://api.github.com/users/teekkarispeksi/events{/privacy}","received_events_url":"https://api.github.com/users/teekkarispeksi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/teekkarispeksi/nappikauppa2","description":null,"fork":false,"url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2","forks_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/forks","keys_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/teams","hooks_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/hooks","issue_events_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/issues/events{/number}","events_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/events","assignees_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/assignees{/user}","branches_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/branches{/branch}","tags_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/tags","blobs_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/git/refs{/sha}","trees_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/statuses/{sha}","languages_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/languages","stargazers_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/stargazers","contributors_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/contributors","subscribers_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/subscribers","subscription_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/subscription","commits_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/commits{/sha}","git_commits_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/git/commits{/sha}","comments_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/comments{/number}","issue_comment_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/issues/comments{/number}","contents_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/contents/{+path}","compare_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/merges","archive_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/downloads","issues_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/issues{/number}","pulls_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/pulls{/number}","milestones_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/milestones{/number}","notifications_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/labels{/name}","releases_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/releases{/id}","deployments_url":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/deployments","created_at":"2015-07-25T06:15:12Z","updated_at":"2016-10-22T16:32:45Z","pushed_at":"2018-02-12T13:54:27Z","git_url":"git://github.com/teekkarispeksi/nappikauppa2.git","ssh_url":"git@github.com:teekkarispeksi/nappikauppa2.git","clone_url":"https://github.com/teekkarispeksi/nappikauppa2.git","svn_url":"https://github.com/teekkarispeksi/nappikauppa2","homepage":null,"size":41264,"stargazers_count":1,"watchers_count":1,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":9,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":2,"open_issues":9,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/pulls/109"},"html":{"href":"https://github.com/teekkarispeksi/nappikauppa2/pull/109"},"issue":{"href":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/issues/109"},"comments":{"href":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/issues/109/comments"},"review_comments":{"href":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/pulls/109/comments"},"review_comment":{"href":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/pulls/109/commits"},"statuses":{"href":"https://api.github.com/repos/teekkarispeksi/nappikauppa2/statuses/6446549b645143ce217143bd340a1e15c8041cc7"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"Blizzara"}}