3 namespace Wallabag\CoreBundle\Controller
;
5 use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route
;
6 use Symfony\Component\HttpFoundation\Request
;
7 use Symfony\Bundle\FrameworkBundle\Controller\Controller
;
9 class DeveloperController
extends Controller
12 * @param Request $request
14 * @Route("/developer", name="developer")
16 * @return \Symfony\Component\HttpFoundation\Response
18 public function indexAction(Request
$request)
20 return $this->render('WallabagCoreBundle:Developer:index.html.twig');
24 * @param Request $request
26 * @Route("/developer/client/create", name="create_client")
28 * @return \Symfony\Component\HttpFoundation\Response
30 public function createClientAction(Request
$request)
32 $clientManager = $this->container
->get('fos_oauth_server.client_manager.default');
33 $client = $clientManager->createClient();
34 $client->setRedirectUris(array('http://www.example.com'));
35 $client->setAllowedGrantTypes(array('token', 'authorization_code'));
36 $clientManager->updateClient($client);
38 return $this->render('WallabagCoreBundle:Developer:client.html.twig', array(
39 'client_id' => $client->getPublicId(),
40 'client_secret' => $client->getSecret(),
45 * @param Request $request
47 * @Route("/developer/howto/first-app", name="howto-firstapp")
49 * @return \Symfony\Component\HttpFoundation\Response
51 public function howtoFirstAppAction(Request
$request)
53 return $this->render('WallabagCoreBundle:Developer:howto_app.html.twig');