Skip to content

Symfony bundle for PcVue client which is base on OAuth2 authentication

License

Notifications You must be signed in to change notification settings

maillotf/pcvue-bridge-bundle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pcvue-bridge-bundle

Software license Latest stable Packagist PHP Version Support

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.main'

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

About

Symfony bundle for PcVue client which is base on OAuth2 authentication

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages