Skip to content

feat(auth): return the access key ID on access key exchange - #449

Draft
yosiharan wants to merge 1 commit into
mainfrom
sdk-update/v1-auth-accesskey-20261120-114349
Draft

yosiharan wants to merge 1 commit into
mainfrom
sdk-update/v1-auth-accesskey-20261120-114349

Conversation

@yosiharan

Copy link
Copy Markdown
Contributor

Related Issues

Required for:
https://github.com/descope/etc/issues/19999

Description

The SDK can now return the ID of an exchanged access key alongside the session token.

Shared code:

  • exchangeAccessKey(accessKey, loginOptions) now delegates to the new method and returns its token: same validation, route, credential and body, so callers get the same Token.

Backwards compatibility:

  • The existing exchangeAccessKey methods keep their Token return type; the key ID comes through new methods instead.
  • The new ExchangeAccessKeyResponse extends JWTResponse, so JWTResponse and its constructors are untouched.

Interface and enum additions:

  • AuthenticationService gains exchangeAccessKeyAuthenticationInfo(String) and exchangeAccessKeyAuthenticationInfo(String, AccessKeyLoginOptions), returning the new AccessKeyAuthenticationInfo (token + keyId).

Also: the README gains an "Exchanging an Access Key" snippet.

In a Nutshell

  • POST /v1/auth/accesskey/exchange -> AuthenticationService.exchangeAccessKeyAuthenticationInfo (gains keyId)

Must

  • Tests
  • Documentation (if applicable)

Generated by Descope SDK Agent 🤖🌟

@shuni-bot

shuni-bot Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

🐕 Shuni Review

No new issues found.

Approval outcome: APPROVED
Reason: Full review completed with no findings and clear review threads.

🤖 Model: claude-opus-5.5 · Effort: medium


Review scope: Full review

Reviewed files (6)
  • README.md
  • src/main/java/com/descope/model/auth/AccessKeyAuthenticationInfo.java
  • src/main/java/com/descope/model/jwt/response/ExchangeAccessKeyResponse.java
  • src/main/java/com/descope/sdk/auth/AuthenticationService.java
  • src/main/java/com/descope/sdk/auth/impl/AuthenticationServiceImpl.java
  • src/test/java/com/descope/sdk/auth/impl/AuthenticationServiceImplTest.java

🐕 Review complete — View session on Shuni Portal 🐾

🤖 Model: claude-opus-5.5 · Effort: medium

@shuni-bot shuni-bot Bot 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.

🐕 Shuni review: no new findings. Every changed file in this pull request was reviewed.

The full review summary is in Shuni's sticky review comment on this pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant