by Ossi Hanhinen, @ohanhi
with the support of Futurice 💚.
Licensed under CC BY 4.0.
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 :
As William Durand was recently explaining in his SOS, he "didn't see any other interesting blog post about REST with Symfony recently unfortunately". After spending some long hours to implement an API strongly secured with oAuth, I thought it was time for me to purpose my simple explanation of how to do it.
You might have already seen some good explanation of how to easily create a REST API with Symfony2. There are famous really good bundles a.k.a. :
# NOT FOR SHELL SCRIPT, but rather just for quick copy paste | |
# this is a copy-paste version with defaults of full shell script docker-xenial.sh | |
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D && \ | |
mkdir -p /etc/apt/sources.list.d && \ | |
echo deb https://apt.dockerproject.org/repo ubuntu-xenial main > /etc/apt/sources.list.d/docker.list && \ | |
service lxcfs stop && apt-get remove -y -q lxc-common lxcfs lxd lxd-client && \ | |
apt-get update -q && apt-get upgrade -y -q && \ | |
apt-get install -y -q linux-image-extra-$(uname -r) linux-image-extra-virtual && \ | |
apt-get install -y -q docker-engine && \ |
### NOTE ### | |
The below gist is converted to a blog post and available at below link. Refer than instead. | |
http://hemenkapadia.github.io/blog/2016/05/07/Ubuntu-with-Nvidia-Bumblebee.html | |
#### Note about kernel versions #### | |
Between kernel versions 4.2 and 4.4 there are different options that need to bet set |
mysql -uroot -e 'show databases like "%tpl%"' | while read dbname; do mysqldump -uroot --complete-insert "$dbname" > "$dbname".sql; done |