You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+26-28Lines changed: 26 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,27 +7,26 @@ You can find the latest released version [here](https://github.com/queueit/Known
7
7
8
8
## Implementation
9
9
The KnownUser validation must be done on *all requests except requests for static and cached pages, resources like images, css files and ...*.
10
-
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.
10
+
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.
11
11
12
-
If we have the `integrationconfig.json` copied in the folder beside other knownuser files inside web application folder then
13
-
the following method is all that is needed to validate that a user has been through the queue:
12
+
If the integrationconfig.json file is placed in the same folder as the other KnownUser files within the web application directory,
13
+
then the following method is all that’s needed to validate that a user has passed through the queue:
// Use your own logging framework to log the error
67
-
// This was a configuration error, so we let the user continue
66
+
// This is a configuration error, so we allow the user to continue
68
67
}
69
68
```
70
69
71
-
Helper method to get the current url (you can have your own).
72
-
The result of this helper method is used to match Triggers and as the Target url (where to return the users to).
73
-
It is therefor important that the result is exactly the url of the users browsers.
70
+
Helper method to get the current url (you can use your own implementation).
71
+
The result of this helper method is used to match Triggers and as the Target url (where users are returned to).
72
+
It is therefore important that the result exactly matches the URL in the user's browser.
74
73
75
-
So if your webserver is e.g. behind a load balancer that modifies the host name or port, reformat the helper method as needed:
74
+
So, if your web server is, for example, behind a load balancer that modifies the hostname or port, adjust the helper method accordingly:
76
75
```php
77
76
function getFullRequestUri()
78
77
{
@@ -91,14 +90,13 @@ So if your webserver is e.g. behind a load balancer that modifies the host name
91
90
92
91
## Implementation using inline queue configuration
93
92
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.
94
-
This can be done by adding custom filtering logic before caling the `KnownUser::resolveQueueRequestByLocalConfig()` method.
93
+
This can be done by adding custom filtering logic before calling the `QueueIT\KnownUserV3\SDK\KnownUser::resolveQueueRequestByLocalConfig()` method.
95
94
96
95
The following is an example of how to specify the configuration in code:
97
96
98
97
```php
99
-
require_once( __DIR__ .'Models.php');
100
-
require_once( __DIR__ .'KnownUser.php');
101
-
require_once( __DIR__ .'QueueITHelpers.php');
98
+
require_once( __DIR__ .'/Models.php');
99
+
require_once( __DIR__ .'/KnownUser.php');
102
100
103
101
$customerID = ""; //Your Queue-it customer ID
104
102
$secretKey = ""; //Your 72 char secret key as specified in Go Queue-it self-service platform
// Use your own logging framework to log the error
157
-
// This was a configuration error, so we let the user continue
155
+
// This is a configuration error, so we allow the user to continue
158
156
}
159
157
```
160
158
## Request body trigger (advanced)
161
159
162
160
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.
163
-
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.
161
+
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.
164
162
Once enabled you will need to update your integration so request body is available for the connector.
165
163
You need to create a new context provider similar to this one:
0 commit comments