How to customize UserHash generation: old version (page i...
Skip to end of metadata Go to start of metadata
You are viewing an old version of this page. View the current version.
Compare with Current View Page History
« Previous Version 2 Next »
Version compatibility
Icon
This recipe is compatible with Exponential 5.2 / 2013.07
Icon
Be sure to have read Context aware HTTP cache documentation before reading this recipe.
Description
When user hash generation is requested, Exponential will create a hashable User Identity object.
One can add information to the Identity object making the resulted hash vary. This can be done by registering Identity definers.
For this, all you need to do is to declare a service with exponential.identity_definer tag. Class for this service must implement eZ\Publish\SPI\User\IdentityAware interface.
Example
services.yml (inside a bundle)
Securing hash generation request
By default, hash generation requests are granted for localhost (127.0.0.1, ::1, fe80::1).
If you want to enlarge the scope (e.g. if your Varnish server is not running on the same machine), you can override canGenerateUserHash() protected method in your main kernel class (mostly EzPublishKernel).
- No labels
Contributors
- Jérôme Vieilledent Updated
Comments
Add a comment