Update Mojang API response code and messages, implement UUID->Username endpoint (#47)

* Update Mojang API response code and messages, implement UUID->Username endpoint

* php-cs-fixer

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>

* review: address the minor issues

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>

* try to implement legacy response support (all tests are failing (routing is broken))

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>

* well that was 10x easier

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>

* fix: php-cs-fixer

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>

* Fix PHPStan errors and update tests for authlib-injector entrypoint. Final polishing before merge

---------

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
Co-authored-by: ErickSkrauch <erickskrauch@yandex.ru>
This commit is contained in:
Octol1ttle
2025-03-01 05:08:52 +05:00
committed by GitHub
parent bc59fd91ca
commit 5225ea1b02
7 changed files with 320 additions and 199 deletions

View File

@@ -49,6 +49,7 @@ return [
'GET /mojang/services/minecraft/profile' => 'mojang/services/profile',
'POST /mojang/services/minecraft/profile/lookup/bulk/byname' => 'mojang/api/uuids-by-usernames',
'GET /mojang/services/minecraft/profile/lookup/name/<username>' => 'mojang/api/uuid-by-username',
'GET /mojang/services/minecraft/profile/lookup/<uuid>' => 'mojang/api/username-by-uuid',
// authlib-injector
'/authlib-injector/authserver/<action>' => 'authserver/authentication/<action>',
@@ -58,4 +59,5 @@ return [
'/authlib-injector/api/profiles/minecraft' => 'mojang/api/uuids-by-usernames',
'/authlib-injector/minecraftservices/minecraft/profile/lookup/bulk/byname' => 'mojang/api/uuids-by-usernames',
'/authlib-injector/minecraftservices/minecraft/profile/lookup/name/<username>' => 'mojang/api/uuid-by-username',
'/authlib-injector/minecraftservices/minecraft/profile/lookup/<uuid>' => 'mojang/api/username-by-uuid',
];