Skip to content

Added CTS and user identifiers features [ENT-22836]#219

Merged
DorAshkenaziHuman merged 5 commits intodevfrom
feature/cts-and-user-identifiers
Jan 29, 2026
Merged

Added CTS and user identifiers features [ENT-22836]#219
DorAshkenaziHuman merged 5 commits intodevfrom
feature/cts-and-user-identifiers

Conversation

@DorAshkenaziHuman
Copy link
Contributor

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 JwtExtractor to pull app_user_id and optional additional fields from a JWT in a configured cookie or header.
  • Extracts CTS from the pxcts cookie 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.

@DorAshkenaziHuman DorAshkenaziHuman merged commit c3c127c into dev Jan 29, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments