{"action":"created","comment":{"url":"https://api.github.com/repos/aspnet/AzureSignalR-samples/pulls/comments/195650522","pull_request_review_id":129061815,"id":195650522,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NTY1MDUyMg==","diff_hunk":"@@ -0,0 +1,49 @@\n+﻿// Copyright (c) Microsoft. All rights reserved.\n+// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n+\n+using System;\n+using System.Collections;\n+using System.Collections.Generic;\n+using System.Linq;\n+using System.Security.Claims;\n+using System.Threading.Tasks;\n+using Microsoft.AspNetCore.Authentication;\n+using Microsoft.AspNetCore.Authentication.Cookies;\n+using Microsoft.AspNetCore.Mvc;\n+\n+namespace Microsoft.Azure.SignalR.Samples.AdvancedChatRoom\n+{\n+    [Route(\"cookie\")]\n+    public class CookieController : Controller\n+    {\n+        [HttpGet(\"login\")]\n+        public async Task<IActionResult> Login([FromQuery] string username, [FromQuery] string role)\n+        {\n+            if (string.IsNullOrEmpty(username) || string.IsNullOrEmpty(role))\n+            {\n+                return BadRequest(\"Username and role is required.\");\n+            }\n+\n+            if (!IsExistUser(username))\n+            {\n+                return Ok();","path":"samples/AdvancedChatRoom/Controller/CookieController.cs","position":29,"original_position":29,"commit_id":"1b52aad4e5f6bbdd2a5c1aa6571cf715fec1f2ba","original_commit_id":"1b52aad4e5f6bbdd2a5c1aa6571cf715fec1f2ba","user":{"login":"xscript","id":2300784,"node_id":"MDQ6VXNlcjIzMDA3ODQ=","avatar_url":"https://avatars2.githubusercontent.com/u/2300784?v=4","gravatar_id":"","url":"https://api.github.com/users/xscript","html_url":"https://github.com/xscript","followers_url":"https://api.github.com/users/xscript/followers","following_url":"https://api.github.com/users/xscript/following{/other_user}","gists_url":"https://api.github.com/users/xscript/gists{/gist_id}","starred_url":"https://api.github.com/users/xscript/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xscript/subscriptions","organizations_url":"https://api.github.com/users/xscript/orgs","repos_url":"https://api.github.com/users/xscript/repos","events_url":"https://api.github.com/users/xscript/events{/privacy}","received_events_url":"https://api.github.com/users/xscript/received_events","type":"User","site_admin":false},"body":"Shouldn't we return 401?","created_at":"2018-06-15T07:18:39Z","updated_at":"2018-06-15T07:18:39Z","html_url":"https://github.com/aspnet/AzureSignalR-samples/pull/33#discussion_r195650522","pull_request_url":"https://api.github.com/repos/aspnet/AzureSignalR-samples/pulls/33","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/aspnet/AzureSignalR-samples/pulls/comments/195650522"},"html":{"href":"https://github.com/aspnet/AzureSignalR-samples/pull/33#discussion_r195650522"},"pull_request":{"href":"https://api.github.com/repos/aspnet/AzureSignalR-samples/pulls/33"}}},"pull_request":{"url":"https://api.github.com/repos/aspnet/AzureSignalR-samples/pulls/33","id":194804904,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk0ODA0OTA0","html_url":"https://github.com/aspnet/AzureSignalR-samples/pull/33","diff_url":"https://github.com/aspnet/AzureSignalR-samples/pull/33.diff","patch_url":"https://github.com/aspnet/AzureSignalR-samples/pull/33.patch","issue_url":"https://api.github.com/repos/aspnet/AzureSignalR-samples/issues/33","number":33,"state":"open","locked":false,"title":"Add Advanced Chat Room","user":{"login":"zackliu","id":7847428,"node_id":"MDQ6VXNlcjc4NDc0Mjg=","avatar_url":"https://avatars0.githubusercontent.com/u/7847428?v=4","gravatar_id":"","url":"https://api.github.com/users/zackliu","html_url":"https://github.com/zackliu","followers_url":"https://api.github.com/users/zackliu/followers","following_url":"https://api.github.com/users/zackliu/following{/other_user}","gists_url":"https://api.github.com/users/zackliu/gists{/gist_id}","starred_url":"https://api.github.com/users/zackliu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zackliu/subscriptions","organizations_url":"https://api.github.com/users/zackliu/orgs","repos_url":"https://api.github.com/users/zackliu/repos","events_url":"https://api.github.com/users/zackliu/events{/privacy}","received_events_url":"https://api.github.com/users/zackliu/received_events","type":"User","site_admin":false},"body":"* Add a advanced chat room with groups / users / cookie-based auth / jwt-based auth\r\n* Add dockerfile which can build image according to the existing SDK version","created_at":"2018-06-14T07:46:01Z","updated_at":"2018-06-15T07:18:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6a58fd95ac77d4a05d03a2422896305854ad67bf","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/aspnet/AzureSignalR-samples/pulls/33/commits","review_comments_url":"https://api.github.com/repos/aspnet/AzureSignalR-samples/pulls/33/comments","review_comment_url":"https://api.github.com/repos/aspnet/AzureSignalR-samples/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aspnet/AzureSignalR-samples/issues/33/comments","statuses_url":"https://api.github.com/repos/aspnet/AzureSignalR-samples/statuses/1b52aad4e5f6bbdd2a5c1aa6571cf715fec1f2ba","head":{"label":"zackliu:full-sample","ref":"full-sample","sha":"1b52aad4e5f6bbdd2a5c1aa6571cf715fec1f2ba","user":{"login":"zackliu","id":7847428,"node_id":"MDQ6VXNlcjc4NDc0Mjg=","avatar_url":"https://avatars0.githubusercontent.com/u/7847428?v=4","gravatar_id":"","url":"https://api.github.com/users/zackliu","html_url":"https://github.com/zackliu","followers_url":"https://api.github.com/users/zackliu/followers","following_url":"https://api.github.com/users/zackliu/following{/other_user}","gists_url":"https://api.github.com/users/zackliu/gists{/gist_id}","starred_url":"https://api.github.com/users/zackliu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zackliu/subscriptions","organizations_url":"https://api.github.com/users/zackliu/orgs","repos_url":"https://api.github.com/users/zackliu/repos","events_url":"https://api.github.com/users/zackliu/events{/privacy}","received_events_url":"https://api.github.com/users/zackliu/received_events","type":"User","site_admin":false},"repo":{"id":135259364,"node_id":"MDEwOlJlcG9zaXRvcnkxMzUyNTkzNjQ=","name":"AzureSignalR-samples","full_name":"zackliu/AzureSignalR-samples","owner":{"login":"zackliu","id":7847428,"node_id":"MDQ6VXNlcjc4NDc0Mjg=","avatar_url":"https://avatars0.githubusercontent.com/u/7847428?v=4","gravatar_id":"","url":"https://api.github.com/users/zackliu","html_url":"https://github.com/zackliu","followers_url":"https://api.github.com/users/zackliu/followers","following_url":"https://api.github.com/users/zackliu/following{/other_user}","gists_url":"https://api.github.com/users/zackliu/gists{/gist_id}","starred_url":"https://api.github.com/users/zackliu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zackliu/subscriptions","organizations_url":"https://api.github.com/users/zackliu/orgs","repos_url":"https://api.github.com/users/zackliu/repos","events_url":"https://api.github.com/users/zackliu/events{/privacy}","received_events_url":"https://api.github.com/users/zackliu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zackliu/AzureSignalR-samples","description":"Code samples for Azure SignalR","fork":true,"url":"https://api.github.com/repos/zackliu/AzureSignalR-samples","forks_url":"https://api.github.com/repos/zackliu/AzureSignalR-samples/forks","keys_url":"https://api.github.com/repos/zackliu/AzureSignalR-samples/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zackliu/AzureSignalR-samples/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zackliu/AzureSignalR-samples/teams","hooks_url":"https://api.github.com/repos/zackliu/AzureSignalR-samples/hooks","issue_events_url":"https://api.github.com/repos/zackliu/AzureSignalR-samples/issues/events{/number}","events_url":"https://api.github.com/repos/zackliu/AzureSignalR-samples/events","assignees_url":"https://api.github.com/repos/zackliu/AzureSignalR-samples/assignees{/user}","branches_url":"https://api.github.com/repos/zackliu/AzureSignalR-samples/branches{/branch}","tags_url":"https://api.github.com/repos/zackliu/AzureSignalR-samples/tags","blobs_url":"https://api.github.com/repos/zackliu/AzureSignalR-samples/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zackliu/AzureSignalR-samples/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zackliu/AzureSignalR-samples/git/refs{/sha}","trees_url":"https://api.github.com/repos/zackliu/AzureSignalR-samples/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zackliu/AzureSignalR-samples/statuses/{sha}","languages_url":"https://api.github.com/repos/zackliu/AzureSignalR-samples/languages","stargazers_url":"https://api.github.com/repos/zackliu/AzureSignalR-samples/stargazers","contributors_url":"https://api.github.com/repos/zackliu/AzureSignalR-samples/contributors","subscribers_url":"https://api.github.com/repos/zackliu/AzureSignalR-samples/subscribers","subscription_url":"https://api.github.com/repos/zackliu/AzureSignalR-samples/subscription","commits_url":"https://api.github.com/repos/zackliu/AzureSignalR-samples/commits{/sha}","git_commits_url":"https://api.github.com/repos/zackliu/AzureSignalR-samples/git/commits{/sha}","comments_url":"https://api.github.com/repos/zackliu/AzureSignalR-samples/comments{/number}","issue_comment_url":"https://api.github.com/repos/zackliu/AzureSignalR-samples/issues/comments{/number}","contents_url":"https://api.github.com/repos/zackliu/AzureSignalR-samples/contents/{+path}","compare_url":"https://api.github.com/repos/zackliu/AzureSignalR-samples/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zackliu/AzureSignalR-samples/merges","archive_url":"https://api.github.com/repos/zackliu/AzureSignalR-samples/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zackliu/AzureSignalR-samples/downloads","issues_url":"https://api.github.com/repos/zackliu/AzureSignalR-samples/issues{/number}","pulls_url":"https://api.github.com/repos/zackliu/AzureSignalR-samples/pulls{/number}","milestones_url":"https://api.github.com/repos/zackliu/AzureSignalR-samples/milestones{/number}","notifications_url":"https://api.github.com/repos/zackliu/AzureSignalR-samples/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zackliu/AzureSignalR-samples/labels{/name}","releases_url":"https://api.github.com/repos/zackliu/AzureSignalR-samples/releases{/id}","deployments_url":"https://api.github.com/repos/zackliu/AzureSignalR-samples/deployments","created_at":"2018-05-29T07:39:54Z","updated_at":"2018-06-06T10:21:02Z","pushed_at":"2018-06-15T06:48:50Z","git_url":"git://github.com/zackliu/AzureSignalR-samples.git","ssh_url":"git@github.com:zackliu/AzureSignalR-samples.git","clone_url":"https://github.com/zackliu/AzureSignalR-samples.git","svn_url":"https://github.com/zackliu/AzureSignalR-samples","homepage":null,"size":1100,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"aspnet:master","ref":"master","sha":"05281a42ea4421b110abc70741013c1b01fa43f7","user":{"login":"aspnet","id":6476660,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY0NzY2NjA=","avatar_url":"https://avatars3.githubusercontent.com/u/6476660?v=4","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"repo":{"id":121077945,"node_id":"MDEwOlJlcG9zaXRvcnkxMjEwNzc5NDU=","name":"AzureSignalR-samples","full_name":"aspnet/AzureSignalR-samples","owner":{"login":"aspnet","id":6476660,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY0NzY2NjA=","avatar_url":"https://avatars3.githubusercontent.com/u/6476660?v=4","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aspnet/AzureSignalR-samples","description":"Code samples for Azure SignalR","fork":false,"url":"https://api.github.com/repos/aspnet/AzureSignalR-samples","forks_url":"https://api.github.com/repos/aspnet/AzureSignalR-samples/forks","keys_url":"https://api.github.com/repos/aspnet/AzureSignalR-samples/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aspnet/AzureSignalR-samples/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aspnet/AzureSignalR-samples/teams","hooks_url":"https://api.github.com/repos/aspnet/AzureSignalR-samples/hooks","issue_events_url":"https://api.github.com/repos/aspnet/AzureSignalR-samples/issues/events{/number}","events_url":"https://api.github.com/repos/aspnet/AzureSignalR-samples/events","assignees_url":"https://api.github.com/repos/aspnet/AzureSignalR-samples/assignees{/user}","branches_url":"https://api.github.com/repos/aspnet/AzureSignalR-samples/branches{/branch}","tags_url":"https://api.github.com/repos/aspnet/AzureSignalR-samples/tags","blobs_url":"https://api.github.com/repos/aspnet/AzureSignalR-samples/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aspnet/AzureSignalR-samples/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aspnet/AzureSignalR-samples/git/refs{/sha}","trees_url":"https://api.github.com/repos/aspnet/AzureSignalR-samples/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aspnet/AzureSignalR-samples/statuses/{sha}","languages_url":"https://api.github.com/repos/aspnet/AzureSignalR-samples/languages","stargazers_url":"https://api.github.com/repos/aspnet/AzureSignalR-samples/stargazers","contributors_url":"https://api.github.com/repos/aspnet/AzureSignalR-samples/contributors","subscribers_url":"https://api.github.com/repos/aspnet/AzureSignalR-samples/subscribers","subscription_url":"https://api.github.com/repos/aspnet/AzureSignalR-samples/subscription","commits_url":"https://api.github.com/repos/aspnet/AzureSignalR-samples/commits{/sha}","git_commits_url":"https://api.github.com/repos/aspnet/AzureSignalR-samples/git/commits{/sha}","comments_url":"https://api.github.com/repos/aspnet/AzureSignalR-samples/comments{/number}","issue_comment_url":"https://api.github.com/repos/aspnet/AzureSignalR-samples/issues/comments{/number}","contents_url":"https://api.github.com/repos/aspnet/AzureSignalR-samples/contents/{+path}","compare_url":"https://api.github.com/repos/aspnet/AzureSignalR-samples/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aspnet/AzureSignalR-samples/merges","archive_url":"https://api.github.com/repos/aspnet/AzureSignalR-samples/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aspnet/AzureSignalR-samples/downloads","issues_url":"https://api.github.com/repos/aspnet/AzureSignalR-samples/issues{/number}","pulls_url":"https://api.github.com/repos/aspnet/AzureSignalR-samples/pulls{/number}","milestones_url":"https://api.github.com/repos/aspnet/AzureSignalR-samples/milestones{/number}","notifications_url":"https://api.github.com/repos/aspnet/AzureSignalR-samples/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aspnet/AzureSignalR-samples/labels{/name}","releases_url":"https://api.github.com/repos/aspnet/AzureSignalR-samples/releases{/id}","deployments_url":"https://api.github.com/repos/aspnet/AzureSignalR-samples/deployments","created_at":"2018-02-11T02:59:43Z","updated_at":"2018-06-13T09:26:32Z","pushed_at":"2018-06-15T06:48:52Z","git_url":"git://github.com/aspnet/AzureSignalR-samples.git","ssh_url":"git@github.com:aspnet/AzureSignalR-samples.git","clone_url":"https://github.com/aspnet/AzureSignalR-samples.git","svn_url":"https://github.com/aspnet/AzureSignalR-samples","homepage":null,"size":1103,"stargazers_count":39,"watchers_count":39,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":23,"mirror_url":null,"archived":false,"open_issues_count":6,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":23,"open_issues":6,"watchers":39,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/aspnet/AzureSignalR-samples/pulls/33"},"html":{"href":"https://github.com/aspnet/AzureSignalR-samples/pull/33"},"issue":{"href":"https://api.github.com/repos/aspnet/AzureSignalR-samples/issues/33"},"comments":{"href":"https://api.github.com/repos/aspnet/AzureSignalR-samples/issues/33/comments"},"review_comments":{"href":"https://api.github.com/repos/aspnet/AzureSignalR-samples/pulls/33/comments"},"review_comment":{"href":"https://api.github.com/repos/aspnet/AzureSignalR-samples/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aspnet/AzureSignalR-samples/pulls/33/commits"},"statuses":{"href":"https://api.github.com/repos/aspnet/AzureSignalR-samples/statuses/1b52aad4e5f6bbdd2a5c1aa6571cf715fec1f2ba"}},"author_association":"NONE"}}
{"actor":{"display_login":"xscript"}}