diff --git a/hwi/oauth-bundle/2.0/config/packages/hwi_oauth.yaml b/hwi/oauth-bundle/2.0/config/packages/hwi_oauth.yaml new file mode 100644 index 00000000..b451310e --- /dev/null +++ b/hwi/oauth-bundle/2.0/config/packages/hwi_oauth.yaml @@ -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" diff --git a/hwi/oauth-bundle/2.0/config/routes/hwi_oauth_routing.yaml b/hwi/oauth-bundle/2.0/config/routes/hwi_oauth_routing.yaml new file mode 100644 index 00000000..190b994d --- /dev/null +++ b/hwi/oauth-bundle/2.0/config/routes/hwi_oauth_routing.yaml @@ -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 diff --git a/hwi/oauth-bundle/2.0/manifest.json b/hwi/oauth-bundle/2.0/manifest.json new file mode 100644 index 00000000..ac132ad4 --- /dev/null +++ b/hwi/oauth-bundle/2.0/manifest.json @@ -0,0 +1,12 @@ +{ + "bundles": { + "HWI\\Bundle\\OAuthBundle\\HWIOAuthBundle": ["all"] + }, + "copy-from-recipe": { + "config/": "%CONFIG_DIR%/" + }, + "env": { + "FB_ID": "", + "FB_SECRET": "" + } +} diff --git a/hwi/oauth-bundle/2.0/post-install.txt b/hwi/oauth-bundle/2.0/post-install.txt new file mode 100644 index 00000000..5feccc4c --- /dev/null +++ b/hwi/oauth-bundle/2.0/post-install.txt @@ -0,0 +1,15 @@ + * Configure your application: + 1. Add firewall by adding - 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. + + * Read the documentation at https://github.com/hwi/HWIOAuthBundle/blob/master/docs/3-configuring_the_security_layer.md