@sphereon/oid4vci-client 0.13.1-next.4 → 0.14.0

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.
Files changed (55) hide show
  1. package/dist/AccessTokenClient.d.ts.map +1 -1
  2. package/dist/AccessTokenClient.js +8 -8
  3. package/dist/AccessTokenClient.js.map +1 -1
  4. package/dist/AccessTokenClientV1_0_11.d.ts.map +1 -1
  5. package/dist/AccessTokenClientV1_0_11.js +8 -9
  6. package/dist/AccessTokenClientV1_0_11.js.map +1 -1
  7. package/dist/AuthorizationCodeClient.d.ts +4 -4
  8. package/dist/AuthorizationCodeClient.d.ts.map +1 -1
  9. package/dist/AuthorizationCodeClient.js +10 -10
  10. package/dist/AuthorizationCodeClient.js.map +1 -1
  11. package/dist/AuthorizationCodeClientV1_0_11.d.ts +2 -2
  12. package/dist/AuthorizationCodeClientV1_0_11.d.ts.map +1 -1
  13. package/dist/AuthorizationCodeClientV1_0_11.js +6 -6
  14. package/dist/AuthorizationCodeClientV1_0_11.js.map +1 -1
  15. package/dist/CredentialOfferClient.d.ts.map +1 -1
  16. package/dist/CredentialOfferClient.js +6 -7
  17. package/dist/CredentialOfferClient.js.map +1 -1
  18. package/dist/CredentialOfferClientV1_0_11.d.ts.map +1 -1
  19. package/dist/CredentialOfferClientV1_0_11.js +4 -4
  20. package/dist/CredentialOfferClientV1_0_11.js.map +1 -1
  21. package/dist/CredentialOfferClientV1_0_13.d.ts.map +1 -1
  22. package/dist/CredentialOfferClientV1_0_13.js +6 -7
  23. package/dist/CredentialOfferClientV1_0_13.js.map +1 -1
  24. package/dist/CredentialRequestClient.js +5 -5
  25. package/dist/CredentialRequestClient.js.map +1 -1
  26. package/dist/CredentialRequestClientBuilder.js +2 -2
  27. package/dist/CredentialRequestClientBuilder.js.map +1 -1
  28. package/dist/CredentialRequestClientBuilderV1_0_11.js +2 -2
  29. package/dist/CredentialRequestClientBuilderV1_0_11.js.map +1 -1
  30. package/dist/CredentialRequestClientBuilderV1_0_13.js +2 -2
  31. package/dist/CredentialRequestClientBuilderV1_0_13.js.map +1 -1
  32. package/dist/CredentialRequestClientV1_0_11.js +2 -2
  33. package/dist/CredentialRequestClientV1_0_11.js.map +1 -1
  34. package/dist/OpenID4VCIClient.js +17 -17
  35. package/dist/OpenID4VCIClient.js.map +1 -1
  36. package/dist/OpenID4VCIClientV1_0_11.js +16 -16
  37. package/dist/OpenID4VCIClientV1_0_11.js.map +1 -1
  38. package/dist/OpenID4VCIClientV1_0_13.js +17 -17
  39. package/dist/OpenID4VCIClientV1_0_13.js.map +1 -1
  40. package/dist/ProofOfPossessionBuilder.js +1 -1
  41. package/dist/ProofOfPossessionBuilder.js.map +1 -1
  42. package/dist/functions/AccessTokenUtil.d.ts.map +1 -1
  43. package/dist/functions/OpenIDUtils.d.ts.map +1 -1
  44. package/dist/functions/notifications.js +2 -3
  45. package/dist/functions/notifications.js.map +1 -1
  46. package/lib/AccessTokenClient.ts +4 -4
  47. package/lib/AccessTokenClientV1_0_11.ts +5 -5
  48. package/lib/CredentialOfferClient.ts +9 -8
  49. package/lib/CredentialOfferClientV1_0_11.ts +5 -3
  50. package/lib/CredentialOfferClientV1_0_13.ts +8 -7
  51. package/lib/__tests__/AccessTokenClient.spec.ts +9 -2
  52. package/lib/__tests__/MetadataClient.spec.ts +3 -3
  53. package/lib/__tests__/MetadataMocks.ts +10 -5
  54. package/lib/__tests__/data/VciDataFixtures.ts +12 -11
  55. package/package.json +19 -19
