Authentication service for the Ely.by and Minecraft
Go to file
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
api Upgrade project to PHP 8.3, add PHPStan, upgrade almost every dependency (#36) 2024-12-02 11:10:55 +01:00
common Upgrade project to PHP 8.3, add PHPStan, upgrade almost every dependency (#36) 2024-12-02 11:10:55 +01:00
console Upgrade project to PHP 8.3, add PHPStan, upgrade almost every dependency (#36) 2024-12-02 11:10:55 +01:00
data Extract public key from private pem file at runtime 2024-06-14 03:03:10 +02:00
docker Upgrade project to PHP 8.3, add PHPStan, upgrade almost every dependency (#36) 2024-12-02 11:10:55 +01:00
.dockerignore Tune nginx conf 2019-11-27 03:41:27 +03:00
.env.dist Remove unused HS256 signing algorithm 2024-06-14 03:21:00 +02:00
.gitattributes Completely untie the backend from the frontend. 2019-04-06 15:52:23 +02:00
.gitignore Upgrade project to PHP 8.3, add PHPStan, upgrade almost every dependency (#36) 2024-12-02 11:10:55 +01:00
.gitlab-ci.yml Upgrade project to PHP 8.3, add PHPStan, upgrade almost every dependency (#36) 2024-12-02 11:10:55 +01:00
.php-cs-fixer.dist.php Upgrade project to PHP 8.3, add PHPStan, upgrade almost every dependency (#36) 2024-12-02 11:10:55 +01:00
autocompletion.php Upgrade project to PHP 8.3, add PHPStan, upgrade almost every dependency (#36) 2024-12-02 11:10:55 +01:00
codeception.dist.yml Upgrade project to PHP 8.3, add PHPStan, upgrade almost every dependency (#36) 2024-12-02 11:10:55 +01:00
composer.json Upgrade project to PHP 8.3, add PHPStan, upgrade almost every dependency (#36) 2024-12-02 11:10:55 +01:00
composer.lock Upgrade project to PHP 8.3, add PHPStan, upgrade almost every dependency (#36) 2024-12-02 11:10:55 +01:00
docker-compose.dist.yml Update dist docker-compose configuration [skip ci] 2021-03-28 03:00:26 +02:00
Dockerfile Upgrade project to PHP 8.3, add PHPStan, upgrade almost every dependency (#36) 2024-12-02 11:10:55 +01:00
LICENSE Translate readme, add license and some composer.json fields 2020-05-20 02:36:32 +03:00
phpstan-baseline.neon Upgrade project to PHP 8.3, add PHPStan, upgrade almost every dependency (#36) 2024-12-02 11:10:55 +01:00
phpstan.dist.neon Upgrade project to PHP 8.3, add PHPStan, upgrade almost every dependency (#36) 2024-12-02 11:10:55 +01:00
README.md Fix typos in README 2020-05-21 14:41:29 +03:00
yii Upgrade project to PHP 8.3, add PHPStan, upgrade almost every dependency (#36) 2024-12-02 11:10:55 +01:00

Accounts Ely.by

Ely.by's accounts management service, which provides a single entry point for our own services, as well as for external projects via the OAuth2 protocol. It also implements authorization server for Minecraft game servers and partially implements Mojang-compatible API for obtaining accounts' information.

Warning: this project is not intended for use outside of the ecosystem of Ely.by's services.

Development

The project is designed to work in a Docker environment. Installation links:

First you need to fork the repository and clone it. After that you need to create local .env and docker-compose.yml files:

cp .env.dist .env
cp docker-compose.dist.yml docker-compose.yml

The copied files can be adjusted for your local environment, but generally they are ready to use without any intervention.

Containers will not install dependencies automatically, so you have to install them manually. If you have php and composer installed on your system, you can install dependencies with the composer install command. You can also install dependencies using the container:

docker-compose run --rm --no-deps app composer install

At the first start, all base images will be loaded and built (it can take a long time for the application's image), after which you will be able to begin the development.

To start all containers, use the following command:

docker-compose up -d

By default, docker-compose.yml specifies 80 port for the web service and 8080 port for phpMyAdmin. If these services emits ports-related errors, it is necessary to make the required ports available or change them, and then run the docker-compose up -d command again.

User interface

This repository contains only the source code for the backend API while the interface is in the separate repository. Linux and Mac users can use the following script to get the latest version of the UI:

curl -s https://api.github.com/repos/elyby/accounts-frontend/releases/latest \
 | grep "browser_download_url.*tar.gz" \
 | cut -d : -f 2,3 \
 | tr -d \" \
 | xargs curl -sLo /tmp/accounts-frontend.tar.gz \
&& rm -rf frontend \
&& mkdir -p frontend \
&& tar -zxf /tmp/accounts-frontend.tar.gz -C frontend \
&& rm -f /tmp/accounts-frontend.tar.gz

If this script didn't work for you, you can manually go to the releases page, download the suitable build-archive and extract all its contents into the frontend folder.

How to enter into a working container

Using the docker-compose exec command you can easily execute any desired command in a running container by using its service's name from the docker-compose.yml file. For example, to enter the shell of the app container, use the following command:

docker-compose exec app bash

License

This library is released under the Apache 2.0.