Copy the .env.example files on each service:
cp services/ms-payments/.env.example services/ms-payments/.env
cp services/ms-users/.env.example services/ms-users/.env
./scripts/services-sync.sh
docker-compose up -d --build
docker-compose run ms-payments-php php artisan key:generate
docker-compose run ms-payments-php php artisan migrate
docker-compose run ms-users-php php artisan key:generate
docker-compose run ms-users-php php artisan migrate
Base URL: http://localhost:8000
-
Authentication
- GET /me
- POST /login
- POST /logout
- POST /refresh
-
Users
- GET /users
- POST /users
- PATCH /users/{user_id}/enable
- PATCH /users/{user_id}/disable
-
Payments
- POST /payments
Perform a GET request to http://localhost:8001/consumers/jwt_auth_issuer/jwt and you will get a similar JSON to the following one:
{
"next": null,
"data": [
{
"key": "********************************",
"consumer": {
"id": "0076ae4b-0648-5847-8ee6-1bf0a6049c97"
},
"rsa_public_key": null,
"tags": null,
"created_at": 1684847348,
"id": "8fd98bab-9ff9-4661-8162-51e2b483e01f",
"algorithm": "HS256",
"secret": "********************************"
}
]
}
-
In the service
ms-usersreplace the .env variableJWT_ISSUERvalue with thekeyvalue. -
In the service
ms-usersreplace the .env variableJWT_SECRETvalue with thesecretvalue.