Commit Graph

829 Commits

Author SHA1 Message Date
ErickSkrauch
efd386b5e0 Reduce username limit to 16 characters 2025-05-30 04:56:58 +02:00
ErickSkrauch
09c51c943f Merge pull request #50 from Octol1ttle/fix-cests-names
style: rename cests to match routing action names
2025-03-05 00:40:25 +01:00
Octol1ttle
db02dcf992 style: rename cests to match routing action names
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
2025-03-03 22:23:24 +05:00
Octol1ttle
5225ea1b02 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>
2025-03-01 01:08:52 +01:00
ErickSkrauch
bc59fd91ca Fix PHPStan errors 2025-02-14 16:26:14 +01:00
ErickSkrauch
997f135d2d Merge remote-tracking branch 'octol1ttle/fix-authlibinjector-route'
# Conflicts:
#	api/config/routes.php
2025-02-14 16:08:52 +01:00
ErickSkrauch
4a0fd68df2 Merge pull request #46 from Octol1ttle/add-new-username-to-uuid-endpoint
update: add new username->UUID endpoint
2025-02-14 16:03:55 +01:00
Octol1ttle
884c11f98f fix: use correct service route for authlib-injector's lookup/bulk/byname
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
2025-02-14 15:26:25 +05:00
Octol1ttle
8c82f45764 new: add minecraftservices' Username->UUID endpoint
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
2025-02-14 15:22:43 +05:00
ErickSkrauch
6b2ced9c75 Fixes ACCOUNTS-CJ. Handle invalid idna convert result 2025-01-30 03:36:15 +01:00
ErickSkrauch
be4697e6eb Extract login logics into a separate component. Not quite clean result but enough for upcoming tasks 2025-01-17 21:37:35 +01:00
ErickSkrauch
1c2969a4be Implemented desktop application type 2025-01-15 14:13:08 +01:00
Octol1ttle
3bba99a757 fix: use custom Redirect URI validation logic in RefreshTokenGrant (#42)
Co-authored-by: ErickSkrauch <erickskrauch@yandex.ru>
2025-01-09 01:23:41 +01:00
Octol1ttle
7b626507bc fix: send refresh tokens to Device Code clients too (#41) 2024-12-25 16:48:38 +01:00
ErickSkrauch
e5b395d11b Fix verb filter 2024-12-24 17:45:49 +01:00
ErickSkrauch
6105d9752c Fix CS 2024-12-24 12:25:39 +01:00
ErickSkrauch
5a3e744b89 Add 'feature.enable_profile_key' to authlib-injector metadata so it uses our signing keys (#39) 2024-12-24 12:17:35 +01:00
Octol1ttle
5f6dc35e3b Update IndexCest.php 2024-12-24 16:15:17 +05:00
Octol1ttle
5a4895dbc4 Update AuthlibInjectorController.php 2024-12-24 16:13:25 +05:00
ErickSkrauch
1c11c66b9c Rename device code endpoint to /devicecode 2024-12-24 01:20:58 +01:00
ErickSkrauch
085b4f5ca6 Fix CS 2024-12-17 23:12:57 +01:00
ErickSkrauch
05524a4e7c Fix E2E scopes response 2024-12-17 23:08:55 +01:00
ErickSkrauch
119a0f8078 Validate user_code expiry during the Device Code grant.
Add mock responses related to the Device Code grant.
2024-12-14 18:55:31 +01:00
ErickSkrauch
2cc27d34ad Implemented device code grant 2024-12-08 16:54:45 +01:00
ErickSkrauch
c7d192d14e Fixes ACCOUNTS-BQ. Don't use mailer in constructor 2024-12-07 17:48:14 +01:00
ErickSkrauch
5ed6f0ce86 Move OAuth module from API to common and solve PHPStan's errors 2024-12-06 01:34:09 +01:00
ErickSkrauch
8a25ff9223 Fix timestamp serialization format for JWT tokens 2024-12-03 18:17:42 +01:00
ErickSkrauch
2442329895 Fixes ACCOUNTS-BH. Fix port param type 2024-12-02 14:23:43 +01:00
ErickSkrauch
2d649afd4f Fixes ACCOUNTS-BF. Fix smtp transport configuration 2024-12-02 13:59:36 +01:00
ErickSkrauch
c92ece3fed Fix Sentry installation 2024-12-02 13:27:31 +01:00
ErickSkrauch
cc21abe8f4 Install SVG support for Codeception step 2024-12-02 13:14:22 +01:00
ErickSkrauch
fcf74eacab Fix image for PHPStan on GitLab CI 2024-12-02 12:47:16 +01:00
ErickSkrauch
f43eafb2f3 Fix GitLab CI 2024-12-02 12:35:21 +01:00
Octol1ttle
57d492da8a Upgrade project to PHP 8.3, add PHPStan, upgrade almost every dependency (#36)
* start updating to PHP 8.3

* taking off!

Co-authored-by: ErickSkrauch <erickskrauch@yandex.ru>
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>

* dropped this

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

* migrate to symfonymailer

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

* this is so stupid 😭

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

* ah, free, at last.

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

* oh, Gabriel.

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

* now dawns thy reckoning.

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

* and thy gore shall GLISTEN before the temples of man.

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

* creature of steel.

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

* my gratitude upon thee for my freedom.

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

* but the crimes thy kind has committed against humanity

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

* Upgrade PHP-CS-Fixer and do fix the codebase

* First review round (maybe I have broken something)

* are NOT forgotten.

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

* Enable parallel PHP-CS-Fixer runner

* PHPStan level 1

* PHPStan level 2

* PHPStan level 3

* PHPStan level 4

* PHPStan level 5

* Levels 6 and 7 takes too much effort. Generate a baseline and fix them eventually

* Resolve TODO's related to the php-mock

* Drastically reduce baseline size with the Rector

* More code modernization with help of the Rector

* Update GitLab CI

---------

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
Co-authored-by: ErickSkrauch <erickskrauch@yandex.ru>
2024-12-02 11:10:55 +01:00
ErickSkrauch
625250b367 Fixes #35. Make clientToken optional during legacy Minecraft auth flow 2024-11-24 10:25:22 +01:00
ErickSkrauch
d921616360 Allow secure headers from internal network for production deployment 2024-06-20 04:44:11 +02:00
Octol1ttle
4231f99717 Move new "usernames -> UUIDs" endpoint to the correct location (#33)
* change: test non-injector endpoints in non-injector tests

* fix: move new "usernames -> UUIDs" endpoint to the correct location
2024-06-17 14:02:01 +02:00
ErickSkrauch
0c110213f4 Remove minecraft_access_keys table and all related code 2024-06-14 05:42:35 +02:00
ErickSkrauch
2111e1769f Introduce an API endpoint to obtain public keys, that can be used to verify access tokens on other services 2024-06-14 04:36:49 +02:00
ErickSkrauch
17109f8eb5 Remove unused HS256 signing algorithm 2024-06-14 03:21:00 +02:00
ErickSkrauch
0a666e1e12 Extract public key from private pem file at runtime 2024-06-14 03:03:10 +02:00
ErickSkrauch
ca304261a3 Fix malformed query params 2024-06-11 04:16:36 +02:00
ErickSkrauch
46c5a0f878 Fix condition 2024-06-11 04:06:56 +02:00
ErickSkrauch
345bc80d05 Added support of the onUnknownProfileRespondWithUuid when calling Chrly endpoint 2024-06-11 03:50:10 +02:00
ErickSkrauch
16877d502d Drop usage of goaop, replace implementation with events 2023-11-20 04:39:13 +01:00
ErickSkrauch
2bc83f39cf Fix CS 2023-11-20 02:16:44 +01:00
Octol1ttle
574d03d02f 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>
2023-11-20 01:36:39 +01:00
ErickSkrauch
667f582b3e Merge pull request #31 from Octol1ttle/fix-wrong-join-response
Add missing response checks in SessionServerSteps tests
2023-11-17 14:47:25 +01:00
Octol1ttle
88ff766054 fix: add missing response checks in SessionServerSteps tests
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-11-17 14:20:32 +05:00
ErickSkrauch
7d4e0f246c Fixes #30. Upgrade MariaDB base image 2023-11-16 20:43:43 +01:00