{"action":"created","comment":{"url":"https://api.github.com/repos/verloop/accuaman/pulls/comments/103378931","pull_request_review_id":24161417,"id":103378931,"diff_hunk":"@@ -37,10 +40,31 @@ func Serve() {\n \tif err != nil {\n \t\tlog.Fatalf(\"Cannot connect to notifire server %s\", err)\n \t}\n-\tapi.RegisterAccuamanServiceServer(s, &AccuamanServer{\n+\tgoogleOAuthProvider := GoogleOAuthProvider{\n+\t\tClientID: viper.GetString(\"GOOGLE_OAUTH_CLIENT_ID\"),\n+\t\tClientSecret: viper.GetString(\"GOOGLE_OAUTH_CLIENT_SECRET\"),\n+\t\tIssuerURL: \"https://accounts.google.com\",\n+\t\t// TODO: Change this to proper domain\n+\t\tRedirectURL: \"http://127.0.0.1:8889/oauth2callback/google\",\n+\t}\n+\tgoogleOAuthProvider.SetGoogleOAuthProvider(context.Background())\n+\tsecureCookie := securecookie.New([]byte(viper.GetString(\"SECRET_SALT\")), nil)\n+\taccuamanServer := &AccuamanServer{\n \t\tEntityClient:   entityClient,\n \t\tNotifireClient: notifireClient,\n-\t})\n+\t\tGoogleAuthProvider: googleOAuthProvider,\n+\t\tSecureCookie: secureCookie,\n+\t}\n+\tapi.RegisterAccuamanServiceServer(s, accuamanServer)\n+\n+\tgo func() {\n+\t\tmux := http.NewServeMux()\n+\t\tmux.Handle(\"/oauth2login/google\", http.HandlerFunc(accuamanServer.GoogleOAuthRedirectHandler))\n+\t\tmux.Handle(\"/oauth2callback/google\", http.HandlerFunc(accuamanServer.GoogleOAuthTokenHandler))\n+\t\t// TODO: Change this to proper domain\n+\t\thttp.ListenAndServe(\"127.0.0.1:8889\", mux)","path":"src/server/server.go","position":57,"original_position":57,"commit_id":"03c1ad2d01ad0c57d4ac9b837ce391b283cd90e3","original_commit_id":"03c1ad2d01ad0c57d4ac9b837ce391b283cd90e3","user":{"login":"ofpiyush","id":292174,"avatar_url":"https://avatars.githubusercontent.com/u/292174?v=3","gravatar_id":"","url":"https://api.github.com/users/ofpiyush","html_url":"https://github.com/ofpiyush","followers_url":"https://api.github.com/users/ofpiyush/followers","following_url":"https://api.github.com/users/ofpiyush/following{/other_user}","gists_url":"https://api.github.com/users/ofpiyush/gists{/gist_id}","starred_url":"https://api.github.com/users/ofpiyush/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ofpiyush/subscriptions","organizations_url":"https://api.github.com/users/ofpiyush/orgs","repos_url":"https://api.github.com/users/ofpiyush/repos","events_url":"https://api.github.com/users/ofpiyush/events{/privacy}","received_events_url":"https://api.github.com/users/ofpiyush/received_events","type":"User","site_admin":false},"body":"graceful shutdowns and error logging?","created_at":"2017-02-28T05:19:43Z","updated_at":"2017-02-28T05:20:00Z","html_url":"https://github.com/verloop/accuaman/pull/5#discussion_r103378931","pull_request_url":"https://api.github.com/repos/verloop/accuaman/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/verloop/accuaman/pulls/comments/103378931"},"html":{"href":"https://github.com/verloop/accuaman/pull/5#discussion_r103378931"},"pull_request":{"href":"https://api.github.com/repos/verloop/accuaman/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/verloop/accuaman/pulls/5","id":108093989,"html_url":"https://github.com/verloop/accuaman/pull/5","diff_url":"https://github.com/verloop/accuaman/pull/5.diff","patch_url":"https://github.com/verloop/accuaman/pull/5.patch","issue_url":"https://api.github.com/repos/verloop/accuaman/issues/5","number":5,"state":"open","locked":false,"title":"Add Google OAuth login","user":{"login":"avinassh","id":640792,"avatar_url":"https://avatars.githubusercontent.com/u/640792?v=3","gravatar_id":"","url":"https://api.github.com/users/avinassh","html_url":"https://github.com/avinassh","followers_url":"https://api.github.com/users/avinassh/followers","following_url":"https://api.github.com/users/avinassh/following{/other_user}","gists_url":"https://api.github.com/users/avinassh/gists{/gist_id}","starred_url":"https://api.github.com/users/avinassh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avinassh/subscriptions","organizations_url":"https://api.github.com/users/avinassh/orgs","repos_url":"https://api.github.com/users/avinassh/repos","events_url":"https://api.github.com/users/avinassh/events{/privacy}","received_events_url":"https://api.github.com/users/avinassh/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-02-27T11:18:40Z","updated_at":"2017-02-28T05:20:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5fdbbf52d02cf26ad85ce09ff1f6f9dcdc9b30e1","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/verloop/accuaman/pulls/5/commits","review_comments_url":"https://api.github.com/repos/verloop/accuaman/pulls/5/comments","review_comment_url":"https://api.github.com/repos/verloop/accuaman/pulls/comments{/number}","comments_url":"https://api.github.com/repos/verloop/accuaman/issues/5/comments","statuses_url":"https://api.github.com/repos/verloop/accuaman/statuses/03c1ad2d01ad0c57d4ac9b837ce391b283cd90e3","head":{"label":"verloop:oauth-google","ref":"oauth-google","sha":"03c1ad2d01ad0c57d4ac9b837ce391b283cd90e3","user":{"login":"verloop","id":20638103,"avatar_url":"https://avatars.githubusercontent.com/u/20638103?v=3","gravatar_id":"","url":"https://api.github.com/users/verloop","html_url":"https://github.com/verloop","followers_url":"https://api.github.com/users/verloop/followers","following_url":"https://api.github.com/users/verloop/following{/other_user}","gists_url":"https://api.github.com/users/verloop/gists{/gist_id}","starred_url":"https://api.github.com/users/verloop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/verloop/subscriptions","organizations_url":"https://api.github.com/users/verloop/orgs","repos_url":"https://api.github.com/users/verloop/repos","events_url":"https://api.github.com/users/verloop/events{/privacy}","received_events_url":"https://api.github.com/users/verloop/received_events","type":"Organization","site_admin":false},"repo":{"id":79476461,"name":"accuaman","full_name":"verloop/accuaman","owner":{"login":"verloop","id":20638103,"avatar_url":"https://avatars.githubusercontent.com/u/20638103?v=3","gravatar_id":"","url":"https://api.github.com/users/verloop","html_url":"https://github.com/verloop","followers_url":"https://api.github.com/users/verloop/followers","following_url":"https://api.github.com/users/verloop/following{/other_user}","gists_url":"https://api.github.com/users/verloop/gists{/gist_id}","starred_url":"https://api.github.com/users/verloop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/verloop/subscriptions","organizations_url":"https://api.github.com/users/verloop/orgs","repos_url":"https://api.github.com/users/verloop/repos","events_url":"https://api.github.com/users/verloop/events{/privacy}","received_events_url":"https://api.github.com/users/verloop/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/verloop/accuaman","description":null,"fork":false,"url":"https://api.github.com/repos/verloop/accuaman","forks_url":"https://api.github.com/repos/verloop/accuaman/forks","keys_url":"https://api.github.com/repos/verloop/accuaman/keys{/key_id}","collaborators_url":"https://api.github.com/repos/verloop/accuaman/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/verloop/accuaman/teams","hooks_url":"https://api.github.com/repos/verloop/accuaman/hooks","issue_events_url":"https://api.github.com/repos/verloop/accuaman/issues/events{/number}","events_url":"https://api.github.com/repos/verloop/accuaman/events","assignees_url":"https://api.github.com/repos/verloop/accuaman/assignees{/user}","branches_url":"https://api.github.com/repos/verloop/accuaman/branches{/branch}","tags_url":"https://api.github.com/repos/verloop/accuaman/tags","blobs_url":"https://api.github.com/repos/verloop/accuaman/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/verloop/accuaman/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/verloop/accuaman/git/refs{/sha}","trees_url":"https://api.github.com/repos/verloop/accuaman/git/trees{/sha}","statuses_url":"https://api.github.com/repos/verloop/accuaman/statuses/{sha}","languages_url":"https://api.github.com/repos/verloop/accuaman/languages","stargazers_url":"https://api.github.com/repos/verloop/accuaman/stargazers","contributors_url":"https://api.github.com/repos/verloop/accuaman/contributors","subscribers_url":"https://api.github.com/repos/verloop/accuaman/subscribers","subscription_url":"https://api.github.com/repos/verloop/accuaman/subscription","commits_url":"https://api.github.com/repos/verloop/accuaman/commits{/sha}","git_commits_url":"https://api.github.com/repos/verloop/accuaman/git/commits{/sha}","comments_url":"https://api.github.com/repos/verloop/accuaman/comments{/number}","issue_comment_url":"https://api.github.com/repos/verloop/accuaman/issues/comments{/number}","contents_url":"https://api.github.com/repos/verloop/accuaman/contents/{+path}","compare_url":"https://api.github.com/repos/verloop/accuaman/compare/{base}...{head}","merges_url":"https://api.github.com/repos/verloop/accuaman/merges","archive_url":"https://api.github.com/repos/verloop/accuaman/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/verloop/accuaman/downloads","issues_url":"https://api.github.com/repos/verloop/accuaman/issues{/number}","pulls_url":"https://api.github.com/repos/verloop/accuaman/pulls{/number}","milestones_url":"https://api.github.com/repos/verloop/accuaman/milestones{/number}","notifications_url":"https://api.github.com/repos/verloop/accuaman/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/verloop/accuaman/labels{/name}","releases_url":"https://api.github.com/repos/verloop/accuaman/releases{/id}","deployments_url":"https://api.github.com/repos/verloop/accuaman/deployments","created_at":"2017-01-19T17:18:51Z","updated_at":"2017-01-22T08:59:28Z","pushed_at":"2017-02-27T11:18:40Z","git_url":"git://github.com/verloop/accuaman.git","ssh_url":"git@github.com:verloop/accuaman.git","clone_url":"https://github.com/verloop/accuaman.git","svn_url":"https://github.com/verloop/accuaman","homepage":null,"size":36,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"verloop:master","ref":"master","sha":"667db20601a2ea6563d80383f3fe6b221dee8a19","user":{"login":"verloop","id":20638103,"avatar_url":"https://avatars.githubusercontent.com/u/20638103?v=3","gravatar_id":"","url":"https://api.github.com/users/verloop","html_url":"https://github.com/verloop","followers_url":"https://api.github.com/users/verloop/followers","following_url":"https://api.github.com/users/verloop/following{/other_user}","gists_url":"https://api.github.com/users/verloop/gists{/gist_id}","starred_url":"https://api.github.com/users/verloop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/verloop/subscriptions","organizations_url":"https://api.github.com/users/verloop/orgs","repos_url":"https://api.github.com/users/verloop/repos","events_url":"https://api.github.com/users/verloop/events{/privacy}","received_events_url":"https://api.github.com/users/verloop/received_events","type":"Organization","site_admin":false},"repo":{"id":79476461,"name":"accuaman","full_name":"verloop/accuaman","owner":{"login":"verloop","id":20638103,"avatar_url":"https://avatars.githubusercontent.com/u/20638103?v=3","gravatar_id":"","url":"https://api.github.com/users/verloop","html_url":"https://github.com/verloop","followers_url":"https://api.github.com/users/verloop/followers","following_url":"https://api.github.com/users/verloop/following{/other_user}","gists_url":"https://api.github.com/users/verloop/gists{/gist_id}","starred_url":"https://api.github.com/users/verloop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/verloop/subscriptions","organizations_url":"https://api.github.com/users/verloop/orgs","repos_url":"https://api.github.com/users/verloop/repos","events_url":"https://api.github.com/users/verloop/events{/privacy}","received_events_url":"https://api.github.com/users/verloop/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/verloop/accuaman","description":null,"fork":false,"url":"https://api.github.com/repos/verloop/accuaman","forks_url":"https://api.github.com/repos/verloop/accuaman/forks","keys_url":"https://api.github.com/repos/verloop/accuaman/keys{/key_id}","collaborators_url":"https://api.github.com/repos/verloop/accuaman/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/verloop/accuaman/teams","hooks_url":"https://api.github.com/repos/verloop/accuaman/hooks","issue_events_url":"https://api.github.com/repos/verloop/accuaman/issues/events{/number}","events_url":"https://api.github.com/repos/verloop/accuaman/events","assignees_url":"https://api.github.com/repos/verloop/accuaman/assignees{/user}","branches_url":"https://api.github.com/repos/verloop/accuaman/branches{/branch}","tags_url":"https://api.github.com/repos/verloop/accuaman/tags","blobs_url":"https://api.github.com/repos/verloop/accuaman/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/verloop/accuaman/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/verloop/accuaman/git/refs{/sha}","trees_url":"https://api.github.com/repos/verloop/accuaman/git/trees{/sha}","statuses_url":"https://api.github.com/repos/verloop/accuaman/statuses/{sha}","languages_url":"https://api.github.com/repos/verloop/accuaman/languages","stargazers_url":"https://api.github.com/repos/verloop/accuaman/stargazers","contributors_url":"https://api.github.com/repos/verloop/accuaman/contributors","subscribers_url":"https://api.github.com/repos/verloop/accuaman/subscribers","subscription_url":"https://api.github.com/repos/verloop/accuaman/subscription","commits_url":"https://api.github.com/repos/verloop/accuaman/commits{/sha}","git_commits_url":"https://api.github.com/repos/verloop/accuaman/git/commits{/sha}","comments_url":"https://api.github.com/repos/verloop/accuaman/comments{/number}","issue_comment_url":"https://api.github.com/repos/verloop/accuaman/issues/comments{/number}","contents_url":"https://api.github.com/repos/verloop/accuaman/contents/{+path}","compare_url":"https://api.github.com/repos/verloop/accuaman/compare/{base}...{head}","merges_url":"https://api.github.com/repos/verloop/accuaman/merges","archive_url":"https://api.github.com/repos/verloop/accuaman/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/verloop/accuaman/downloads","issues_url":"https://api.github.com/repos/verloop/accuaman/issues{/number}","pulls_url":"https://api.github.com/repos/verloop/accuaman/pulls{/number}","milestones_url":"https://api.github.com/repos/verloop/accuaman/milestones{/number}","notifications_url":"https://api.github.com/repos/verloop/accuaman/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/verloop/accuaman/labels{/name}","releases_url":"https://api.github.com/repos/verloop/accuaman/releases{/id}","deployments_url":"https://api.github.com/repos/verloop/accuaman/deployments","created_at":"2017-01-19T17:18:51Z","updated_at":"2017-01-22T08:59:28Z","pushed_at":"2017-02-27T11:18:40Z","git_url":"git://github.com/verloop/accuaman.git","ssh_url":"git@github.com:verloop/accuaman.git","clone_url":"https://github.com/verloop/accuaman.git","svn_url":"https://github.com/verloop/accuaman","homepage":null,"size":36,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/verloop/accuaman/pulls/5"},"html":{"href":"https://github.com/verloop/accuaman/pull/5"},"issue":{"href":"https://api.github.com/repos/verloop/accuaman/issues/5"},"comments":{"href":"https://api.github.com/repos/verloop/accuaman/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/verloop/accuaman/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/verloop/accuaman/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/verloop/accuaman/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/verloop/accuaman/statuses/03c1ad2d01ad0c57d4ac9b837ce391b283cd90e3"}}}}
{"actor":{"display_login":"ofpiyush"}}