Commit Graph

102 Commits

Author SHA1 Message Date
ErickSkrauch
2cc27d34ad
Implemented device code grant 2024-12-08 16:54:45 +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
0c110213f4
Remove minecraft_access_keys table and all related code 2024-06-14 05:42:35 +02:00
ErickSkrauch
345bc80d05
Added support of the onUnknownProfileRespondWithUuid when calling Chrly endpoint 2024-06-11 03:50:10 +02:00
ErickSkrauch
9c39e97640
Merge pull request #21 from elyby/iss_20_minecraftservices_profile
MinecraftServices Profile info API endpoint
2022-12-10 00:16:40 +01:00
ErickSkrauch
b113beb78e
Fixes #27. Serialize empty textures as an object 2022-12-05 22:50:22 +01:00
ErickSkrauch
31febd5606
#20 Quick implementation of the https://api.minecraftservices.com/minecraft/profile endpoint [deploy dev] 2022-01-21 21:09:46 +01:00
ErickSkrauch
5b8be60867
Start looking for the ghost case of the empty signature 2021-08-16 15:16:46 +02:00
ErickSkrauch
5dc140da15 Fixes ACCOUNTS-13, ACCOUNTS-3F. Remove warnings for the cases which are actually happens 2021-03-04 11:18:04 +01:00
ErickSkrauch
4856695940 Resolves #2. Implemented authlib-injector support 2021-03-03 15:04:42 +01:00
ErickSkrauch
7da6a952ee
Fix tests 2020-10-02 18:14:43 +03:00
ErickSkrauch
5fc97fdd7a Implemented oauth session revocation notification.
Reworked webhooks notifications constructors
2020-10-01 01:40:28 +03:00
ErickSkrauch
b904d5d314
Implemented features to revoke access for previously authorized OAuth 2.0 clients 2020-09-30 20:30:04 +03:00
ErickSkrauch
fb452901b8 Rework the webhooks table, allow to update exists webhooks 2020-06-14 01:21:19 +03:00
ErickSkrauch
17f1794a4e
Covered all cases, fixed CS, added a new TODO 2020-06-13 01:55:02 +03:00
ErickSkrauch
0183e54442
Implemented account deletion. Not all cases covered with tests [skip ci] 2020-06-12 00:27:02 +03:00
ErickSkrauch
7607248c27 Remove usage of codeception/specify and fzaninotto/faker 2019-12-29 17:55:21 +03:00
ErickSkrauch
666213afc7 Rework email_activation model, get rid of behaviors, use json column to store additional data 2019-12-21 01:23:58 +03:00
ErickSkrauch
b9b62ead12 Fixes ACCOUNTS-5Z8. Use correct relation column for OauthSession 2019-12-15 18:27:31 +03:00
ErickSkrauch
d9ef27b745 Cleanup code, improve typings 2019-12-13 22:27:13 +03:00
ErickSkrauch
9da58beccf Add deprecation notices 2019-12-11 14:24:31 +03:00
ErickSkrauch
016a193263 Introduce revokation mechanism 2019-12-10 01:38:09 +03:00
ErickSkrauch
ba7fad84a0 Remove refresh_token from OAuth2 result. Return the same access_token as a refresh_token in case when it's requested. Make access_tokens to live forever. 2019-12-09 19:31:54 +03:00
ErickSkrauch
72cbf16c97 Merge branch 'master' into oauth_jwt_tokens
# Conflicts:
#	api/components/OAuth2/Entities/AccessTokenEntity.php
#	api/components/OAuth2/Entities/RefreshTokenEntity.php
#	api/components/OAuth2/Grants/RefreshTokenGrant.php
#	api/components/OAuth2/Storage/SessionStorage.php
#	api/components/User/OAuth2Identity.php
2019-12-04 01:17:12 +03:00
ErickSkrauch
db8e13d749 Hotfix to handle Chrly's long responses 2019-11-09 17:46:27 +03:00
ErickSkrauch
c722c46ad5 Add support for the legacy refresh tokens, make the new refresh tokens non-expire [skip ci] 2019-09-22 02:42:08 +03:00
ErickSkrauch
5536c34b9c Restore full functionality of OAuth2 server [skip ci] 2019-09-22 00:19:11 +03:00
ErickSkrauch
45101d6453 Completely restored authorization_code grant for user side.
Reworked oauth_sessions table.
Added extension to use MariaDB's JSON columns.
Rewritten tests for authorization_code grant for client side.
Deprecate some old shit.
[skip ci]
2019-09-18 02:15:12 +03:00
ErickSkrauch
0b63dc2d84 Upgrade oauth2-server to 8.0.0 version, rewrite repositories and entities, start rewriting tests. Intermediate commit [skip ci] 2019-08-23 11:28:04 +03:00
ErickSkrauch
89f7195a37 Fix index usage for OauthSessions relation from Account model 2019-08-08 02:47:36 +03:00
ErickSkrauch
3dbf29d34c Translate all code comments from Russian to English [skip ci] 2019-07-15 01:59:56 +03:00
ErickSkrauch
194a7acd2a Fixes ACCOUNTS-5FF. Handle 204 response from Chrly. 2019-05-13 19:39:11 +03:00
ErickSkrauch
b20825a051 Update ely/php-code-style and run updated CS fixer 2019-02-26 02:26:02 +03:00
ErickSkrauch
c0aa78d156 Implemented WebHooks delivery queue.
Completely removed usage of the RabbitMQ. Queue now based on Redis channels.
Worker process now extracted as separate docker container.
Base image upgraded to the 1.8.0 version (PHP 7.2.7 and pcntl extension).
2018-07-08 18:20:19 +03:00
ErickSkrauch
6751eb6591 Implemented webhooks database structure and console command register webhooks 2018-07-07 15:01:18 +03:00
ErickSkrauch
02ea7346a8 Implemented PHP-CS-Fixer support 2018-04-17 23:47:25 +03:00
ErickSkrauch
a2c73e1d17 Upgrade php to 7.2. Fix Yii2 Object usages. 2018-03-15 00:11:42 +03:00
ErickSkrauch
673429e577 Implementation of the backend for the OAuth2 clients management 2018-02-28 01:27:35 +03:00
ErickSkrauch
22ed0942e8 Добавлен функционал очистки устаревших AccountSessions 2017-09-29 02:04:16 +03:00
ErickSkrauch
ec0b25e88d Добавлен функционал очистки устаревших MinecraftAccessKey 2017-09-27 19:52:28 +03:00
ErickSkrauch
dd2c4bc413 Объединены сущности для авторизации посредством JWT токенов и токенов, выданных через oAuth2.
Все действия, связанные с аккаунтами, теперь вызываются через url `/api/v1/accounts/<id>/<action>`.
Добавлена вменяемая система разграничения прав на основе RBAC.
Теперь oAuth2 токены генерируются как случайная строка в 40 символов длинной, а не UUID.
Исправлен баг с неправильным временем жизни токена в ответе успешного запроса аутентификации.
Теперь все unit тесты можно успешно прогнать без наличия интернета.
2017-09-19 20:06:17 +03:00
ErickSkrauch
33148a5ac7 Логика oauth процесса вынесена в отдельный класс 2017-09-07 22:21:13 +03:00
ErickSkrauch
9a38481f7d Добавлен внутренний API для получения информации об аккаунте 2017-04-03 14:54:33 +03:00
ErickSkrauch
3b9ef7ea70 Реализован метод для запроса информации для активации двухфакторной аутентификации
Добавлен валидатор для TOTP кодов
2017-01-21 02:14:19 +03:00
ErickSkrauch
6f81c38b7f Реализована форма разблокировки аккаунта 2017-01-05 00:57:04 +03:00
ErickSkrauch
b9e5e3a679 Добавлен обработчик для события блокировки аккаунта 2016-12-29 02:01:26 +03:00
ErickSkrauch
79bbc12206 Добавлен контроллер для блокировки аккаунта
Добавлен client_credentials grant для oAuth
Рефакторинг структуры OauthScopes чтобы можно было разделить владельца прав на пользовательские и общие (машинные)
Исправлена стилистика кода, внедряются фишки PHP 7.1
2016-12-28 23:25:55 +03:00
ErickSkrauch
28b06d51ce Базовая реализация API для блокировки аккаунта 2016-12-26 19:17:07 +03:00
ErickSkrauch
213782ff62 Добавлена поддержка для "внутренних" scopes, запросить которые во время oauth процесса нельзя 2016-12-26 19:17:07 +03:00
ErickSkrauch
3bde676217 #276: если система скинов недоступна, то генерируем ответ самостоятельно 2016-12-23 01:50:34 +03:00