Download the PHP package flosch/proxy-bundle without Composer
On this page you can find all versions of the php package flosch/proxy-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download flosch/proxy-bundle
More information about flosch/proxy-bundle
Files in flosch/proxy-bundle
Package proxy-bundle
Short Description Authenticated symfony3 bundle: Authentication layer on top of a PHP proxy.
License MIT
Homepage https://github.com/flo-sch/FloschProxyBundle
Informations about the package proxy-bundle
Symfony FloschProxyBundle
Authenticated symfony bundle: provides an authentication layer on top of a PHP proxy.
This bundle provides a User model and a YamlUserProvider, 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 Guzzle PHP library, currently v6.
Why?
This bundle is usefull if you want to proxy an HTTP application, with an authentication layer a bit stronger than http standards such as HTTP_BASIC.
Security
Please note that this bundle will be security-wise usefull if, and only if, you can provide an HTTPS certificate for your domain.
Requirements
- Symfony 3.0 or above
Installation
To install this bundle, run the command below and you will get the latest version from Packagist.
Usage
Load required bundles in AppKernel.php:
Set up configuration
Style
For the login page, FloschProxyBundle uses an icons font called Font Awesome.
If you wish to keep the icons of the login page, you will need to copy the fonts sources to the web/fonts
folder of your project.
If you prefer not to use it, feel free to surcharge the login page template, by extending this bundle, as explained later in this doc.
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 FloschProxyBundle:
Authors
- Florent Schildknecht (Portfolio)
License
This bundle is released under the MIT license
All versions of proxy-bundle with dependencies
symfony/polyfill Version >=1.0
symfony/assetic-bundle Version ^2.8
guzzlehttp/guzzle Version ~6.0