Add a redirect for new Usernames to UUIDs endpoint (#29)

* fix: add redirect for new "Usernames to UUIDs" endpoint location

"As of 23w42a, the endpoint moved to: 'POST https://sessionserver.mojang.com/session/minecraft/profile/lookup/bulk/byname'
"
https://wiki.vg/Mojang_API#Usernames_to_UUIDs

* add a redirect for authlib-injector too

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

* revert: .gitignore

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

* tests: pass new URL to existing tests

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

* review: address requested changes

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

* style: add type hints to MinecraftProfilesCest functions too

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

---------

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
This commit is contained in:
Octol1ttle
2023-11-20 05:36:39 +05:00
committed by GitHub
parent 667f582b3e
commit 574d03d02f
4 changed files with 103 additions and 48 deletions

View File

@@ -41,6 +41,7 @@ return [
'/minecraft/session/hasJoined' => 'session/session/has-joined',
'/minecraft/session/legacy/hasJoined' => 'session/session/has-joined-legacy',
'/minecraft/session/profile/<uuid>' => 'session/session/profile',
'POST /minecraft/session/profile/lookup/bulk/byname' => 'mojang/api/uuids-by-usernames',
// Mojang API module routes
'/mojang/profiles/<username>' => 'mojang/api/uuid-by-username',
@@ -54,4 +55,5 @@ return [
'/authlib-injector/sessionserver/session/minecraft/hasJoined' => 'session/session/has-joined',
'/authlib-injector/sessionserver/session/minecraft/profile/<uuid>' => 'session/session/profile',
'/authlib-injector/api/profiles/minecraft' => 'mojang/api/uuids-by-usernames',
'/authlib-injector/sessionserver/session/minecraft/profile/lookup/bulk/byname' => 'mojang/api/uuids-by-usernames',
];