gdc-sdk-node-ts 2.3.16 → 2.3.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -63,6 +63,8 @@ export type SmartTokenRequestInput = SmartTokenRequestContract & {
63
63
  presentationSubmission?: Record<string, unknown>;
64
64
  purpose?: string;
65
65
  requestBodyClaims?: Record<string, unknown>;
66
+ /** Compatibility bridge until every installed gdc-sdk-core-ts carries this field. */
67
+ vpTokenFallback?: 'id-token' | 'omit';
66
68
  smartTokenKind?: 'token-exchange' | 'openid-smart';
67
69
  tokenCacheKey?: string;
68
70
  endpointId?: string;
@@ -60,7 +60,12 @@ export async function requestSmartTokenWithDeps(deps) {
60
60
  code_challenge: deps.input.codeChallenge || 'demo-code-challenge',
61
61
  code_challenge_method: deps.input.codeChallengeMethod || 'S256',
62
62
  acr_values: deps.input.acrValues || 'urn:antifraud:acr:openid4vp:employee',
63
- vp_token: deps.input.vpToken || deps.input.idToken,
63
+ id_token: deps.input.idToken,
64
+ ...(deps.input.vpToken
65
+ ? { vp_token: deps.input.vpToken }
66
+ : deps.input.vpTokenFallback === 'omit'
67
+ ? {}
68
+ : { vp_token: deps.input.idToken }),
64
69
  presentation_submission: deps.input.presentationSubmission,
65
70
  expires_in: 300,
66
71
  token_type: 'Bearer',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gdc-sdk-node-ts",
3
- "version": "2.3.16",
3
+ "version": "2.3.17",
4
4
  "description": "Next-generation Node runtime package for the GDC SDK family",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Antifraud Services Inc.",
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "dependencies": {
40
40
  "gdc-common-utils-ts": "^2.3.18",
41
- "gdc-sdk-core-ts": "~2.3.13"
41
+ "gdc-sdk-core-ts": "~2.3.14"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@types/node": "^20.14.10",