maillotf / pcvue-bridge-bundle
A PcVue bundle for Symfony
Installs: 5
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 1
Open Issues: 0
Type:symfony-bundle
Requires
- php: ^7.1
- guzzlehttp/guzzle: ^6.3
- kamermans/guzzle-oauth2-subscriber: ^1.0
- symfony/config: ^3.2|^4.0|^4.1|^5.1
- symfony/dependency-injection: ^3.2|^4.0|^4.1|^5.1
- symfony/http-kernel: ^3.2|^4.0|^4.1|^5.1
Requires (Dev)
- phpunit/phpunit: ^6.5
This package is auto-updated.
Last update: 2024-10-23 19:20:50 UTC
README
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