Download the PHP package ticketpark/expiring-url-bundle without Composer
On this page you can find all versions of the php package ticketpark/expiring-url-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ticketpark/expiring-url-bundle
More information about ticketpark/expiring-url-bundle
Files in ticketpark/expiring-url-bundle
Package expiring-url-bundle
Short Description Create urls which expire after a certain period.
License MIT
Informations about the package expiring-url-bundle
TicketparkExpiringUrlBundle
THIS BUNDLE IS NO LONGER MAINTAINED. IT IS SLOW AND WAS NOT DONE WELL. USE AT OWN RISK!
This Symfony2 bundles creates urls with expiration hashes. This allows for an url to become invalid after a certain time.
Example:
- Url pattern:
/some/url/{expirationHash}/{id}
- Generated url:
/some/url/2014-04-03T10:41:40+02:00.eaf378321b86d7ab2edb320be1be48672eb107562a3c8cebd3bc804620e1f4fe/123
Installation
Add TicketparkExcelBundle in your composer.json:
Now tell composer to download the bundle by running the command:
Enable the bundles in the kernel:
Configuration
By default no configuration is required. You can however override some config settings:
Usage
SImple usage
Simply add the expiration hash parameter to routes which should be expirable.
You will not have to take care of the expiration hash parameter when creating routes. This will be done automatically.
Example:
Advanced usage
The routing definition can be extended with two optional options:
expiring_url_identifier
Another url parameter which will be used to create a more specific expiration hash. Imagine you create an url like/some/url/{expirationHash}/123
. Without adding the identifier, the hash within this url would also allow to access/some/url/{expirationHash}/456
within the permitted time frame. Adding theexpiring_url_identifier
option ensures that only/some/url/{expirationHash}/123
will be accessible (and any other url using the same identifier) because a more specific expiration hash will be created.expiring_url_ttl
The time-to-live of this url in minutes. Overrides the default time-to-live.
License
This bundle is under the MIT license. See the complete license in the bundle:
Resources/meta/LICENSE
All versions of expiring-url-bundle with dependencies
symfony/framework-bundle Version ~2.3
symfony/yaml Version ~2.3
apinstein/expiring-hash Version dev-master
ticketpark/file-bundle Version ~0.1