Skip to content

feat: generateLicenseToken for private key assertion - #2

Draft
tomasstark wants to merge 3 commits into
mainfrom
feat/private-key-jwt-assertion
Draft

feat: generateLicenseToken for private key assertion#2
tomasstark wants to merge 3 commits into
mainfrom
feat/private-key-jwt-assertion

Conversation

@tomasstark

@tomasstark tomasstark commented Apr 1, 2026

Copy link
Copy Markdown
Contributor

This PR adds a new method generateLicenseToken to allow for generating a token using private key JWT assertion. This is to reach feature parity with TS SDK.

⚠️ This is in draft mode because Supertab Connect currently support client credentials flow only. ⚠️

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 generating a license token via private key JWT client assertion (to match TS SDK capabilities), exposing it as a new static API and wiring it through the customer token client, with accompanying docs and tests.

Changes:

  • Introduces SupertabConnect::generateLicenseToken() (static) and LicenseTokenClient::generateLicenseToken() (instance).
  • Refactors token exchange internals in LicenseTokenClient (shared content matching + shared POST/response parsing).
  • Adds PHPUnit coverage for EC/RSA assertions, claims, request shape, caching, and error cases; updates README with usage.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/SupertabConnect.php Adds new static entrypoint delegating to LicenseTokenClient.
src/Customer/LicenseTokenClient.php Implements JWT assertion flow + refactors token request/response handling.
tests/SupertabConnectTest.php Adds coverage for the new static method.
tests/Customer/LicenseTokenClientTest.php Adds comprehensive tests for JWT assertion flow.
README.md Documents the new method and provides an example.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/Customer/LicenseTokenClient.php Outdated
Comment thread tests/Customer/LicenseTokenClientTest.php Outdated
@tomasstark
tomasstark marked this pull request as draft April 1, 2026 10:49
@tomasstark tomasstark added the WIP Work In Progress label Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

WIP Work In Progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants