18 Commits

Author SHA1 Message Date
Evan Goode
30ba03adf4 Implement GET /minecraft/profile/lookup/:id
New route on api.minecraftservices.com, see
https://minecraft.wiki/w/Mojang_API#Query_player's_username
2025-04-04 21:00:08 -04:00
Evan Goode
770ceededb Batch and rate-limit POST /profiles/minecraft to fallback API servers
For https://github.com/unmojang/drasl/issues/112
2025-04-04 21:00:08 -04:00
Evan Goode
5c1f6c1cfa
Implement SSO via OIDC (#127)
Resolves https://github.com/unmojang/drasl/issues/39

* Use __Host- cookie prefix instead of setting Domain

See https://stackoverflow.com/a/64735551

* Unlinking OIDC accounts

* AllowPasswordLogin, OIDC docs, cleanup

* YggdrasilError

* Migrate existing password users without login

* API query/create/delete user OIDC identities

* test APICreateOIDCIdentity

* test APIDeleteeOIDCIdentity

* API Create users with OIDC identities

* OIDC: PKCE

* Use YggdrasilError in authlib-injector routes

* OIDC: AllowChoosingPlayerName

* recipes.md: Update for OIDC and deprecated config options

* OIDC: fix APICreateUser without password, validate oidcIdentities

* OIDC: error at complete-registration if no preferred player name

* Proper error pages

* MC_ prefix for Minecraft Tokens
2025-03-22 16:40:26 -04:00
Evan Goode
43f9d3d815 Test /web/create-player 2024-12-28 21:07:32 -05:00
Evan Goode
ca081f8519 Run tests in parallel 2024-12-28 21:07:32 -05:00
Evan Goode
faec464a4e Most Front tests passing 2024-12-28 21:07:32 -05:00
Evan Goode
1a8d312797 Tests passing except Front 2024-12-28 21:07:32 -05:00
Evan Goode
60b6414a50 Test for AllowTextureFromURL 2024-11-26 14:56:59 -05:00
Evan Goode
db14f9340d APIGetChallengeSkin, cleanup 2024-08-15 12:33:59 -04:00
Evan Goode
f7ad78d8e9 refactor: CreateUser 2024-08-15 12:33:59 -04:00
Evan Goode
72d3b1cd32 Add minecraft/profile/lookup/bulk/byname alias
As of 23w42a, the "Usernames to UUIDs" endpoint, previously at POST
https://api.mojang.com/profiles/minecraft, has been moved to POST
https://api.minecraftservices.com/minecraft/profile/lookup/bulk/byname.

This patch adds an alias for the new endpoint. The old endpoint will
still work.

Related: https://github.com/yushijinhun/authlib-injector/issues/232
2024-03-21 11:12:03 -04:00
Evan Goode
d750dacdbb Config validation/cleaning, cleanup 2023-08-29 00:26:21 -04:00
Evan Goode
db03ec3e97 Test setting skin/cape when skins/capes disallowed
Resolves https://github.com/unmojang/drasl/issues/20
2023-08-20 23:07:50 -04:00
Evan Goode
fa5cd70eda Make player names case-insensitive
Resolves https://github.com/unmojang/drasl/issues/29
2023-08-20 22:34:55 -04:00
Evan Goode
fec8371816 Services tests 2023-08-20 00:47:54 -04:00
Evan Goode
3456e33085 Switch from 32-character hex accessTokens to JWTs 2023-08-20 02:15:04 +00:00
Evan Goode
fecd6e5daf Mostly cleanup, error handling, authlib-injector fixes 2023-07-28 16:33:45 -04:00
Evan Goode
7d5bab6e88 some services tests 2023-07-26 23:49:37 -04:00