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
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -159,6 +159,7 @@ const result = await gatekeeper.validateRequest();
159
159
deployment: string, // Deployment identifier from the API
160
160
token: string, // The session token
161
161
hash: string |null, // Signature hash for validation (when available)
162
+
requested: string, // Timestamp when the request was made
162
163
liteValidatorRedirect: boolean, // true = redirect to lite validator
163
164
liteValidatorUrl: string // URL for lite validator redirect
164
165
}
@@ -214,6 +215,19 @@ if (!result.promoted) {
214
215
}
215
216
```
216
217
218
+
### gatekeeper.redirectIfPromoted()
219
+
220
+
Redirects promoted users from a waiting room implementation back to the target site with fresh CrowdHandler parameters. This method is specifically for use in waiting room implementations.
221
+
222
+
```javascript
223
+
// In waiting room implementation
224
+
if (result.promoted) {
225
+
returngatekeeper.redirectIfPromoted();
226
+
}
227
+
```
228
+
229
+
**Use Case:** When building a custom waiting room that runs on your infrastructure, this method handles the redirect back to the protected resource with proper CrowdHandler parameters.
230
+
217
231
### gatekeeper.recordPerformance(options?)
218
232
219
233
Records performance metrics to help CrowdHandler optimize queue flow and capacity.
0 commit comments