mirror of
https://github.com/symfony/recipes-contrib.git
synced 2026-03-23 16:22:19 +01:00
Adjust HWIOAuthBundle recipe for version 2.x (#1597)
This commit is contained in:
8
hwi/oauth-bundle/2.0/config/packages/hwi_oauth.yaml
Normal file
8
hwi/oauth-bundle/2.0/config/packages/hwi_oauth.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
hwi_oauth:
|
||||
# https://github.com/hwi/HWIOAuthBundle/blob/master/docs/2-configuring_resource_owners.md
|
||||
resource_owners:
|
||||
facebook:
|
||||
type: facebook
|
||||
client_id: '%env(FB_ID)%'
|
||||
client_secret: '%env(FB_SECRET)%'
|
||||
scope: "email public_profile"
|
||||
11
hwi/oauth-bundle/2.0/config/routes/hwi_oauth_routing.yaml
Normal file
11
hwi/oauth-bundle/2.0/config/routes/hwi_oauth_routing.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
hwi_oauth_redirect:
|
||||
resource: "@HWIOAuthBundle/Resources/config/routing/redirect.php"
|
||||
prefix: /connect
|
||||
|
||||
hwi_oauth_connect:
|
||||
resource: "@HWIOAuthBundle/Resources/config/routing/connect.php"
|
||||
prefix: /connect
|
||||
|
||||
hwi_oauth_login:
|
||||
resource: "@HWIOAuthBundle/Resources/config/routing/login.php"
|
||||
prefix: /login
|
||||
12
hwi/oauth-bundle/2.0/manifest.json
Normal file
12
hwi/oauth-bundle/2.0/manifest.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"bundles": {
|
||||
"HWI\\Bundle\\OAuthBundle\\HWIOAuthBundle": ["all"]
|
||||
},
|
||||
"copy-from-recipe": {
|
||||
"config/": "%CONFIG_DIR%/"
|
||||
},
|
||||
"env": {
|
||||
"FB_ID": "",
|
||||
"FB_SECRET": ""
|
||||
}
|
||||
}
|
||||
15
hwi/oauth-bundle/2.0/post-install.txt
Normal file
15
hwi/oauth-bundle/2.0/post-install.txt
Normal file
@@ -0,0 +1,15 @@
|
||||
* <fg=blue>Configure</> your application:
|
||||
1. Add firewall by adding <comment>- main:
|
||||
anonymous: true
|
||||
oauth:
|
||||
resource_owners:
|
||||
my_github: "/login/check-github"
|
||||
login_path: /login
|
||||
use_forward: false
|
||||
failure_path: /login
|
||||
|
||||
oauth_user_provider:
|
||||
service: hwi_oauth.user.provider
|
||||
</> in your security firewalls section.
|
||||
|
||||
* <fg=blue>Read</> the documentation at <comment>https://github.com/hwi/HWIOAuthBundle/blob/master/docs/3-configuring_the_security_layer.md</>
|
||||
Reference in New Issue
Block a user