Skip to content
Compare
Choose a tag to compare
@maillotf maillotf released this 08 Oct 12:17
· 6 commits to master since this release
4d86046

Papercut-bridge-bundle

Symfony bundle for PcVue client which is base on OAuth2 authentication

Required configuration

Modify framework.yaml

pcvue:
    authentication:
        protocol: "http"
        host: "127.0.0.1"
        port: "80"
        client_id: "CLIENT_ID"
        client_secret: "CLIENT_SECRET"
        username: "USERNAME"
        password: "PASSWORD"
#        root_dir: "ROOT_DIR"

root_dir is optional

Modify services.yaml

services:
    MaillotF\Pcvue\PcvueBridgeBundle\Service\PcvueService: '@pcvue.service'

##Package instalation with composer

$ composer require maillotf/pcvue-bridge-bundle

Use in controller:

<?php
//...
use MaillotF\Pcvue\PcvueBridgeBundle\Service\PcvueService;

class exampleController extends AbstractController
{
	/**
	 * Example
	 * 
	 * @Route("example", name="example", methods={"GET"})
	 * 
	 */
	public function test(PcvueService $ps)
	{
		$user = $ps->user->getUser('4665');
		
		return ($this->json($user->getEmail()));
	}

}

FAQ

You can get answer in the FAQ