Skip to content

Instantly share code, notes, and snippets.

View Davidmattei's full-sized avatar

David mattei Davidmattei

  • Sappico
  • Belgium
View GitHub Profile
<VirtualHost *:80>
   DocumentRoot /mnt/project/web
   RewriteEngine On
   RewriteCond %{DOCUMENT_ROOT}/$1 !-f
   RewriteRule ^/direcory/(.*)$ /direcory/app_dev.php [QSA,L,PT]
   Alias /direcory /mnt/project/web
@danvbe
danvbe / 1-Explanations.md
Last active July 13, 2025 20:06
A way to integrate FosUserBundle and HWIOAuthBundle

I have managed to install this… and make it work. I implemented it for Facebook and Google, but you can extend it. My solution it is mostly as described in #116, with a bit of more code presented. The key aspects that lack in the #116 presentation (IMO) are:

  • the registration as service of your custom FOSUBUserProvider (with the necessary parameters)
  • set the service for oauth_user_provider in the security.yml with your custom created service

Here are the steps:

  1. Routing. In routing.yml I have added all the routes for both bundles.
  2. Configuration. I have set the config.yml mostly as it is presented in the HWIOAuthBundle.
  3. Security. I have set the security.yml mostly as it is presented in the HWIOAuthBundle (though my routes are using /login pattern, not /connect). Also, the oauth_user_provider is set for my custom service.
@invalidusrname
invalidusrname / Vagrantfile
Last active April 3, 2019 20:58
Connecting between VMs with vagrant
config.vm.define :puppet do |app_config|
app_config.vm.customize ["modifyvm", :id, "--name", "puppet", "--memory", "512"]
app_config.vm.box = "precise_with_puppet"
app_config.hosts.name = 'puppet'
app_config.vm.host_name = 'puppet'
app_config.vm.forward_port 22, 2222, :auto => true
app_config.vm.forward_port 80, 4561
app_config.vm.network :hostonly, "33.13.13.01"
app_config.vm.provision :shell do |shell|
shell.path = "../puppet_master_setup.sh"