@@ -3,6 +3,7 @@ import {
3
3
  IssuerCredentialSubjectDisplay,
4
4
  IssuerMetadataV1_0_08,
5
5
  IssuerMetadataV1_0_13,
6
+ PRE_AUTH_GRANT_LITERAL,
6
7
  } from '@sphereon/oid4vci-common';
7
8
  import { ICredentialStatus, W3CVerifiableCredential } from '@sphereon/ssi-types';
8
9
 
@@ -76,7 +77,7 @@ const mockData: VciMockDataStructure = {
76
77
  credential_endpoint: 'https://ngi-oidc4vci-test.spruceid.xyz/credential',
77
78
  token_endpoint: 'https://ngi-oidc4vci-test.spruceid.xyz/token',
78
79
  jwks_uri: 'https://ngi-oidc4vci-test.spruceid.xyz/jwks',
79
- grant_types_supported: ['urn:ietf:params:oauth:grant-type:pre-authorized_code'],
80
+ grant_types_supported: [PRE_AUTH_GRANT_LITERAL],
80
81
  credentials_supported: {
81
82
  OpenBadgeCredential: {
82
83
  formats: {
@@ -100,7 +101,7 @@ const mockData: VciMockDataStructure = {
100
101
  method: 'POST',
101
102
  request: {
102
103
  client_id: 'sphereon:ssi-wallet',
103
- grant_type: 'urn:ietf:params:oauth:grant-type:pre-authorized_code',
104
+ grant_type: PRE_AUTH_GRANT_LITERAL,
104
105
  'pre-authorized_code':
105
106
  'eyJhbGciOiJFUzI1NiJ9.eyJjcmVkZW50aWFsX3R5cGUiOlsiT3BlbkJhZGdlQ3JlZGVudGlhbCJdLCJleHAiOiIyMDIzLTA0LTE5VDExOjUzOjM4WiIsIm5vbmNlIjoiN3F4YldMcktpNTZjNjRlWjljaHJZeVUxbFVVQzMzV1YifQ.tDxAC8CsqN-DALOmY5ANEVf96fZfTzqHL4Aiq4IZzMJ-zSCrNkNBeuOK5D3RsJhSZcDMu2XvuG1RrSXJV0zHRg',
106
107
  },
@@ -141,7 +142,7 @@ const mockData: VciMockDataStructure = {
141
142
  pushed_authorization_request_endpoint: 'https://jff.walt.id/issuer-api/default/oidc/par',
142
143
  issuer: 'https://jff.walt.id/issuer-api/default',
143
144
  jwks_uri: 'https://jff.walt.id/issuer-api/default/oidc',
144
- grant_types_supported: ['authorization_code', 'urn:ietf:params:oauth:grant-type:pre-authorized_code'],
145
+ grant_types_supported: ['authorization_code', PRE_AUTH_GRANT_LITERAL],
145
146
  request_uri_parameter_supported: true,
146
147
  credentials_supported: {
147
148
  VerifiableId: {
@@ -343,7 +344,7 @@ const mockData: VciMockDataStructure = {
343
344
  method: 'POST',
344
345
  request: {
345
346
  client_id: 'sphereon:ssi-wallet',
346
- grant_type: 'urn:ietf:params:oauth:grant-type:pre-authorized_code',
347
+ grant_type: PRE_AUTH_GRANT_LITERAL,
347
348
  'pre-authorized_code':
348
349
  'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiI1NzhkZWZjOS0wMTFlLTQ3ZTAtYmQ5YS03MWFlOGU4ZTJjYzYiLCJwcmUtYXV0aG9yaXplZCI6dHJ1ZX0.uh1rX4qVqlp-YW-itLON8Zmov8t-xugCFDXlUSPuTSQ',
349
350
  },
@@ -450,7 +451,7 @@ const mockData: VciMockDataStructure = {
450
451
  ],
451
452
  },
452
453
  code_challenge_methods_supported: ['plain', 'S256'],
453
- grant_types_supported: ['authorization_code', 'urn:ietf:params:oauth:grant-type:pre-authorized_code'],
454
+ grant_types_supported: ['authorization_code', PRE_AUTH_GRANT_LITERAL],
454
455
  token_endpoint_auth_methods_supported: ['client_secret_post', 'client_secret_basic'],
455
456
  issuer: 'https: //oidc4vc.uniissuer.io/',
456
457
  authorization_endpoint: 'https://oidc4vc.uniissuer.io/1.0/authorize',
@@ -463,7 +464,7 @@ const mockData: VciMockDataStructure = {
463
464
  method: 'POST',
464
465
  request: {
465
466
  client_id: 'sphereon:ssi-wallet',
466
- grant_type: 'urn:ietf:params:oauth:grant-type:pre-authorized_code',
467
+ grant_type: PRE_AUTH_GRANT_LITERAL,
467
468
  'pre-authorized_code': 'rQhxqvmEQef2pFChuedmDWlp6iIifUVI',
468
469
  },
469
470
  response: {
@@ -505,7 +506,7 @@ const mockData: VciMockDataStructure = {
505
506
  jwks_uri: 'https://launchpad.vii.electron.mattrlabs.io/oidc/v1/auth/jwks',
506
507
  token_endpoint_auth_methods_supported: ['none', 'client_secret_basic', 'client_secret_jwt', 'client_secret_post', 'private_key_jwt'],
507
508
  code_challenge_methods_supported: ['S256'],
508
- grant_types_supported: ['authorization_code', 'urn:ietf:params:oauth:grant-type:pre-authorized_code'],
509
+ grant_types_supported: ['authorization_code', PRE_AUTH_GRANT_LITERAL],
509
510
  response_modes_supported: ['form_post', 'fragment', 'query'],
510
511
  response_types_supported: ['code id_token', 'code', 'id_token', 'none'],
511
512
  scopes_supported: ['PermanentResidentCard', 'AcademicAward', 'LearnerProfile', 'OpenBadgeCredential'],
@@ -564,7 +565,7 @@ const mockData: VciMockDataStructure = {
564
565
  method: 'POST',
565
566
  request: {
566
567
  client_id: 'sphereon:ssi-wallet',
567
- grant_type: 'urn:ietf:params:oauth:grant-type:pre-authorized_code',
568
+ grant_type: PRE_AUTH_GRANT_LITERAL,
568
569
  'pre-authorized_code': 'kI_19c0PtisCJBG-ngd9mA47UCKx4uoKglUp0gqmxKt',
569
570
  },
570
571
  response: {
@@ -658,7 +659,7 @@ const mockData: VciMockDataStructure = {
658
659
  credential_endpoint: 'https://oidc4vc.diwala.io/credential',
659
660
  token_endpoint: 'https://oidc4vc.diwala.io/token',
660
661
  jwks_uri: 'https://oidc4vc.diwala.io/jwks',
661
- grant_types_supported: ['urn:ietf:params:oauth:grant-type:pre-authorized_code'],
662
+ grant_types_supported: [PRE_AUTH_GRANT_LITERAL],
662
663
  credentials_supported: {
663
664
  OpenBadgeCredential: {
664
665
  formats: {
@@ -677,7 +678,7 @@ const mockData: VciMockDataStructure = {
677
678
  method: 'POST',
678
679
  request: {
679
680
  client_id: 'sphereon:ssi-wallet',
680
- grant_type: 'urn:ietf:params:oauth:grant-type:pre-authorized_code',
681
+ grant_type: PRE_AUTH_GRANT_LITERAL,
681
682
  'pre-authorized_code':
682
683
  'eyJhbGciOiJIUzI1NiJ9.eyJjcmVkZW50aWFsX3R5cGUiOiJPcGVuQmFkZ2VDcmVkZW50aWFsIiwiZXhwIjoxNjgxOTE1NzI5fQ.JmhU1jhMfw3f_DaIqnxurPyIW1makcwUs49Fm253z5Q',
683
684
  },
@@ -1408,7 +1409,7 @@ const mockData: VciMockDataStructure = {
1408
1409
  name: 'Chamber of Commerce',
1409
1410
  },
1410
1411
  ],
1411
- grant_types_supported: ['authorization_code', 'urn:ietf:params:oauth:grant-type:pre-authorized_code'],
1412
+ grant_types_supported: ['authorization_code', PRE_AUTH_GRANT_LITERAL],
1412
1413
  id_token_signing_alg_values_supported: ['ES256'],
1413
1414
  issuer: 'https://mijnkvk.acc.credenco.com',
1414
1415
  jwks_uri: 'https://mijnkvk.acc.credenco.com/jwks',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sphereon/oid4vci-client",
3
- "version": "0.13.1-next.4+b1d0422",
3
+ "version": "0.14.0",
4
4
  "description": "OpenID for Verifiable Credential Issuance (OpenID4VCI) client",
5
5
  "source": "lib/index.ts",
6
6
  "main": "dist/index.js",
@@ -15,35 +15,35 @@
15
15
  "build": "tsc"
16
16
  },
17
17
  "dependencies": {
18
- "@sphereon/oid4vci-common": "0.13.1-next.4+b1d0422",
19
- "@sphereon/ssi-types": "0.26.1-next.6",
18
+ "@sphereon/oid4vci-common": "0.14.0",
19
+ "@sphereon/ssi-types": "0.26.1-next.132",
20
20
  "cross-fetch": "^3.1.8",
21
- "debug": "^4.3.4"
21
+ "debug": "^4.3.5"
22
22
  },
23
23
  "devDependencies": {
24
- "@sphereon/ssi-sdk-ext.key-utils": "^0.18.2",
24
+ "@sphereon/ssi-sdk-ext.key-utils": "^0.22.0",
25
25
  "@transmute/did-key.js": "^0.3.0-unstable.10",
26
26
  "@trust/keyto": "^2.0.0-alpha1",
27
- "@types/jest": "^29.5.3",
28
- "@types/node": "^18.17.4",
29
- "@types/uuid": "^9.0.6",
27
+ "@types/jest": "^29.5.12",
28
+ "@types/node": "^18.19.39",
29
+ "@types/uuid": "^9.0.8",
30
30
  "@typescript-eslint/eslint-plugin": "^5.62.0",
31
31
  "@typescript-eslint/parser": "^5.62.0",
32
32
  "codecov": "^3.8.3",
33
- "dotenv": "^16.3.1",
34
- "eslint": "^8.46.0",
35
- "eslint-config-prettier": "^9.0.0",
33
+ "dotenv": "^16.4.5",
34
+ "eslint": "^8.57.0",
35
+ "eslint-config-prettier": "^9.1.0",
36
36
  "eslint-plugin-eslint-comments": "^3.2.0",
37
- "eslint-plugin-import": "^2.28.0",
38
- "jest": "^29.6.2",
37
+ "eslint-plugin-import": "^2.29.1",
38
+ "jest": "^29.7.0",
39
39
  "jest-junit": "^16.0.0",
40
- "jose": "^4.14.4",
41
- "nock": "^13.3.2",
40
+ "jose": "^4.15.9",
41
+ "nock": "^13.5.4",
42
42
  "npm-run-all": "^4.1.5",
43
43
  "open-cli": "^7.2.0",
44
- "ts-jest": "^29.1.1",
45
- "ts-node": "^10.9.1",
46
- "typescript": "5.3.3",
44
+ "ts-jest": "^29.1.5",
45
+ "ts-node": "^10.9.2",
46
+ "typescript": "5.5.3",
47
47
  "uint8arrays": "3.1.1",
48
48
  "uuid": "^9.0.1"
49
49
  },
@@ -69,5 +69,5 @@
69
69
  "OIDC4VCI",
70
70
  "OID4VCI"
71
71
  ],
72
- "gitHead": "b1d04227a8e65c226235d1782abb87ab0f1aa0bd"
72
+ "gitHead": "db63533301a8491f57728c903ea6099bbd66e1f8"
73
73
  }