Download the PHP package fsb/proxy-bundle without Composer
On this page you can find all versions of the php package fsb/proxy-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download fsb/proxy-bundle
More information about fsb/proxy-bundle
Files in fsb/proxy-bundle
Package proxy-bundle
Short Description Authenticated symfony bundle: provides an authentication layer on top of a PHP proxy.
License MIT
Homepage https://github.com/Flo-Schield-Bobby/FsbProxyBundle
Informations about the package proxy-bundle
Symfony FsbProxyBundle
Authenticated symfony bundle: provides an authentication layer on top of a PHP proxy.
This bundle provides a User model and a UserProvider, to authenticate users based on a yml file. It also provides a Symfony command to add users with encrypted passwords.
Once the user is connected, it provides a PHP proxy thanks to 8p/Guzzle-Bundle and the Guzzle PHP library, currently v6.
Why?
This bundle is usefull if you want to proxy an HTTP application, with an authentication layer stronger than http standards such as HTTP_BASIC.
Requirements
- Symfony 2.7 or above
- 8p/GuzzleBundle (included by composer)
Installation
To install this bundle, run the command below and you will get the latest version by Packagist.
Usage
Load required bundles in AppKernel.php:
Set up configuration
Set up routing
app/config/routing.yml or any other routing file
Set up security
Authentication and users management
Here we are!
This bundle comes with a service called YamlUserProvider, providing users from a yaml file. To add an access, add a new yaml array of this user's informations :
You also have two commands to manage users from the console :
To create a new user :
Both username and password arguments are optionnal, the command will ask for it if you do not provide it. The ` (or ``) option allow to replace an existing user's password (if the user does not exists, he will be created).
To remove an existing user :
Username argument is optionnal, the command will ask for it if you do not provide it. The ` option allow to remove every existing users from the file.
Extend the bundle
The Bundle itself provides the security layer, with login and logout routes ; And a default login page, before "proxying" routes through the Guzzle client.
As a symfony bundle, you can extend it, to benefits of Symfony inheritance, Then override resources and / or controllers:
All you need to do is setting up your own bundle as child of FsbProxyBundle:
Authors
- Florent Schildknecht (Portfolio)
License
This bundle is released under the MIT license