Alternative Authentication
Alternative Authentication 是一个服务端模组,允许多个第三方或自定义认证服务器与 Mojang 的认证服务共存。默认情况下,已配置两个提供商:Mojang 和 Ely.by。你可以自由添加、移除或重新排序它们。
要求:
server.properties中设置为online-mode=true- 建议设置
enforce-secure-profile=false,因为通过第三方提供商加入的玩家没有签名的聊天密钥
仅限服务端。 在客户端使用第三方认证提供商的玩家需要兼容的启动器或注入器。
功能
- ⚙️ 可配置的认证提供商列表。
- ? 玩家加入服务器时的顺序提供商回退机制
- ? 可选的回退防止功能:如果用户名存在于某个提供商但认证失败,则不再尝试其他提供商。
- ? 支持通过第三方皮肤服务器获取玩家纹理(皮肤和披风)
- ? 跨所有已配置提供商的白名单支持
工作原理
加入服务器
当玩家连接时,按顺序尝试每个已配置的提供商,直到有一个成功验证会话。如果没有提供商认证成功,玩家将无法访问。
如果启用了 preventFallbackIfPlayerExists,并且在当前提供商上找到了玩家的用户名但认证失败,则不会尝试进一步的提供商。这可以防止注册在回退服务上的用户冒充早期提供商中的账户。
白名单
当将玩家添加到白名单时,按顺序查询每个提供商,直到将用户名解析为 UUID。如果未在任何提供商上找到该玩家,则无法将其添加。检查提供商的顺序由配置文件中的 providers 列表决定。
如果两个玩家在提供商之间共享相同的用户名怎么办?
默认情况下,第一个解析用户名的提供商获胜。如果你需要为存在于非主要提供商上的用户名玩家添加白名单,请临时重新排序 providers 列表,并使用 /whitelist add 手动添加他们。
配置
配置文件会在首次启动时自动创建于 config/alternative-auth.json。
configVersion
内部架构版本。由模组自动管理,请勿手动编辑此值。
debugMode
当设为 true 时,在认证和白名单操作期间会向控制台写入详细日志。有助于故障排除。默认禁用。
preventFallbackIfPlayerExists
当设为 true 时,如果在当前提供商上找到用户名但认证失败,则停止提供商链。防止通过回退服务进行用户名欺骗,拥有仅属于回退服务的唯一用户名的非正版玩家不受影响。默认禁用。
providers
有序排列的认证提供商列表。每个条目支持以下字段:
| 字段 | 必需 | 描述 |
|---|---|---|
name |
✅ | 提供商的显示名称 |
checkUrl |
✅ | 会话验证端点,在玩家加入服务器时查询 |
profileUrl |
✅ | 单个用户名到 UUID 查找端点,用于白名单操作 |
profilesUrl |
✅ | 批量用户名到 UUID 查找端点 |
propertyUrl |
❌ | 用于获取玩家属性(如皮肤和披风)的端点。使用 {0} 表示玩家用户名,使用 {1} 表示其 UUID |
{
"configVersion": 1,
"debugMode": false,
"preventFallbackIfPlayerExists": false,
"providers": [
{
"name": "Mojang",
"checkUrl": "https://sessionserver.mojang.com/session/minecraft/hasJoined",
"profileUrl": "https://api.minecraftservices.com/minecraft/profile/lookup/name/",
"profilesUrl": "https://api.minecraftservices.com/minecraft/profile/lookup/bulk/byname"
},
{
"name": "Ely.by",
"checkUrl": "https://authserver.ely.by/session/hasJoined",
"profileUrl": "https://authserver.ely.by/api/users/profiles/minecraft/",
"profilesUrl": "https://authserver.ely.by/api/profiles/minecraft",
"propertyUrl": "http://skinsystem.ely.by/textures/signed/{0}"
}
]
}
常见问题
Q: 无法加入服务器,“Invalid signature for profile public key”
A: 在你的服务器上安装 No Chat Reports。建议在客户端也安装,但不是必须的。
Q: 是否支持 Forge 或 NeoForge?
A: 计划支持 NeoForge。
Q: 模组何时会更新到最新的 Minecraft 版本?
A: 模组针对最新的稳定版本发布,并根据时间情况更新。暂不计划支持快照版本。
Q: 我发现了错误、有建议,或者模组工作不正常
A: 欢迎在 GitHub 上提交 Issue!
Alternative Authentication
Alternative Authentication is a server-side mod that allows multiple third-party or custom authentication servers to coexist alongside Mojang's. By default, two providers are configured: Mojang and Ely.by. You can add, remove, or reorder them freely.
Requirements:
online-mode=trueinserver.propertiesenforce-secure-profile=falseis recommended, players joining via third-party providers don't have signed chat keys
Server-side only. Players using a third-party auth provider on the client need a compatible launcher or injector.
Features
- ⚙️ Configurable list of authentication providers.
- ? Sequential provider fallback when a player joins the server
- ? Optional fallback prevention: if a username exists on a provider but authentication fails, further providers are not tried.
- ? Player texture support (skin and cape) via third-party skin servers
- ? Whitelist support across all configured providers
How It Works
Joining the Server
When a player connects, each configured provider is tried in order until one successfully authenticates the session. If no provider succeeds, the player is denied access.
If preventFallbackIfPlayerExists is enabled and a player's username is found on a provider but authentication fails, no further providers are attempted. This prevents a user registered on a fallback service from impersonating an account on an earlier provider.
Whitelist
When a player is added to the whitelist, each provider is queried in order until the username is resolved to a UUID. If the player is not found on any provider, they cannot be added. The order in which providers are checked is determined by the providers list in the config.
What if two players share the same username across providers?
By default, the first provider to resolve the username wins. If you need to whitelist a player whose username exists on a non-primary provider, temporarily reorder the providers list and add them manually with /whitelist add.
Configuration
The config file is created automatically at config/alternative-auth.json on first launch.
configVersion
The internal schema version. Managed automatically by the mod, do not edit this manually.
debugMode
When true, detailed logs are written to the console during authentication and whitelist operations. Useful for troubleshooting. Disabled by default.
preventFallbackIfPlayerExists
When true, stops the provider chain if a username is found on the current provider but authentication fails. Prevents username spoofing via fallback services, non-premium players with usernames unique to a fallback service are not affected. Disabled by default.
providers
The ordered list of authentication providers. Each entry supports the following fields:
| Field | Required | Description |
|---|---|---|
name |
✅ | Display name for the provider |
checkUrl |
✅ | Session validation endpoint, queried when a player joins the server |
profileUrl |
✅ | Single username to UUID lookup endpoint, used for whitelist operations |
profilesUrl |
✅ | Batch username to UUID lookup endpoint |
propertyUrl |
❌ | Endpoint for fetching player properties such as skin and cape. Use {0} for the player's username and {1} for their UUID |
{
"configVersion": 1,
"debugMode": false,
"preventFallbackIfPlayerExists": false,
"providers": [
{
"name": "Mojang",
"checkUrl": "https://sessionserver.mojang.com/session/minecraft/hasJoined",
"profileUrl": "https://api.minecraftservices.com/minecraft/profile/lookup/name/",
"profilesUrl": "https://api.minecraftservices.com/minecraft/profile/lookup/bulk/byname"
},
{
"name": "Ely.by",
"checkUrl": "https://authserver.ely.by/session/hasJoined",
"profileUrl": "https://authserver.ely.by/api/users/profiles/minecraft/",
"profilesUrl": "https://authserver.ely.by/api/profiles/minecraft",
"propertyUrl": "http://skinsystem.ely.by/textures/signed/{0}"
}
]
}
FAQ
Q: Can't join the server, "Invalid signature for profile public key"
A: Install No Chat Reports on your server. Installing it on the client is recommended but not required.
Q: Is Forge or NeoForge supported?
A: NeoForge support is planned.
Q: When will the mod be updated to the latest Minecraft version?
A: The mod targets the latest stable release and is updated as time allows. Snapshot support is not planned.
Q: I found a bug, have a suggestion, or the mod isn't working correctly
A: Feel free to open an issue on GitHub!
下载 Alternative Authentication
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Alternative Authentication
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Alternative Authentication
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Alternative Authentication
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Alternative Authentication
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Alternative Authentication
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Alternative Authentication
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Alternative Authentication
下载 Alternative Authentication
下载 Alternative Authentication
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
- 更新以支持 26.1
- 新增
preventFallbackIfPlayerExists选项。 - 新增配置版本系统,并重写了与配置相关的内容。
- 添加了更详细的调试日志。
- 内部重构与改进。
- 版本号提升至 1.3.0。
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
查看物品与配方
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
AE2:一款流行的自动化与存储模组
模组
添加区块认领和玩家组队功能,并与 Xaero's Minimap 和 World Map 集成
评论 0
登录后参与评分
还没有评论,来抢沙发吧