Added CTS and user identifiers features [ENT-22836]#219
Merged
DorAshkenaziHuman merged 5 commits intodevfrom Jan 29, 2026
Merged
Added CTS and user identifiers features [ENT-22836]#219DorAshkenaziHuman merged 5 commits intodevfrom
DorAshkenaziHuman merged 5 commits intodevfrom
Conversation
Release/v4.0.1 -> Master
…_routes triggered requests sending px_cookie field on activities
There was a problem hiding this comment.
Pull request overview
Adds support for extracting Cross-Tab Session (CTS) and JWT-based user identifiers and forwarding them to PerimeterX risk/activity payloads.
Changes:
- Introduces a
JwtExtractorto pullapp_user_idand optional additional fields from a JWT in a configured cookie or header. - Extracts CTS from the
pxctscookie and includes CTS/JWT identifiers in Risk API and Activities payload “additional” fields. - Updates docs/metadata to reflect the new “user_identifiers” feature and configuration options.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/UserIdentifiers/JwtExtractor.php | New helper to decode JWT payload and extract configured fields. |
| src/Perimeterx.php | Adds JWT config defaults and plugs JWT extraction into additional fields creation. |
| src/PerimeterxContext.php | Stores CTS/app user id/JWT additional fields on the request context. |
| src/PerimeterxS2SValidator.php | Adds CTS/JWT identifier fields to Risk API request body; includes decoded cookie for sensitive_route. |
| src/PerimeterxActivitiesClient.php | Adds CTS/JWT identifier fields to activity details payload. |
| src/PerimeterxRiskClient.php | Docblock update for millisecond timestamp return type. |
| src/PerimeterxLogger.php | Docblock update to allow Stringable messages. |
| px_metadata.json | Advertises user_identifiers capability. |
| examples/test-adapter.php | Adds config mapping support for JWT identifier options in spec tests. |
| README.md | Documents JWT User Identifiers feature and configuration options. |
| CHANGELOG.md | Adds changelog entry for CTS/JWT identifiers and sensitive-route decoded-cookie behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
chen-zimmer-px
requested changes
Jan 27, 2026
chen-zimmer-px
approved these changes
Jan 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://perimeterx.atlassian.net/browse/ENT-22836