{"action":"created","comment":{"url":"https://api.github.com/repos/google/boardgame.io/pulls/comments/188897597","pull_request_review_id":120961088,"id":188897597,"diff_hunk":"@@ -0,0 +1,123 @@\n+/*\n+ * Copyright 2018 The boardgame.io Authors\n+ *\n+ * Use of this source code is governed by a MIT-style\n+ * license that can be found in the LICENSE file or at\n+ * https://opensource.org/licenses/MIT.\n+ */\n+\n+import React from 'react';\n+import { Client } from 'boardgame.io/react';\n+import TicTacToe from '../game';\n+import Board from './board';\n+import PropTypes from 'prop-types';\n+\n+const App = Client({\n+  game: TicTacToe,\n+  board: Board,\n+  debug: false,\n+  multiplayer: true,\n+});\n+\n+class AuthenticatedClient extends React.Component {","path":"examples/react/modules/tic-tac-toe/components/authenticated.js","position":22,"original_position":22,"commit_id":"2d5f7141596a04ff2f713d4bda8176ead7ec77f6","original_commit_id":"2d5f7141596a04ff2f713d4bda8176ead7ec77f6","user":{"login":"nicolodavis","id":236078,"avatar_url":"https://avatars1.githubusercontent.com/u/236078?v=4","gravatar_id":"","url":"https://api.github.com/users/nicolodavis","html_url":"https://github.com/nicolodavis","followers_url":"https://api.github.com/users/nicolodavis/followers","following_url":"https://api.github.com/users/nicolodavis/following{/other_user}","gists_url":"https://api.github.com/users/nicolodavis/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolodavis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolodavis/subscriptions","organizations_url":"https://api.github.com/users/nicolodavis/orgs","repos_url":"https://api.github.com/users/nicolodavis/repos","events_url":"https://api.github.com/users/nicolodavis/events{/privacy}","received_events_url":"https://api.github.com/users/nicolodavis/received_events","type":"User","site_admin":false},"body":"Looks like the game server this is talking to still uses an unauthenticated game, right? I think it would be more useful to manually create an authenticated game using `db.set` in `examples/react/server.js` to demonstrate that this works (i.e. changing the credentials should result in the move not working; at the moment it seems to be a no-op).","created_at":"2018-05-17T09:41:24Z","updated_at":"2018-05-17T09:44:21Z","html_url":"https://github.com/google/boardgame.io/pull/189#discussion_r188897597","pull_request_url":"https://api.github.com/repos/google/boardgame.io/pulls/189","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/google/boardgame.io/pulls/comments/188897597"},"html":{"href":"https://github.com/google/boardgame.io/pull/189#discussion_r188897597"},"pull_request":{"href":"https://api.github.com/repos/google/boardgame.io/pulls/189"}}},"pull_request":{"url":"https://api.github.com/repos/google/boardgame.io/pulls/189","id":184188059,"html_url":"https://github.com/google/boardgame.io/pull/189","diff_url":"https://github.com/google/boardgame.io/pull/189.diff","patch_url":"https://github.com/google/boardgame.io/pull/189.patch","issue_url":"https://api.github.com/repos/google/boardgame.io/issues/189","number":189,"state":"open","locked":false,"title":"lobby API support","user":{"login":"scally","id":48156,"avatar_url":"https://avatars0.githubusercontent.com/u/48156?v=4","gravatar_id":"","url":"https://api.github.com/users/scally","html_url":"https://github.com/scally","followers_url":"https://api.github.com/users/scally/followers","following_url":"https://api.github.com/users/scally/following{/other_user}","gists_url":"https://api.github.com/users/scally/gists{/gist_id}","starred_url":"https://api.github.com/users/scally/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scally/subscriptions","organizations_url":"https://api.github.com/users/scally/orgs","repos_url":"https://api.github.com/users/scally/repos","events_url":"https://api.github.com/users/scally/events{/privacy}","received_events_url":"https://api.github.com/users/scally/received_events","type":"User","site_admin":false},"body":"This is the initial implementation of lobby API support #171 \r\n\r\nIt has two new APIs available by default on `WebSocket port + 1`.\r\n\r\n**`/games/:id/create`**: creates a new authenticated game for a game named `id`.\r\n\r\nAccepts one parameter: `numPlayers`, which is required & indicates how many credentials to create.\r\n\r\nReturns `gameID`, which is the ID of the newly created game instance.\r\n\r\n**`/game_instances/:id/join`**: allows a player to join the given game instance `id`.\r\n\r\nAccepts two parameters, both required:\r\n`playerID`: the ordinal player in the game that is being joined (0, 1...)\r\n`playerName`: the display name of the player joining the game.\r\n\r\nReturns `playerCredentials` which is the token this player will require to authenticate their actions in the future.\r\n\r\nAll actions for an authenticated game require an additional payload field: `credentials`, which must be the given secret associated to the player.\r\n\r\nA future PR will create a simple website to handle calling out to this API for projects that would prefer a zero-config solution.\r\n\r\n#### Things still needed\r\n* [x] Accepting a prop on the Client object to send a secret with all actions.\r\n* [x] New example app.\r\n* [x] Test coverage\r\n* [x] Cleanup/refactoring\r\n* [x] API documentation\r\n\r\n#### Checklist\r\n\r\n* [x] Use a separate branch in your local repo (not `master`).\r\n* [x] Test coverage is 100% (or you have a story for why it's ok).","created_at":"2018-04-25T23:15:57Z","updated_at":"2018-05-17T09:44:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4193670032747c919cba4b1f4e04ee21907a7cb7","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/google/boardgame.io/pulls/189/commits","review_comments_url":"https://api.github.com/repos/google/boardgame.io/pulls/189/comments","review_comment_url":"https://api.github.com/repos/google/boardgame.io/pulls/comments{/number}","comments_url":"https://api.github.com/repos/google/boardgame.io/issues/189/comments","statuses_url":"https://api.github.com/repos/google/boardgame.io/statuses/2d5f7141596a04ff2f713d4bda8176ead7ec77f6","head":{"label":"scally:lobby-api","ref":"lobby-api","sha":"2d5f7141596a04ff2f713d4bda8176ead7ec77f6","user":{"login":"scally","id":48156,"avatar_url":"https://avatars0.githubusercontent.com/u/48156?v=4","gravatar_id":"","url":"https://api.github.com/users/scally","html_url":"https://github.com/scally","followers_url":"https://api.github.com/users/scally/followers","following_url":"https://api.github.com/users/scally/following{/other_user}","gists_url":"https://api.github.com/users/scally/gists{/gist_id}","starred_url":"https://api.github.com/users/scally/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scally/subscriptions","organizations_url":"https://api.github.com/users/scally/orgs","repos_url":"https://api.github.com/users/scally/repos","events_url":"https://api.github.com/users/scally/events{/privacy}","received_events_url":"https://api.github.com/users/scally/received_events","type":"User","site_admin":false},"repo":{"id":126534775,"name":"boardgame.io","full_name":"scally/boardgame.io","owner":{"login":"scally","id":48156,"avatar_url":"https://avatars0.githubusercontent.com/u/48156?v=4","gravatar_id":"","url":"https://api.github.com/users/scally","html_url":"https://github.com/scally","followers_url":"https://api.github.com/users/scally/followers","following_url":"https://api.github.com/users/scally/following{/other_user}","gists_url":"https://api.github.com/users/scally/gists{/gist_id}","starred_url":"https://api.github.com/users/scally/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scally/subscriptions","organizations_url":"https://api.github.com/users/scally/orgs","repos_url":"https://api.github.com/users/scally/repos","events_url":"https://api.github.com/users/scally/events{/privacy}","received_events_url":"https://api.github.com/users/scally/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/scally/boardgame.io","description":"State management and more for turn based games.","fork":true,"url":"https://api.github.com/repos/scally/boardgame.io","forks_url":"https://api.github.com/repos/scally/boardgame.io/forks","keys_url":"https://api.github.com/repos/scally/boardgame.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scally/boardgame.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scally/boardgame.io/teams","hooks_url":"https://api.github.com/repos/scally/boardgame.io/hooks","issue_events_url":"https://api.github.com/repos/scally/boardgame.io/issues/events{/number}","events_url":"https://api.github.com/repos/scally/boardgame.io/events","assignees_url":"https://api.github.com/repos/scally/boardgame.io/assignees{/user}","branches_url":"https://api.github.com/repos/scally/boardgame.io/branches{/branch}","tags_url":"https://api.github.com/repos/scally/boardgame.io/tags","blobs_url":"https://api.github.com/repos/scally/boardgame.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scally/boardgame.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scally/boardgame.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/scally/boardgame.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scally/boardgame.io/statuses/{sha}","languages_url":"https://api.github.com/repos/scally/boardgame.io/languages","stargazers_url":"https://api.github.com/repos/scally/boardgame.io/stargazers","contributors_url":"https://api.github.com/repos/scally/boardgame.io/contributors","subscribers_url":"https://api.github.com/repos/scally/boardgame.io/subscribers","subscription_url":"https://api.github.com/repos/scally/boardgame.io/subscription","commits_url":"https://api.github.com/repos/scally/boardgame.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/scally/boardgame.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/scally/boardgame.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/scally/boardgame.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/scally/boardgame.io/contents/{+path}","compare_url":"https://api.github.com/repos/scally/boardgame.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scally/boardgame.io/merges","archive_url":"https://api.github.com/repos/scally/boardgame.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scally/boardgame.io/downloads","issues_url":"https://api.github.com/repos/scally/boardgame.io/issues{/number}","pulls_url":"https://api.github.com/repos/scally/boardgame.io/pulls{/number}","milestones_url":"https://api.github.com/repos/scally/boardgame.io/milestones{/number}","notifications_url":"https://api.github.com/repos/scally/boardgame.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scally/boardgame.io/labels{/name}","releases_url":"https://api.github.com/repos/scally/boardgame.io/releases{/id}","deployments_url":"https://api.github.com/repos/scally/boardgame.io/deployments","created_at":"2018-03-23T20:17:26Z","updated_at":"2018-04-18T00:32:54Z","pushed_at":"2018-05-17T08:58:54Z","git_url":"git://github.com/scally/boardgame.io.git","ssh_url":"git@github.com:scally/boardgame.io.git","clone_url":"https://github.com/scally/boardgame.io.git","svn_url":"https://github.com/scally/boardgame.io","homepage":"http://boardgame.io/","size":3314,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"google:master","ref":"master","sha":"9c6c41a38c679291bcf2b8f90f94157872d6d54c","user":{"login":"google","id":1342004,"avatar_url":"https://avatars1.githubusercontent.com/u/1342004?v=4","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"repo":{"id":111614342,"name":"boardgame.io","full_name":"google/boardgame.io","owner":{"login":"google","id":1342004,"avatar_url":"https://avatars1.githubusercontent.com/u/1342004?v=4","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/google/boardgame.io","description":"State management and more for turn based games.","fork":false,"url":"https://api.github.com/repos/google/boardgame.io","forks_url":"https://api.github.com/repos/google/boardgame.io/forks","keys_url":"https://api.github.com/repos/google/boardgame.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/google/boardgame.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/google/boardgame.io/teams","hooks_url":"https://api.github.com/repos/google/boardgame.io/hooks","issue_events_url":"https://api.github.com/repos/google/boardgame.io/issues/events{/number}","events_url":"https://api.github.com/repos/google/boardgame.io/events","assignees_url":"https://api.github.com/repos/google/boardgame.io/assignees{/user}","branches_url":"https://api.github.com/repos/google/boardgame.io/branches{/branch}","tags_url":"https://api.github.com/repos/google/boardgame.io/tags","blobs_url":"https://api.github.com/repos/google/boardgame.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/google/boardgame.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/google/boardgame.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/google/boardgame.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/google/boardgame.io/statuses/{sha}","languages_url":"https://api.github.com/repos/google/boardgame.io/languages","stargazers_url":"https://api.github.com/repos/google/boardgame.io/stargazers","contributors_url":"https://api.github.com/repos/google/boardgame.io/contributors","subscribers_url":"https://api.github.com/repos/google/boardgame.io/subscribers","subscription_url":"https://api.github.com/repos/google/boardgame.io/subscription","commits_url":"https://api.github.com/repos/google/boardgame.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/google/boardgame.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/google/boardgame.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/google/boardgame.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/google/boardgame.io/contents/{+path}","compare_url":"https://api.github.com/repos/google/boardgame.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/google/boardgame.io/merges","archive_url":"https://api.github.com/repos/google/boardgame.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/google/boardgame.io/downloads","issues_url":"https://api.github.com/repos/google/boardgame.io/issues{/number}","pulls_url":"https://api.github.com/repos/google/boardgame.io/pulls{/number}","milestones_url":"https://api.github.com/repos/google/boardgame.io/milestones{/number}","notifications_url":"https://api.github.com/repos/google/boardgame.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/google/boardgame.io/labels{/name}","releases_url":"https://api.github.com/repos/google/boardgame.io/releases{/id}","deployments_url":"https://api.github.com/repos/google/boardgame.io/deployments","created_at":"2017-11-21T23:47:35Z","updated_at":"2018-05-17T08:58:08Z","pushed_at":"2018-05-17T08:58:55Z","git_url":"git://github.com/google/boardgame.io.git","ssh_url":"git@github.com:google/boardgame.io.git","clone_url":"https://github.com/google/boardgame.io.git","svn_url":"https://github.com/google/boardgame.io","homepage":"http://boardgame.io/","size":3160,"stargazers_count":6241,"watchers_count":6241,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":true,"forks_count":311,"mirror_url":null,"archived":false,"open_issues_count":23,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":311,"open_issues":23,"watchers":6241,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/google/boardgame.io/pulls/189"},"html":{"href":"https://github.com/google/boardgame.io/pull/189"},"issue":{"href":"https://api.github.com/repos/google/boardgame.io/issues/189"},"comments":{"href":"https://api.github.com/repos/google/boardgame.io/issues/189/comments"},"review_comments":{"href":"https://api.github.com/repos/google/boardgame.io/pulls/189/comments"},"review_comment":{"href":"https://api.github.com/repos/google/boardgame.io/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/google/boardgame.io/pulls/189/commits"},"statuses":{"href":"https://api.github.com/repos/google/boardgame.io/statuses/2d5f7141596a04ff2f713d4bda8176ead7ec77f6"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"nicolodavis"}}