Pre-requisites:
- ^7.3
- Anplan database
mkdir -p var/oauth
openssl genrsa -passout pass:<PASSWORD> -out var/oauth/private.key 2048
openssl rsa -in var/oauth/private.key -passin pass:<PASSWORD> -pubout -out var/oauth/public.key
composer install
Copy .env
to .env.local
and update to the values for your environment
php bin/console doctrine:database:create --if-not-exists
php bin/console doctrine:schema:update --force
php bin/console trikoder:oauth2:create-client --grant-type=password --grant-type=refresh_token --scope=cms --scope=events --redirect-uri=https://example.com
Use the information shown in this command (or list-clients) in your authentication call.
curl --location --request POST 'http://127.0.0.1:8001/token' \
--header 'Content-Type: application/json' \
--form 'grant_type=password' \
--form 'client_id=~' \
--form 'client_secret=~' \
--form 'username=~' \
--form 'password=~'