Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
<?php | |
namespace HelloWorld; | |
use InvalidArgumentException; | |
/** | |
* This class is somewhere in your library | |
* @Entity | |
* @Table(name="users") | |
*/ |
<?php | |
use Doctrine\ORM\Mapping as ORM; | |
use Doctrine\Common\Collections\ArrayCollection; | |
/** | |
* @ORM\Entity() | |
* @ORM\Table(name="user") | |
*/ | |
class User |
Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
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:
oauth_user_provider
in the security.yml
with your custom created serviceHere are the steps:
routing.yml
I have added all the routes for both bundles.config.yml
mostly as it is presented in the HWIOAuthBundle.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.The API we are creating in this gist will follow these rules :
password
Grant Type only (no need for Authorization pages and such).v1.api.example.com
)The API will be written in PHP with the Symfony 2 framework. The following SF2 bundles are used :