{"action":"created","comment":{"url":"https://api.github.com/repos/bs-community/yggdrasil-api/pulls/comments/206576683","pull_request_review_id":142014445,"id":206576683,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNjU3NjY4Mw==","diff_hunk":"@@ -108,7 +117,31 @@ public function hasJoinedServer(Request $request)\n             }\n         }\n \n+        if (option('ygg_mojang_forwarding') == 'blessing') {\n+            $mojangResult = hasJoinedServerMojang($name, $serverId, $ip);\n+            if ($mojangResult != null) return response()->json()->setContent($mojangResult);\n+        }\n+\n         Log::info(\"Player [$name] was not in the server [$serverId]\");\n         return response('')->setStatusCode(204);\n     }\n }\n+\n+function hasJoinedServerMojang(string $name, string $serverId, $ip) {","path":"src/Controllers/SessionController.php","position":46,"original_position":46,"commit_id":"5c142c7ef08d6a0c7738841ddf283f8c1a498696","original_commit_id":"5c142c7ef08d6a0c7738841ddf283f8c1a498696","user":{"login":"printempw","id":11206497,"node_id":"MDQ6VXNlcjExMjA2NDk3","avatar_url":"https://avatars2.githubusercontent.com/u/11206497?v=4","gravatar_id":"","url":"https://api.github.com/users/printempw","html_url":"https://github.com/printempw","followers_url":"https://api.github.com/users/printempw/followers","following_url":"https://api.github.com/users/printempw/following{/other_user}","gists_url":"https://api.github.com/users/printempw/gists{/gist_id}","starred_url":"https://api.github.com/users/printempw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/printempw/subscriptions","organizations_url":"https://api.github.com/users/printempw/orgs","repos_url":"https://api.github.com/users/printempw/repos","events_url":"https://api.github.com/users/printempw/events{/privacy}","received_events_url":"https://api.github.com/users/printempw/received_events","type":"User","site_admin":false},"body":"不，这里的 `ip` 是由 Minecraft 服务端提供的（Query String 中），并不是 BS 获取的。既然服务端的 `hasJoined` 请求本来就带了 `ip` 参数，那我们也应该原样转发过去，和 BS 是否验证 IP 地址没关系吧？","created_at":"2018-07-31T15:32:50Z","updated_at":"2018-07-31T15:32:50Z","html_url":"https://github.com/bs-community/yggdrasil-api/pull/6#discussion_r206576683","pull_request_url":"https://api.github.com/repos/bs-community/yggdrasil-api/pulls/6","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/bs-community/yggdrasil-api/pulls/comments/206576683"},"html":{"href":"https://github.com/bs-community/yggdrasil-api/pull/6#discussion_r206576683"},"pull_request":{"href":"https://api.github.com/repos/bs-community/yggdrasil-api/pulls/6"}},"in_reply_to_id":206562469},"pull_request":{"url":"https://api.github.com/repos/bs-community/yggdrasil-api/pulls/6","id":205128577,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA1MTI4NTc3","html_url":"https://github.com/bs-community/yggdrasil-api/pull/6","diff_url":"https://github.com/bs-community/yggdrasil-api/pull/6.diff","patch_url":"https://github.com/bs-community/yggdrasil-api/pull/6.patch","issue_url":"https://api.github.com/repos/bs-community/yggdrasil-api/issues/6","number":6,"state":"open","locked":false,"title":"Enable Mojang offical auth forwarding. (#4)","user":{"login":"cqjjjzr","id":6622592,"node_id":"MDQ6VXNlcjY2MjI1OTI=","avatar_url":"https://avatars3.githubusercontent.com/u/6622592?v=4","gravatar_id":"","url":"https://api.github.com/users/cqjjjzr","html_url":"https://github.com/cqjjjzr","followers_url":"https://api.github.com/users/cqjjjzr/followers","following_url":"https://api.github.com/users/cqjjjzr/following{/other_user}","gists_url":"https://api.github.com/users/cqjjjzr/gists{/gist_id}","starred_url":"https://api.github.com/users/cqjjjzr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cqjjjzr/subscriptions","organizations_url":"https://api.github.com/users/cqjjjzr/orgs","repos_url":"https://api.github.com/users/cqjjjzr/repos","events_url":"https://api.github.com/users/cqjjjzr/events{/privacy}","received_events_url":"https://api.github.com/users/cqjjjzr/received_events","type":"User","site_admin":false},"body":"添加了一个配置项。皮肤问题暂时忽略\r\n\r\nSigned-off-by: Charlie Jiang <cqjjjzr@126.com>","created_at":"2018-07-31T14:17:10Z","updated_at":"2018-07-31T15:32:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"37759ba2ba105cf8a71c453f934748adecd3855d","assignee":{"login":"printempw","id":11206497,"node_id":"MDQ6VXNlcjExMjA2NDk3","avatar_url":"https://avatars2.githubusercontent.com/u/11206497?v=4","gravatar_id":"","url":"https://api.github.com/users/printempw","html_url":"https://github.com/printempw","followers_url":"https://api.github.com/users/printempw/followers","following_url":"https://api.github.com/users/printempw/following{/other_user}","gists_url":"https://api.github.com/users/printempw/gists{/gist_id}","starred_url":"https://api.github.com/users/printempw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/printempw/subscriptions","organizations_url":"https://api.github.com/users/printempw/orgs","repos_url":"https://api.github.com/users/printempw/repos","events_url":"https://api.github.com/users/printempw/events{/privacy}","received_events_url":"https://api.github.com/users/printempw/received_events","type":"User","site_admin":false},"assignees":[{"login":"printempw","id":11206497,"node_id":"MDQ6VXNlcjExMjA2NDk3","avatar_url":"https://avatars2.githubusercontent.com/u/11206497?v=4","gravatar_id":"","url":"https://api.github.com/users/printempw","html_url":"https://github.com/printempw","followers_url":"https://api.github.com/users/printempw/followers","following_url":"https://api.github.com/users/printempw/following{/other_user}","gists_url":"https://api.github.com/users/printempw/gists{/gist_id}","starred_url":"https://api.github.com/users/printempw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/printempw/subscriptions","organizations_url":"https://api.github.com/users/printempw/orgs","repos_url":"https://api.github.com/users/printempw/repos","events_url":"https://api.github.com/users/printempw/events{/privacy}","received_events_url":"https://api.github.com/users/printempw/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":836919181,"node_id":"MDU6TGFiZWw4MzY5MTkxODE=","url":"https://api.github.com/repos/bs-community/yggdrasil-api/labels/enhancement","name":"enhancement","color":"a2eeef","default":true}],"milestone":null,"commits_url":"https://api.github.com/repos/bs-community/yggdrasil-api/pulls/6/commits","review_comments_url":"https://api.github.com/repos/bs-community/yggdrasil-api/pulls/6/comments","review_comment_url":"https://api.github.com/repos/bs-community/yggdrasil-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bs-community/yggdrasil-api/issues/6/comments","statuses_url":"https://api.github.com/repos/bs-community/yggdrasil-api/statuses/5c142c7ef08d6a0c7738841ddf283f8c1a498696","head":{"label":"cqjjjzr:master","ref":"master","sha":"5c142c7ef08d6a0c7738841ddf283f8c1a498696","user":{"login":"cqjjjzr","id":6622592,"node_id":"MDQ6VXNlcjY2MjI1OTI=","avatar_url":"https://avatars3.githubusercontent.com/u/6622592?v=4","gravatar_id":"","url":"https://api.github.com/users/cqjjjzr","html_url":"https://github.com/cqjjjzr","followers_url":"https://api.github.com/users/cqjjjzr/followers","following_url":"https://api.github.com/users/cqjjjzr/following{/other_user}","gists_url":"https://api.github.com/users/cqjjjzr/gists{/gist_id}","starred_url":"https://api.github.com/users/cqjjjzr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cqjjjzr/subscriptions","organizations_url":"https://api.github.com/users/cqjjjzr/orgs","repos_url":"https://api.github.com/users/cqjjjzr/repos","events_url":"https://api.github.com/users/cqjjjzr/events{/privacy}","received_events_url":"https://api.github.com/users/cqjjjzr/received_events","type":"User","site_admin":false},"repo":{"id":142991545,"node_id":"MDEwOlJlcG9zaXRvcnkxNDI5OTE1NDU=","name":"yggdrasil-api","full_name":"cqjjjzr/yggdrasil-api","owner":{"login":"cqjjjzr","id":6622592,"node_id":"MDQ6VXNlcjY2MjI1OTI=","avatar_url":"https://avatars3.githubusercontent.com/u/6622592?v=4","gravatar_id":"","url":"https://api.github.com/users/cqjjjzr","html_url":"https://github.com/cqjjjzr","followers_url":"https://api.github.com/users/cqjjjzr/followers","following_url":"https://api.github.com/users/cqjjjzr/following{/other_user}","gists_url":"https://api.github.com/users/cqjjjzr/gists{/gist_id}","starred_url":"https://api.github.com/users/cqjjjzr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cqjjjzr/subscriptions","organizations_url":"https://api.github.com/users/cqjjjzr/orgs","repos_url":"https://api.github.com/users/cqjjjzr/repos","events_url":"https://api.github.com/users/cqjjjzr/events{/privacy}","received_events_url":"https://api.github.com/users/cqjjjzr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cqjjjzr/yggdrasil-api","description":"Custom yggdrasil api for making a fake Mojang authentication service. Shipped as a plugin for Blessing Skin.","fork":true,"url":"https://api.github.com/repos/cqjjjzr/yggdrasil-api","forks_url":"https://api.github.com/repos/cqjjjzr/yggdrasil-api/forks","keys_url":"https://api.github.com/repos/cqjjjzr/yggdrasil-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cqjjjzr/yggdrasil-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cqjjjzr/yggdrasil-api/teams","hooks_url":"https://api.github.com/repos/cqjjjzr/yggdrasil-api/hooks","issue_events_url":"https://api.github.com/repos/cqjjjzr/yggdrasil-api/issues/events{/number}","events_url":"https://api.github.com/repos/cqjjjzr/yggdrasil-api/events","assignees_url":"https://api.github.com/repos/cqjjjzr/yggdrasil-api/assignees{/user}","branches_url":"https://api.github.com/repos/cqjjjzr/yggdrasil-api/branches{/branch}","tags_url":"https://api.github.com/repos/cqjjjzr/yggdrasil-api/tags","blobs_url":"https://api.github.com/repos/cqjjjzr/yggdrasil-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cqjjjzr/yggdrasil-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cqjjjzr/yggdrasil-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/cqjjjzr/yggdrasil-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cqjjjzr/yggdrasil-api/statuses/{sha}","languages_url":"https://api.github.com/repos/cqjjjzr/yggdrasil-api/languages","stargazers_url":"https://api.github.com/repos/cqjjjzr/yggdrasil-api/stargazers","contributors_url":"https://api.github.com/repos/cqjjjzr/yggdrasil-api/contributors","subscribers_url":"https://api.github.com/repos/cqjjjzr/yggdrasil-api/subscribers","subscription_url":"https://api.github.com/repos/cqjjjzr/yggdrasil-api/subscription","commits_url":"https://api.github.com/repos/cqjjjzr/yggdrasil-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/cqjjjzr/yggdrasil-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/cqjjjzr/yggdrasil-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/cqjjjzr/yggdrasil-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/cqjjjzr/yggdrasil-api/contents/{+path}","compare_url":"https://api.github.com/repos/cqjjjzr/yggdrasil-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cqjjjzr/yggdrasil-api/merges","archive_url":"https://api.github.com/repos/cqjjjzr/yggdrasil-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cqjjjzr/yggdrasil-api/downloads","issues_url":"https://api.github.com/repos/cqjjjzr/yggdrasil-api/issues{/number}","pulls_url":"https://api.github.com/repos/cqjjjzr/yggdrasil-api/pulls{/number}","milestones_url":"https://api.github.com/repos/cqjjjzr/yggdrasil-api/milestones{/number}","notifications_url":"https://api.github.com/repos/cqjjjzr/yggdrasil-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cqjjjzr/yggdrasil-api/labels{/name}","releases_url":"https://api.github.com/repos/cqjjjzr/yggdrasil-api/releases{/id}","deployments_url":"https://api.github.com/repos/cqjjjzr/yggdrasil-api/deployments","created_at":"2018-07-31T09:19:09Z","updated_at":"2018-07-31T14:43:42Z","pushed_at":"2018-07-31T14:43:40Z","git_url":"git://github.com/cqjjjzr/yggdrasil-api.git","ssh_url":"git@github.com:cqjjjzr/yggdrasil-api.git","clone_url":"https://github.com/cqjjjzr/yggdrasil-api.git","svn_url":"https://github.com/cqjjjzr/yggdrasil-api","homepage":null,"size":615,"stargazers_count":0,"watchers_count":0,"language":"PHP","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":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"bs-community:master","ref":"master","sha":"c78a2a7df64be9798d40017dea642513b3ffe39f","user":{"login":"bs-community","id":37259779,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3MjU5Nzc5","avatar_url":"https://avatars1.githubusercontent.com/u/37259779?v=4","gravatar_id":"","url":"https://api.github.com/users/bs-community","html_url":"https://github.com/bs-community","followers_url":"https://api.github.com/users/bs-community/followers","following_url":"https://api.github.com/users/bs-community/following{/other_user}","gists_url":"https://api.github.com/users/bs-community/gists{/gist_id}","starred_url":"https://api.github.com/users/bs-community/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bs-community/subscriptions","organizations_url":"https://api.github.com/users/bs-community/orgs","repos_url":"https://api.github.com/users/bs-community/repos","events_url":"https://api.github.com/users/bs-community/events{/privacy}","received_events_url":"https://api.github.com/users/bs-community/received_events","type":"Organization","site_admin":false},"repo":{"id":121476887,"node_id":"MDEwOlJlcG9zaXRvcnkxMjE0NzY4ODc=","name":"yggdrasil-api","full_name":"bs-community/yggdrasil-api","owner":{"login":"bs-community","id":37259779,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3MjU5Nzc5","avatar_url":"https://avatars1.githubusercontent.com/u/37259779?v=4","gravatar_id":"","url":"https://api.github.com/users/bs-community","html_url":"https://github.com/bs-community","followers_url":"https://api.github.com/users/bs-community/followers","following_url":"https://api.github.com/users/bs-community/following{/other_user}","gists_url":"https://api.github.com/users/bs-community/gists{/gist_id}","starred_url":"https://api.github.com/users/bs-community/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bs-community/subscriptions","organizations_url":"https://api.github.com/users/bs-community/orgs","repos_url":"https://api.github.com/users/bs-community/repos","events_url":"https://api.github.com/users/bs-community/events{/privacy}","received_events_url":"https://api.github.com/users/bs-community/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bs-community/yggdrasil-api","description":"Custom yggdrasil api for making a fake Mojang authentication service. Shipped as a plugin for Blessing Skin.","fork":false,"url":"https://api.github.com/repos/bs-community/yggdrasil-api","forks_url":"https://api.github.com/repos/bs-community/yggdrasil-api/forks","keys_url":"https://api.github.com/repos/bs-community/yggdrasil-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bs-community/yggdrasil-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bs-community/yggdrasil-api/teams","hooks_url":"https://api.github.com/repos/bs-community/yggdrasil-api/hooks","issue_events_url":"https://api.github.com/repos/bs-community/yggdrasil-api/issues/events{/number}","events_url":"https://api.github.com/repos/bs-community/yggdrasil-api/events","assignees_url":"https://api.github.com/repos/bs-community/yggdrasil-api/assignees{/user}","branches_url":"https://api.github.com/repos/bs-community/yggdrasil-api/branches{/branch}","tags_url":"https://api.github.com/repos/bs-community/yggdrasil-api/tags","blobs_url":"https://api.github.com/repos/bs-community/yggdrasil-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bs-community/yggdrasil-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bs-community/yggdrasil-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/bs-community/yggdrasil-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bs-community/yggdrasil-api/statuses/{sha}","languages_url":"https://api.github.com/repos/bs-community/yggdrasil-api/languages","stargazers_url":"https://api.github.com/repos/bs-community/yggdrasil-api/stargazers","contributors_url":"https://api.github.com/repos/bs-community/yggdrasil-api/contributors","subscribers_url":"https://api.github.com/repos/bs-community/yggdrasil-api/subscribers","subscription_url":"https://api.github.com/repos/bs-community/yggdrasil-api/subscription","commits_url":"https://api.github.com/repos/bs-community/yggdrasil-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/bs-community/yggdrasil-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/bs-community/yggdrasil-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/bs-community/yggdrasil-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/bs-community/yggdrasil-api/contents/{+path}","compare_url":"https://api.github.com/repos/bs-community/yggdrasil-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bs-community/yggdrasil-api/merges","archive_url":"https://api.github.com/repos/bs-community/yggdrasil-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bs-community/yggdrasil-api/downloads","issues_url":"https://api.github.com/repos/bs-community/yggdrasil-api/issues{/number}","pulls_url":"https://api.github.com/repos/bs-community/yggdrasil-api/pulls{/number}","milestones_url":"https://api.github.com/repos/bs-community/yggdrasil-api/milestones{/number}","notifications_url":"https://api.github.com/repos/bs-community/yggdrasil-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bs-community/yggdrasil-api/labels{/name}","releases_url":"https://api.github.com/repos/bs-community/yggdrasil-api/releases{/id}","deployments_url":"https://api.github.com/repos/bs-community/yggdrasil-api/deployments","created_at":"2018-02-14T06:02:50Z","updated_at":"2018-07-30T14:52:51Z","pushed_at":"2018-07-31T14:43:41Z","git_url":"git://github.com/bs-community/yggdrasil-api.git","ssh_url":"git@github.com:bs-community/yggdrasil-api.git","clone_url":"https://github.com/bs-community/yggdrasil-api.git","svn_url":"https://github.com/bs-community/yggdrasil-api","homepage":null,"size":151,"stargazers_count":14,"watchers_count":14,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":1,"open_issues":3,"watchers":14,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bs-community/yggdrasil-api/pulls/6"},"html":{"href":"https://github.com/bs-community/yggdrasil-api/pull/6"},"issue":{"href":"https://api.github.com/repos/bs-community/yggdrasil-api/issues/6"},"comments":{"href":"https://api.github.com/repos/bs-community/yggdrasil-api/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/bs-community/yggdrasil-api/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/bs-community/yggdrasil-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bs-community/yggdrasil-api/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/bs-community/yggdrasil-api/statuses/5c142c7ef08d6a0c7738841ddf283f8c1a498696"}},"author_association":"NONE"}}
{"actor":{"display_login":"printempw"}}