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 make sure that the Triggers only fire on page requests (including ajax requests) and not on e.g. image.
If the integrationconfig.json file is placed in the same folder as the other KnownUser files within the web application directory, then the following method is all that’s needed to validate that a user has passed through the queue:
Helper method to get the current url (you can use your own implementation). The result of this helper method is used to match Triggers and as the Target url (where users are returned to). It is therefore important that the result exactly matches the URL in the user's browser.
So, if your web server is, for example, behind a load balancer that modifies the hostname or port, adjust the helper method accordingly:
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 calling the QueueIT\KnownUserV3\SDK\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 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