diff --git a/league/oauth2-server-bundle/0.3/config/packages/league_oauth2_server.yaml b/league/oauth2-server-bundle/0.3/config/packages/league_oauth2_server.yaml new file mode 100644 index 00000000..cfb72a83 --- /dev/null +++ b/league/oauth2-server-bundle/0.3/config/packages/league_oauth2_server.yaml @@ -0,0 +1,12 @@ +league_oauth2_server: + authorization_server: + private_key: /var/oauth/private.key # Change this + private_key_passphrase: null # Passphrase of the private key, if any + encryption_key: '%env(string:OAUTH2_ENCRYPTION_KEY)%' # (Optional) Change this + resource_server: + public_key: /var/oauth/public.key # Change this + scopes: + available: [EMAIL] # Change this + default: [EMAIL] # Change this + persistence: + doctrine: null diff --git a/league/oauth2-server-bundle/0.3/config/routes/league_oauth2.yaml b/league/oauth2-server-bundle/0.3/config/routes/league_oauth2.yaml new file mode 100644 index 00000000..9299b3f3 --- /dev/null +++ b/league/oauth2-server-bundle/0.3/config/routes/league_oauth2.yaml @@ -0,0 +1,3 @@ +oauth2: + resource: '@LeagueOAuth2ServerBundle/Resources/config/routes.php' + type: php diff --git a/league/oauth2-server-bundle/0.3/manifest.json b/league/oauth2-server-bundle/0.3/manifest.json new file mode 100644 index 00000000..4c8b1a80 --- /dev/null +++ b/league/oauth2-server-bundle/0.3/manifest.json @@ -0,0 +1,13 @@ +{ + "bundles": { + "League\\Bundle\\OAuth2ServerBundle\\LeagueOAuth2ServerBundle": ["all"] + }, + "copy-from-recipe": { + "config/": "%CONFIG_DIR%/" + }, + "env": { + "#1": "Fallback OAuth2 encryption key", + "#2": "Please override this with a secure value: https://oauth2.thephpleague.com/installation/#string-password", + "OAUTH2_ENCRYPTION_KEY": "%generate(secret)%" + } +} diff --git a/league/oauth2-server-bundle/0.3/post-install.txt b/league/oauth2-server-bundle/0.3/post-install.txt new file mode 100644 index 00000000..4bc70026 --- /dev/null +++ b/league/oauth2-server-bundle/0.3/post-install.txt @@ -0,0 +1,18 @@ + 1. Provide a key pair + i) Generate a private/public key pair (preferably with a password): https://oauth2.thephpleague.com/installation/#generating-public-and-private-keys + ii) Configure the private_key and public_key with the respective key locations + iii) (Optional) Set the private_key_passphrase to the private key password set in the previous step + + 2. Configure the OAuth2 encryption key + i) Add the OAUTH2_ENCRYPTION_KEY env variable in .env.local (don't commit your production secrets): https://oauth2.thephpleague.com/installation/#string-password + ii) Configure the encryption_key with a secure encryption key: https://oauth2.thephpleague.com/installation/#string-password + + 3. Update the database + i) Update the database so bundle entities can be persisted using Doctrine: bin/console doctrine:schema:update --force + + 4. Enable the authenticator security system in config/security.yaml file: + i) security: + enable_authenticator_manager: true + + 5. Read the docs + i) Read the documentation at https://github.com/thephpleague/oauth2-server-bundle/blob/master/docs/index.md