Command Flags
Flag | Options | Description |
---|---|---|
-codec:a |
libfaac, libfdk_aac, libvorbis | Audio Codec |
-quality |
best, good, realtime | Video Quality |
-b:a |
128k, 192k, 256k, 320k | Audio Bitrate |
-codec:v |
mpeg4, libx264, libvpx-vp9 | Video Codec |
/** | |
* Simple script to show how to solve the scrope update | |
* When using the native js TimeOut call | |
* | |
* @author dassiorleando | |
*/ | |
(function (angular) { | |
'use strict'; | |
angular |
/* | |
Node.js, express, oauth example using Twitters API | |
Install Dependencies: | |
npm install express | |
npm install oauth | |
Create App File: | |
Save this file to app.js | |
Command Flags
Flag | Options | Description |
---|---|---|
-codec:a |
libfaac, libfdk_aac, libvorbis | Audio Codec |
-quality |
best, good, realtime | Video Quality |
-b:a |
128k, 192k, 256k, 320k | Audio Bitrate |
-codec:v |
mpeg4, libx264, libvpx-vp9 | Video Codec |
/* | |
Node.js, express, oauth example using Twitters API | |
Install Dependencies: | |
npm install express | |
npm install oauth | |
Create App File: | |
Save this file to app.js | |
package cm.flashbusiness.core.util; | |
import java.text.ParseException; | |
import java.text.SimpleDateFormat; | |
import java.util.Date; | |
import org.joda.time.DateTime; | |
/** | |
* @author dassi |
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. :
In MEAN data is collected and communicated in the package and it goes through the different layers of angular, express and mongo. | |
The data "moves" "up the stack" from the angular view to the controller and then the service and from then to an express route a controller and model schema which is used to save the object in the db. | |
We'll use the create.html from the articles core package to demonstrate this. |
<?php | |
namespace NoxLogic\DemoBundle\Form\Type; | |
use Doctrine\ORM\EntityManager; | |
use NoxLogic\DemoBundle\Entity\Province; | |
use Symfony\Component\Form\AbstractType; | |
use Symfony\Component\Form\FormBuilderInterface; | |
use Symfony\Component\Form\FormEvent; | |
use Symfony\Component\Form\FormEvents; |
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.