Download the PHP package queueit/knownuserv3 without Composer
On this page you can find all versions of the php package queueit/knownuserv3. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download queueit/knownuserv3
More information about queueit/knownuserv3
Files in queueit/knownuserv3
Package knownuserv3
Short Description The Queue-it Security Framework is used to ensure that end users cannot bypass the queue by adding a server-side integration to your server.
License LGPL-3.0
Informations about the package knownuserv3
KnownUser.V3.PHP
Before getting started please read the documentation to get acquainted with server-side connectors.
This connector supports PHP >= 5.3.3.
You can find the latest released version here and packagist package here.
Implementation
The KnownUser validation must be done on all requests except requests for static and cached pages, resources like images, css files and .... So, if you add the KnownUser validation logic to a central place, then be sure that the Triggers only fire on page requests (including ajax requests) and not on e.g. image.
If we have the integrationconfig.json
copied in the folder beside other knownuser files inside web application folder then
the following method is all that is needed to validate that a user has been through the queue:
Helper method to get the current url (you can have your own). The result of this helper method is used to match Triggers and as the Target url (where to return the users to). It is therefor important that the result is exactly the url of the users browsers.
So if your webserver is e.g. behind a load balancer that modifies the host name or port, reformat the helper method as needed:
Implementation using inline queue configuration
Specify the configuration in code without using the Trigger/Action paradigm. In this case it is important only to queue-up page requests and not requests for resources.
This can be done by adding custom filtering logic before caling the KnownUser::resolveQueueRequestByLocalConfig()
method.
The following is an example of how to specify the configuration in code:
Request body trigger (advanced)
The connector supports triggering on request body content. An example could be a POST call with specific item ID where you want end-users to queue up for.
For this to work, you will need to contact Queue-it support or enable request body triggers in your integration settings in your GO Queue-it platform account.
Once enabled you will need to update your integration so request body is available for the connector.
You need to create a new context provider similar to this one:
And then use it instead of default HttpRequestProvider