本插件允许你将 OAuth 与你的 Minecraft 服务器关联,强制任何加入服务器的玩家通过 OAuth 进行注册,这有助于将服务器访问权限限制为特定组织(如学校或公司)的成员。
我不会提供关于注册 OAuth 应用的帮助或支持。你可以参考以下两份指南,但请务必阅读下方针对 Microsoft 和 Google 的详细信息区块以获取额外信息。这两份指南分别是:Microsoft 指南 以及 Google 指南中仅前置条件部分。
如果在公司账户使用过程中,你发现某一步骤似乎无法完成,可能是你的组织已为你屏蔽了该功能。在这种情况下,要么请求他们允许你使用该功能,要么使用个人账户创建注册。
Microsoft 额外信息:
在“注册应用程序”部分,如果你是在个人账户上创建,请点击“任何组织目录中的账户和个人 Microsoft 账户”。如果你是在与你希望验证用户来源的组织关联的账户上创建,首先通过点击右上角的设置按钮并检查希望注册下的组织是否标记为带有绿色对勾的“当前”,来确认你是在组织内注册应用。然后,按照指南创建应用程序时,选择“仅限此组织目录中的账户”。记住你所选的内容以便后续使用!你无需设置“重定向 URI”,请跳过该部分。在“配置平台设置”部分,选择“移动和桌面应用程序”并勾选 。接着,在下方将“允许公共客户端流”设置为“是”并点击保存。之后,返回应用程序概览(就在较小的搜索框下方)。将“应用程序(客户端)ID”复制到配置中“microsoft-settings”下的 microsoft client ID 中。如果你之前是在个人账户上创建的,请在插件的配置部分将“tenant”设置为“common”。否则,复制同一页面上的“目录(租户)ID”并将“tenant”设置为该值。
Google 额外信息:
如果它要求你创建一个项目并提供在特定组织内创建的选项,请选择你希望允许登录 Minecraft 服务器的组织。在进行“OAuth 同意屏幕”配置时,如果你能够在组织内注册项目,应选择“内部”。如果不能,则选择外部。在第一页上,配置所有必填字段,避免填写其他字段,因为其中一些有额外的要求。在作用域中,点击“添加或删除作用域”,并选择以 userinfo.email、userinfo.profile 和 openid 结尾的那些。根据我的经验,这三个应该位于顶部且在“API”列中为空。不要选择除这些之外的任何作用域。现在向下滚动并按下“更新”。如果你操作正确,那三个作用域应显示在“您的非敏感作用域”下,而其他两个部分应为空。你可以在接下来的两个屏幕上直接按“保存并继续”和“返回仪表板”。现在你将能够按照指南中的说明创建凭据。将 Client ID 和 Client secret 复制到插件配置中的“google-settings”下。最后,返回“OAuth 同意屏幕”菜单,如果“发布状态”下显示为“测试”,请按下方的“发布应用”按钮,然后按“确认”。此时,“发布状态”应显示为“生产中”。
功能:
- 支持 SQLite 和 MySQL 用于数据存储。
- 通过 Google 或 Microsoft 进行 OAuth 认证
- 可自定义踢出消息
- 设置特定的邮箱后缀以阻止随机登录
- 在配置中将特定用户列入白名单,使其能够绕过 OAuth 要求
This plugin allows you to link up Oauth to your minecraft server to force any player who joins to register through Oauth, which may be helpful for limiting access to a server to only people in a specific organization (such as a school, or a company).
I will not provide help or support with registering Oauth applications. You may follow these two guides, but additionally please read the spoiler blocks below corresponding to microsoft/google for additional information. The two guides: Microsoft Guide and JUST THE PREREQUISITES SECTION of the Google Guide.
If at any point while using a company account you find a step which seems to be impossible, your organization may have blocked that feature for you. In that case, either ask that they allow for you to use that feature or create the registration on a personal account.
Microsoft Additional Info:
In the "Register an Application" section, if you are creating this on a personal account, click "Accounts in any organizational directory and personal Microsoft accounts." If you are creating it on an account which is linked to the organization which you want to verify users are coming from, first verify that you are registering the app within the organization by clicking the settings button in the top right and checking that the organization you want to register under is marked as "Current" with a green check mark. Then, creating the application as per the guide, select "Accounts in this organizational directory only." Remember what you selected for later! You do not need to set a "redirect URI" and please skip that section. In the "Configure platform settings" section, select "Mobile and desktop applications" and click the checkbox. Then, down below, set "Allow public client flows" to Yes and click save. After that, go back to the application overview (just below the smaller search box). Copy the "Application (client) ID" into the microsoft client ID in the config under "microsoft-settings". If you were creating this on a personal account earlier, in the config section for the plugin set the "tenant" to "common". Otherwise, copy the "Directory (tenant) ID" on the same page and set "tenant" to that value.
Google Additional Info:
If it asks you to create a project and gives you the option of creating it within a certain organization, select the organization you wish to allow to log in to the Minecraft server. When going through the "OAuth consent screen" configuration, if you were able to register your project within the organization, you should select "Internal." If you can't, just select external. On the first page, configure all of the mandatory input fields and avoid doing any other ones as some have additional requirements. In scopes, press "Add or remove scopes" and select the ones ending in userinfo.email, userinfo.profile, and openid. In my experience those three should be at the top and be blank in the "API" column. Do not select ANY SCOPES besides those ones. Now scroll down and press "Update". If you did it right, those 3 scopes should show under "Your non-sensitive scopes" and both the other sections should be empty. You can just press "Save and Continue" and "Back to Dashboard" on the next two screens. Now you will be able to create the credentials as it says in the guide. Copy the Client ID and Client secret into the plugins config under "google-settings". Finally, go back to the "OAuth consent screen" menu and if under "Publishing Status" it says "Testing" press the "Publish App" button below it, and then press "Confirm". It should now say the "Publishing Status" is "In production."
Features:
- Supports SQLite and MySQL for storage of data.
- Oauth through either Google or Microsoft
- Customizable kick message
- Set a specific email suffix to block random logins
- Whitelist specific users in the config to be able to bypass the Oauth requirement
评论 0
登录后参与评分
还没有评论,来抢沙发吧