-
-
Notifications
You must be signed in to change notification settings - Fork 488
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add recipe for league/oauth2-server-bundle (#1130)
- Loading branch information
Showing
4 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
league/oauth2-server-bundle/0.4/config/packages/league_oauth2_server.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
league_oauth2_server: | ||
authorization_server: | ||
private_key: '%env(resolve:OAUTH_PRIVATE_KEY)%' | ||
private_key_passphrase: '%env(resolve:OAUTH_PASSPHRASE)%' | ||
encryption_key: '%env(resolve:OAUTH_ENCRYPTION_KEY)%' | ||
resource_server: | ||
public_key: '%env(resolve:OAUTH_PUBLIC_KEY)%' | ||
scopes: | ||
available: ['email'] | ||
default: ['email'] | ||
persistence: | ||
doctrine: null | ||
|
||
when@test: | ||
league_oauth2_server: | ||
persistence: | ||
in_memory: null |
3 changes: 3 additions & 0 deletions
3
league/oauth2-server-bundle/0.4/config/routes/league_oauth2_server.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
oauth2_server: | ||
resource: '@LeagueOAuth2ServerBundle/Resources/config/routes.php' | ||
type: php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"bundles": { | ||
"League\\Bundle\\OAuth2ServerBundle\\LeagueOAuth2ServerBundle": ["all"] | ||
}, | ||
"copy-from-recipe": { | ||
"config/": "%CONFIG_DIR%/" | ||
}, | ||
"env": { | ||
"OAUTH_PRIVATE_KEY": "%kernel.project_dir%/%CONFIG_DIR%/jwt/private.pem", | ||
"OAUTH_PUBLIC_KEY": "%kernel.project_dir%/%CONFIG_DIR%/jwt/public.pem", | ||
"OAUTH_PASSPHRASE": "%generate(secret)%", | ||
"OAUTH_ENCRYPTION_KEY": "%generate(secret)%" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
1. <bg=magenta;fg=white> Provide a key pair </> | ||
* Generate a private/public key pair at the locations defined in your .env file, using the value of the <info>OAUTH_PASSPHRASE</> as passphrase: <comment>https://oauth2.thephpleague.com/installation/#generating-public-and-private-keys</> | ||
|
||
2. <bg=magenta;fg=white> Update the database schema </> | ||
* Update your database schema so that bundle entities can be managed by Doctrine | ||
|
||
3. <bg=magenta;fg=white> Read the docs </> | ||
* Read the documentation at <comment>https://github.com/thephpleague/oauth2-server-bundle/blob/master/docs/index.md</> |