@sphereon/ssi-sdk.siopv2-oid4vp-op-auth 0.33.1-feature.vcdm2.4 → 0.33.1-feature.vcdm2.tsup.19

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 (88) hide show
  1. package/dist/index.cjs +101201 -0
  2. package/dist/index.cjs.map +1 -0
  3. package/dist/index.d.cts +559 -0
  4. package/dist/index.d.ts +555 -8
  5. package/dist/index.js +101182 -11
  6. package/dist/index.js.map +1 -1
  7. package/package.json +40 -30
  8. package/src/agent/DidAuthSiopOpAuthenticator.ts +13 -14
  9. package/src/session/OpSession.ts +2 -2
  10. package/dist/agent/DidAuthSiopOpAuthenticator.d.ts +0 -36
  11. package/dist/agent/DidAuthSiopOpAuthenticator.d.ts.map +0 -1
  12. package/dist/agent/DidAuthSiopOpAuthenticator.js +0 -371
  13. package/dist/agent/DidAuthSiopOpAuthenticator.js.map +0 -1
  14. package/dist/index.d.ts.map +0 -1
  15. package/dist/link-handler/index.d.ts +0 -22
  16. package/dist/link-handler/index.d.ts.map +0 -1
  17. package/dist/link-handler/index.js +0 -45
  18. package/dist/link-handler/index.js.map +0 -1
  19. package/dist/localization/Localization.d.ts +0 -9
  20. package/dist/localization/Localization.d.ts.map +0 -1
  21. package/dist/localization/Localization.js +0 -41
  22. package/dist/localization/Localization.js.map +0 -1
  23. package/dist/localization/translations/en.json +0 -9
  24. package/dist/localization/translations/nl.json +0 -8
  25. package/dist/machine/CallbackStateListener.d.ts +0 -3
  26. package/dist/machine/CallbackStateListener.d.ts.map +0 -1
  27. package/dist/machine/CallbackStateListener.js +0 -35
  28. package/dist/machine/CallbackStateListener.js.map +0 -1
  29. package/dist/machine/Siopv2Machine.d.ts +0 -8
  30. package/dist/machine/Siopv2Machine.d.ts.map +0 -1
  31. package/dist/machine/Siopv2Machine.js +0 -362
  32. package/dist/machine/Siopv2Machine.js.map +0 -1
  33. package/dist/services/IdentifierService.d.ts +0 -3
  34. package/dist/services/IdentifierService.d.ts.map +0 -1
  35. package/dist/services/IdentifierService.js +0 -15
  36. package/dist/services/IdentifierService.js.map +0 -1
  37. package/dist/services/Siopv2MachineService.d.ts +0 -18
  38. package/dist/services/Siopv2MachineService.d.ts.map +0 -1
  39. package/dist/services/Siopv2MachineService.js +0 -296
  40. package/dist/services/Siopv2MachineService.js.map +0 -1
  41. package/dist/session/OID4VP.d.ts +0 -72
  42. package/dist/session/OID4VP.d.ts.map +0 -1
  43. package/dist/session/OID4VP.js +0 -213
  44. package/dist/session/OID4VP.js.map +0 -1
  45. package/dist/session/OpSession.d.ts +0 -39
  46. package/dist/session/OpSession.d.ts.map +0 -1
  47. package/dist/session/OpSession.js +0 -329
  48. package/dist/session/OpSession.js.map +0 -1
  49. package/dist/session/functions.d.ts +0 -37
  50. package/dist/session/functions.d.ts.map +0 -1
  51. package/dist/session/functions.js +0 -147
  52. package/dist/session/functions.js.map +0 -1
  53. package/dist/session/index.d.ts +0 -4
  54. package/dist/session/index.d.ts.map +0 -1
  55. package/dist/session/index.js +0 -4
  56. package/dist/session/index.js.map +0 -1
  57. package/dist/types/IDidAuthSiopOpAuthenticator.d.ts +0 -120
  58. package/dist/types/IDidAuthSiopOpAuthenticator.d.ts.map +0 -1
  59. package/dist/types/IDidAuthSiopOpAuthenticator.js +0 -7
  60. package/dist/types/IDidAuthSiopOpAuthenticator.js.map +0 -1
  61. package/dist/types/error/index.d.ts +0 -8
  62. package/dist/types/error/index.d.ts.map +0 -1
  63. package/dist/types/error/index.js +0 -2
  64. package/dist/types/error/index.js.map +0 -1
  65. package/dist/types/identifier/index.d.ts +0 -53
  66. package/dist/types/identifier/index.d.ts.map +0 -1
  67. package/dist/types/identifier/index.js +0 -2
  68. package/dist/types/identifier/index.js.map +0 -1
  69. package/dist/types/index.d.ts +0 -6
  70. package/dist/types/index.d.ts.map +0 -1
  71. package/dist/types/index.js +0 -6
  72. package/dist/types/index.js.map +0 -1
  73. package/dist/types/machine/index.d.ts +0 -124
  74. package/dist/types/machine/index.d.ts.map +0 -1
  75. package/dist/types/machine/index.js +0 -54
  76. package/dist/types/machine/index.js.map +0 -1
  77. package/dist/types/siop-service/index.d.ts +0 -80
  78. package/dist/types/siop-service/index.d.ts.map +0 -1
  79. package/dist/types/siop-service/index.js +0 -11
  80. package/dist/types/siop-service/index.js.map +0 -1
  81. package/dist/utils/CredentialUtils.d.ts +0 -23
  82. package/dist/utils/CredentialUtils.d.ts.map +0 -1
  83. package/dist/utils/CredentialUtils.js +0 -55
  84. package/dist/utils/CredentialUtils.js.map +0 -1
  85. package/dist/utils/dcql.d.ts +0 -5
  86. package/dist/utils/dcql.d.ts.map +0 -1
  87. package/dist/utils/dcql.js +0 -34
  88. package/dist/utils/dcql.js.map +0 -1
package/package.json CHANGED
@@ -1,39 +1,50 @@
1
1
  {
2
2
  "name": "@sphereon/ssi-sdk.siopv2-oid4vp-op-auth",
3
- "version": "0.33.1-feature.vcdm2.4+9f634bdb",
3
+ "version": "0.33.1-feature.vcdm2.tsup.19+db508b44",
4
4
  "source": "src/index.ts",
5
- "main": "dist/index.js",
6
- "types": "dist/index.d.ts",
5
+ "type": "module",
6
+ "main": "./dist/index.cjs",
7
+ "module": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ "import": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js"
13
+ },
14
+ "require": {
15
+ "types": "./dist/index.d.cts",
16
+ "require": "./dist/index.cjs"
17
+ }
18
+ },
7
19
  "veramo": {
8
20
  "pluginInterfaces": {
9
21
  "IDidAuthSiopOpAuthenticator": "./src/types/IDidAuthSiopOpAuthenticator.ts"
10
22
  }
11
23
  },
12
24
  "scripts": {
13
- "build": "tsc --build",
14
- "build:clean": "tsc --build --clean && tsc --build"
25
+ "build": "tsup --config ../../tsup.config.ts --tsconfig ../../tsconfig.tsup.json"
15
26
  },
16
27
  "dependencies": {
17
- "@sphereon/did-auth-siop": "0.17.0",
18
- "@sphereon/did-auth-siop-adapter": "0.17.0",
19
- "@sphereon/oid4vc-common": "0.17.0",
28
+ "@sphereon/did-auth-siop": "0.17.1-feature.esm.cjs.37",
29
+ "@sphereon/did-auth-siop-adapter": "0.17.1-feature.esm.cjs.37",
30
+ "@sphereon/oid4vc-common": "0.17.1-feature.esm.cjs.37",
20
31
  "@sphereon/pex": "5.0.0-unstable.28",
21
32
  "@sphereon/pex-models": "^2.3.2",
22
- "@sphereon/ssi-sdk-ext.did-utils": "0.28.0",
23
- "@sphereon/ssi-sdk-ext.identifier-resolution": "0.28.0",
24
- "@sphereon/ssi-sdk-ext.jwt-service": "0.28.0",
25
- "@sphereon/ssi-sdk.contact-manager": "0.33.1-feature.vcdm2.4+9f634bdb",
26
- "@sphereon/ssi-sdk.core": "0.33.1-feature.vcdm2.4+9f634bdb",
27
- "@sphereon/ssi-sdk.credential-store": "0.33.1-feature.vcdm2.4+9f634bdb",
28
- "@sphereon/ssi-sdk.credential-validation": "0.33.1-feature.vcdm2.4+9f634bdb",
29
- "@sphereon/ssi-sdk.data-store": "0.33.1-feature.vcdm2.4+9f634bdb",
30
- "@sphereon/ssi-sdk.issuance-branding": "0.33.1-feature.vcdm2.4+9f634bdb",
31
- "@sphereon/ssi-sdk.pd-manager": "0.33.1-feature.vcdm2.4+9f634bdb",
32
- "@sphereon/ssi-sdk.presentation-exchange": "0.33.1-feature.vcdm2.4+9f634bdb",
33
- "@sphereon/ssi-sdk.sd-jwt": "0.33.1-feature.vcdm2.4+9f634bdb",
34
- "@sphereon/ssi-sdk.siopv2-oid4vp-common": "0.33.1-feature.vcdm2.4+9f634bdb",
35
- "@sphereon/ssi-sdk.xstate-machine-persistence": "0.33.1-feature.vcdm2.4+9f634bdb",
36
- "@sphereon/ssi-types": "0.33.1-feature.vcdm2.4+9f634bdb",
33
+ "@sphereon/ssi-sdk-ext.did-utils": "0.28.1-feature.esm.cjs.11",
34
+ "@sphereon/ssi-sdk-ext.identifier-resolution": "0.28.1-feature.esm.cjs.11",
35
+ "@sphereon/ssi-sdk-ext.jwt-service": "0.28.1-feature.esm.cjs.11",
36
+ "@sphereon/ssi-sdk.contact-manager": "^0.33.1-feature.vcdm2.tsup.19+db508b44",
37
+ "@sphereon/ssi-sdk.core": "^0.33.1-feature.vcdm2.tsup.19+db508b44",
38
+ "@sphereon/ssi-sdk.credential-store": "^0.33.1-feature.vcdm2.tsup.19+db508b44",
39
+ "@sphereon/ssi-sdk.credential-validation": "^0.33.1-feature.vcdm2.tsup.19+db508b44",
40
+ "@sphereon/ssi-sdk.data-store": "^0.33.1-feature.vcdm2.tsup.19+db508b44",
41
+ "@sphereon/ssi-sdk.issuance-branding": "^0.33.1-feature.vcdm2.tsup.19+db508b44",
42
+ "@sphereon/ssi-sdk.pd-manager": "^0.33.1-feature.vcdm2.tsup.19+db508b44",
43
+ "@sphereon/ssi-sdk.presentation-exchange": "^0.33.1-feature.vcdm2.tsup.19+db508b44",
44
+ "@sphereon/ssi-sdk.sd-jwt": "^0.33.1-feature.vcdm2.tsup.19+db508b44",
45
+ "@sphereon/ssi-sdk.siopv2-oid4vp-common": "^0.33.1-feature.vcdm2.tsup.19+db508b44",
46
+ "@sphereon/ssi-sdk.xstate-machine-persistence": "^0.33.1-feature.vcdm2.tsup.19+db508b44",
47
+ "@sphereon/ssi-types": "^0.33.1-feature.vcdm2.tsup.19+db508b44",
37
48
  "@sphereon/wellknown-dids-client": "^0.1.3",
38
49
  "@veramo/core": "4.2.0",
39
50
  "@veramo/credential-w3c": "4.2.0",
@@ -47,8 +58,8 @@
47
58
  },
48
59
  "devDependencies": {
49
60
  "@sphereon/did-uni-client": "^0.6.3",
50
- "@sphereon/ssi-sdk-ext.did-resolver-jwk": "0.28.0",
51
- "@sphereon/ssi-sdk.agent-config": "0.33.1-feature.vcdm2.4+9f634bdb",
61
+ "@sphereon/ssi-sdk-ext.did-resolver-jwk": "0.28.1-feature.esm.cjs.11",
62
+ "@sphereon/ssi-sdk.agent-config": "^0.33.1-feature.vcdm2.tsup.19+db508b44",
52
63
  "@types/i18n-js": "^3.8.9",
53
64
  "@types/lodash.memoize": "^4.1.9",
54
65
  "@types/sha.js": "^2.4.4",
@@ -61,11 +72,11 @@
61
72
  "@veramo/utils": "4.2.0",
62
73
  "did-resolver": "^4.1.0",
63
74
  "nock": "^13.5.4",
64
- "typeorm": "^0.3.21"
75
+ "typeorm": "^0.3.22"
65
76
  },
66
77
  "files": [
67
- "dist/**/*",
68
- "src/**/*",
78
+ "dist",
79
+ "src",
69
80
  "src/localization/translations/*",
70
81
  "README.md",
71
82
  "plugin.schema.json",
@@ -90,6 +101,5 @@
90
101
  "OpenID Connect",
91
102
  "Authenticator"
92
103
  ],
93
- "nx": {},
94
- "gitHead": "9f634bdb714061141e277508c124b08d626f6036"
104
+ "gitHead": "db508b447fb1f769700f1d5e7cd8196653f4f794"
95
105
  }
@@ -13,32 +13,28 @@ import {
13
13
  import { HasherSync, Loggers, SdJwtDecodedVerifiableCredential } from '@sphereon/ssi-types'
14
14
  import { IAgentPlugin } from '@veramo/core'
15
15
  import { v4 as uuidv4 } from 'uuid'
16
- import {
17
- DidAuthSiopOpAuthenticatorOptions,
18
- GetSelectableCredentialsArgs,
19
- IOpSessionArgs,
20
- Json,
21
- LOGGER_NAMESPACE,
22
- RequiredContext,
23
- schema,
24
- SelectableCredentialsMap,
25
- Siopv2AuthorizationResponseData,
26
- VerifiableCredentialsWithDefinition,
27
- } from '../index'
28
- import { Siopv2Machine } from '../machine/Siopv2Machine'
29
- import { getSelectableCredentials, siopSendAuthorizationResponse, translateCorrelationIdToName } from '../services/Siopv2MachineService'
16
+
30
17
  import { OpSession } from '../session'
31
18
  import { PEX, Status } from '@sphereon/pex'
32
19
  import { computeEntryHash } from '@veramo/utils'
33
20
  import { UniqueDigitalCredential } from '@sphereon/ssi-sdk.credential-store'
34
21
  import { EventEmitter } from 'events'
35
22
  import {
23
+ DidAuthSiopOpAuthenticatorOptions,
24
+ GetSelectableCredentialsArgs,
36
25
  IDidAuthSiopOpAuthenticator,
37
26
  IGetSiopSessionArgs,
27
+ IOpSessionArgs,
38
28
  IRegisterCustomApprovalForSiopArgs,
39
29
  IRemoveCustomApprovalForSiopArgs,
40
30
  IRemoveSiopSessionArgs,
41
31
  IRequiredContext,
32
+ Json,
33
+ LOGGER_NAMESPACE,
34
+ RequiredContext,
35
+ SelectableCredentialsMap,
36
+ Siopv2AuthorizationResponseData,
37
+ VerifiableCredentialsWithDefinition,
42
38
  } from '../types'
43
39
 
44
40
  import {
@@ -56,6 +52,9 @@ import {
56
52
  Siopv2MachineInstanceOpts,
57
53
  } from '../types'
58
54
  import { DcqlCredential, DcqlPresentation, DcqlQuery, DcqlSdJwtVcCredential } from 'dcql'
55
+ import { Siopv2Machine } from '../machine/Siopv2Machine'
56
+ import { getSelectableCredentials, siopSendAuthorizationResponse, translateCorrelationIdToName } from '../services/Siopv2MachineService'
57
+ import { schema } from '..'
59
58
 
60
59
  const logger = Loggers.DEFAULT.options(LOGGER_NAMESPACE, {}).get(LOGGER_NAMESPACE)
61
60
 
@@ -27,14 +27,14 @@ import {
27
27
  W3CVerifiablePresentation,
28
28
  } from '@sphereon/ssi-types'
29
29
  import { IIdentifier, IVerifyResult, TKeyType } from '@veramo/core'
30
- import Debug from 'debug'
31
30
  import { v4 } from 'uuid'
32
31
  import { IOPOptions, IOpSessionArgs, IOpSessionGetOID4VPArgs, IOpsSendSiopAuthorizationResponseArgs, IRequiredContext } from '../types'
33
32
  import { createOP } from './functions'
34
33
  import { OID4VP } from './OID4VP'
35
34
  import { PEX } from '@sphereon/pex'
35
+ import { Loggers } from '@sphereon/ssi-types'
36
36
 
37
- const debug = Debug(`sphereon:sdk:siop:op-session`)
37
+ const debug = Loggers.DEFAULT.get('sphereon:oid4vp:OpSession').debug
38
38
 
39
39
  export class OpSession {
40
40
  public readonly ts = new Date().getDate()
@@ -1,36 +0,0 @@
1
- import { IAgentPlugin } from '@veramo/core';
2
- import { DidAuthSiopOpAuthenticatorOptions, RequiredContext } from '../index';
3
- import { IDidAuthSiopOpAuthenticator } from '../types';
4
- export declare const didAuthSiopOpAuthenticatorMethods: Array<string>;
5
- export declare class DidAuthSiopOpAuthenticator implements IAgentPlugin {
6
- readonly schema: any;
7
- readonly methods: IDidAuthSiopOpAuthenticator;
8
- private readonly sessions;
9
- private readonly customApprovals;
10
- private readonly presentationSignCallback?;
11
- private readonly onContactIdentityCreated?;
12
- private readonly onIdentifierCreated?;
13
- private readonly eventEmitter?;
14
- private readonly hasher?;
15
- constructor(options?: DidAuthSiopOpAuthenticatorOptions);
16
- onEvent(event: any, context: RequiredContext): Promise<void>;
17
- private siopGetOPSession;
18
- private siopRegisterOPSession;
19
- private siopRemoveOPSession;
20
- private siopRegisterOPCustomApproval;
21
- private siopRemoveOPCustomApproval;
22
- private siopGetMachineInterpreter;
23
- private siopCreateConfig;
24
- private siopGetSiopRequest;
25
- private determineCorrelationId;
26
- private siopRetrieveContact;
27
- private siopAddContactIdentity;
28
- private siopSendResponse;
29
- private hasMDocCredentials;
30
- private isMDocCredential;
31
- private hasSdJwtCredentials;
32
- private isSdJwtCredential;
33
- private retrieveEncodedCredential;
34
- private siopGetSelectableCredentials;
35
- }
36
- //# sourceMappingURL=DidAuthSiopOpAuthenticator.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DidAuthSiopOpAuthenticator.d.ts","sourceRoot":"","sources":["../../src/agent/DidAuthSiopOpAuthenticator.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAE3C,OAAO,EACL,iCAAiC,EAKjC,eAAe,EAKhB,MAAM,UAAU,CAAA;AAQjB,OAAO,EACL,2BAA2B,EAM5B,MAAM,UAAU,CAAA;AAqBjB,eAAO,MAAM,iCAAiC,EAAE,KAAK,CAAC,MAAM,CAW3D,CAAA;AAED,qBAAa,0BAA2B,YAAW,YAAY;IAC7D,QAAQ,CAAC,MAAM,MAAqC;IACpD,QAAQ,CAAC,OAAO,EAAE,2BAA2B,CAc5C;IAED,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAwB;IACjD,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAkH;IAClJ,OAAO,CAAC,QAAQ,CAAC,wBAAwB,CAAC,CAA0B;IACpE,OAAO,CAAC,QAAQ,CAAC,wBAAwB,CAAC,CAAuD;IACjG,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAkD;IACvF,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAc;IAC5C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAY;gBAExB,OAAO,CAAC,EAAE,iCAAiC;IAW1C,OAAO,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC;YAa3D,gBAAgB;YAShB,qBAAqB;YAcrB,mBAAmB;YAInB,4BAA4B;YAQ5B,0BAA0B;YAI1B,yBAAyB;YAyBzB,gBAAgB;YAehB,kBAAkB;YAqDlB,sBAAsB;YAsBtB,mBAAmB;YAuBnB,sBAAsB;YAuCtB,gBAAgB;IA+G9B,OAAO,CAAC,kBAAkB,CAEzB;IAED,OAAO,CAAC,gBAAgB,CAKvB;IAED,OAAO,CAAC,mBAAmB,CAE1B;IAED,OAAO,CAAC,iBAAiB,CAIxB;IAED,OAAO,CAAC,yBAAyB,CAOhC;YAEa,4BAA4B;CAgB3C"}
@@ -1,371 +0,0 @@
1
- import { decodeUriAsJson, SupportedVersion } from '@sphereon/did-auth-siop';
2
- import { ConnectionType, CorrelationIdentifierType, CredentialDocumentFormat, CredentialRole, DocumentType, IdentityOrigin, } from '@sphereon/ssi-sdk.data-store';
3
- import { Loggers } from '@sphereon/ssi-types';
4
- import { v4 as uuidv4 } from 'uuid';
5
- import { LOGGER_NAMESPACE, schema, } from '../index';
6
- import { Siopv2Machine } from '../machine/Siopv2Machine';
7
- import { getSelectableCredentials, siopSendAuthorizationResponse, translateCorrelationIdToName } from '../services/Siopv2MachineService';
8
- import { OpSession } from '../session';
9
- import { PEX, Status } from '@sphereon/pex';
10
- import { computeEntryHash } from '@veramo/utils';
11
- import { Siopv2HolderEvent, } from '../types';
12
- import { DcqlQuery } from 'dcql';
13
- const logger = Loggers.DEFAULT.options(LOGGER_NAMESPACE, {}).get(LOGGER_NAMESPACE);
14
- // Exposing the methods here for any REST implementation
15
- export const didAuthSiopOpAuthenticatorMethods = [
16
- 'cmGetContacts',
17
- 'cmGetContact',
18
- 'cmAddContact',
19
- 'cmAddIdentity',
20
- 'didManagerFind',
21
- 'didManagerGet',
22
- 'keyManagerSign',
23
- 'didManagerGetProviders',
24
- 'dataStoreORMGetVerifiableCredentials',
25
- 'createVerifiablePresentation',
26
- ];
27
- export class DidAuthSiopOpAuthenticator {
28
- schema = schema.IDidAuthSiopOpAuthenticator;
29
- methods = {
30
- siopGetOPSession: this.siopGetOPSession.bind(this),
31
- siopRegisterOPSession: this.siopRegisterOPSession.bind(this),
32
- siopRemoveOPSession: this.siopRemoveOPSession.bind(this),
33
- siopRegisterOPCustomApproval: this.siopRegisterOPCustomApproval.bind(this),
34
- siopRemoveOPCustomApproval: this.siopRemoveOPCustomApproval.bind(this),
35
- siopGetMachineInterpreter: this.siopGetMachineInterpreter.bind(this),
36
- siopCreateConfig: this.siopCreateConfig.bind(this),
37
- siopGetSiopRequest: this.siopGetSiopRequest.bind(this),
38
- siopRetrieveContact: this.siopRetrieveContact.bind(this),
39
- siopAddIdentity: this.siopAddContactIdentity.bind(this),
40
- siopSendResponse: this.siopSendResponse.bind(this),
41
- siopGetSelectableCredentials: this.siopGetSelectableCredentials.bind(this),
42
- };
43
- sessions;
44
- customApprovals;
45
- presentationSignCallback;
46
- onContactIdentityCreated;
47
- onIdentifierCreated;
48
- eventEmitter;
49
- hasher;
50
- constructor(options) {
51
- const { onContactIdentityCreated, onIdentifierCreated, hasher, customApprovals = {}, presentationSignCallback } = { ...options };
52
- this.hasher = hasher;
53
- this.onContactIdentityCreated = onContactIdentityCreated;
54
- this.onIdentifierCreated = onIdentifierCreated;
55
- this.presentationSignCallback = presentationSignCallback;
56
- this.sessions = new Map();
57
- this.customApprovals = customApprovals;
58
- }
59
- async onEvent(event, context) {
60
- switch (event.type) {
61
- case Siopv2HolderEvent.CONTACT_IDENTITY_CREATED:
62
- this.onContactIdentityCreated?.(event.data);
63
- break;
64
- case Siopv2HolderEvent.IDENTIFIER_CREATED:
65
- this.onIdentifierCreated?.(event.data);
66
- break;
67
- default:
68
- return Promise.reject(Error(`Event type ${event.type} not supported`));
69
- }
70
- }
71
- async siopGetOPSession(args, context) {
72
- // TODO add cleaning up sessions https://sphereon.atlassian.net/browse/MYC-143
73
- if (!this.sessions.has(args.sessionId)) {
74
- throw Error(`No session found for id: ${args.sessionId}`);
75
- }
76
- return this.sessions.get(args.sessionId);
77
- }
78
- async siopRegisterOPSession(args, context) {
79
- const sessionId = args.sessionId || uuidv4();
80
- if (this.sessions.has(sessionId)) {
81
- return Promise.reject(new Error(`Session with id: ${args.sessionId} already present`));
82
- }
83
- const opts = { ...args, sessionId, context };
84
- if (!opts.op?.presentationSignCallback) {
85
- opts.op = { ...opts.op, presentationSignCallback: this.presentationSignCallback };
86
- }
87
- const session = await OpSession.init(opts);
88
- this.sessions.set(sessionId, session);
89
- return session;
90
- }
91
- async siopRemoveOPSession(args, context) {
92
- return this.sessions.delete(args.sessionId);
93
- }
94
- async siopRegisterOPCustomApproval(args, context) {
95
- if (this.customApprovals[args.key] !== undefined) {
96
- return Promise.reject(new Error(`Custom approval with key: ${args.key} already present`));
97
- }
98
- this.customApprovals[args.key] = args.customApproval;
99
- }
100
- async siopRemoveOPCustomApproval(args, context) {
101
- return delete this.customApprovals[args.key];
102
- }
103
- async siopGetMachineInterpreter(opts, context) {
104
- const { stateNavigationListener, url } = opts;
105
- const services = {
106
- createConfig: (args) => this.siopCreateConfig(args),
107
- getSiopRequest: (args) => this.siopGetSiopRequest(args, context),
108
- getSelectableCredentials: (args) => this.siopGetSelectableCredentials(args, context),
109
- retrieveContact: (args) => this.siopRetrieveContact(args, context),
110
- addContactIdentity: (args) => this.siopAddContactIdentity(args, context),
111
- sendResponse: (args) => this.siopSendResponse(args, context),
112
- ...opts?.services,
113
- };
114
- const siopv2MachineOpts = {
115
- ...opts,
116
- url,
117
- stateNavigationListener,
118
- services: {
119
- ...services,
120
- ...opts.services,
121
- },
122
- };
123
- return Siopv2Machine.newInstance(siopv2MachineOpts);
124
- }
125
- async siopCreateConfig(context) {
126
- const { url } = context;
127
- if (!url) {
128
- return Promise.reject(Error('Missing request uri in context'));
129
- }
130
- return {
131
- id: uuidv4(),
132
- // FIXME: Update these values in SSI-SDK. Only the URI (not a redirectURI) would be available at this point
133
- sessionId: uuidv4(),
134
- redirectUrl: url,
135
- };
136
- }
137
- async siopGetSiopRequest(args, context) {
138
- const { agent } = context;
139
- const { didAuthConfig } = args;
140
- if (args.url === undefined) {
141
- return Promise.reject(Error('Missing request uri in context'));
142
- }
143
- if (didAuthConfig === undefined) {
144
- return Promise.reject(Error('Missing config in context'));
145
- }
146
- const { sessionId, redirectUrl } = didAuthConfig;
147
- const session = await agent.siopGetOPSession({ sessionId }).catch(async () => await agent.siopRegisterOPSession({
148
- requestJwtOrUri: redirectUrl,
149
- sessionId,
150
- op: { eventEmitter: this.eventEmitter, hasher: this.hasher },
151
- }));
152
- logger.debug(`session: ${JSON.stringify(session.id, null, 2)}`);
153
- const verifiedAuthorizationRequest = await session.getAuthorizationRequest();
154
- // logger.trace('Request: ' + JSON.stringify(verifiedAuthorizationRequest, null, 2))
155
- const clientName = verifiedAuthorizationRequest.registrationMetadataPayload?.client_name;
156
- const url = verifiedAuthorizationRequest.responseURI ??
157
- (args.url.includes('request_uri')
158
- ? decodeURIComponent(args.url.split('?request_uri=')[1].trim())
159
- : (verifiedAuthorizationRequest.issuer ?? verifiedAuthorizationRequest.registrationMetadataPayload?.client_id));
160
- const uri = url.includes('://') ? new URL(url) : undefined;
161
- const correlationId = uri?.hostname ?? (await this.determineCorrelationId(uri, verifiedAuthorizationRequest, clientName, context));
162
- const clientId = await verifiedAuthorizationRequest.authorizationRequest.getMergedProperty('client_id');
163
- return {
164
- issuer: verifiedAuthorizationRequest.issuer,
165
- correlationId,
166
- registrationMetadataPayload: verifiedAuthorizationRequest.registrationMetadataPayload,
167
- uri,
168
- name: clientName,
169
- clientId,
170
- presentationDefinitions: (await verifiedAuthorizationRequest.authorizationRequest.containsResponseType('vp_token')) ||
171
- (verifiedAuthorizationRequest.versions.every((version) => version <= SupportedVersion.JWT_VC_PRESENTATION_PROFILE_v1) &&
172
- verifiedAuthorizationRequest.presentationDefinitions &&
173
- verifiedAuthorizationRequest.presentationDefinitions.length > 0)
174
- ? verifiedAuthorizationRequest.presentationDefinitions
175
- : undefined,
176
- dcqlQuery: verifiedAuthorizationRequest.dcqlQuery,
177
- };
178
- }
179
- async determineCorrelationId(uri, verifiedAuthorizationRequest, clientName, context) {
180
- if (uri) {
181
- return (await translateCorrelationIdToName(uri.hostname, context)) ?? uri.hostname;
182
- }
183
- if (verifiedAuthorizationRequest.issuer) {
184
- const issuerHostname = verifiedAuthorizationRequest.issuer.split('://')[1];
185
- return (await translateCorrelationIdToName(issuerHostname, context)) ?? issuerHostname;
186
- }
187
- if (clientName) {
188
- return clientName;
189
- }
190
- throw new Error("Can't determine correlationId from request");
191
- }
192
- async siopRetrieveContact(args, context) {
193
- const { authorizationRequestData } = args;
194
- const { agent } = context;
195
- if (authorizationRequestData === undefined) {
196
- return Promise.reject(Error('Missing authorization request data in context'));
197
- }
198
- return agent
199
- .cmGetContacts({
200
- filter: [
201
- {
202
- identities: {
203
- identifier: {
204
- correlationId: authorizationRequestData.correlationId,
205
- },
206
- },
207
- },
208
- ],
209
- })
210
- .then((contacts) => (contacts.length === 1 ? contacts[0] : undefined));
211
- }
212
- async siopAddContactIdentity(args, context) {
213
- const { agent } = context;
214
- const { contact, authorizationRequestData } = args;
215
- if (contact === undefined) {
216
- return Promise.reject(Error('Missing contact in context'));
217
- }
218
- if (authorizationRequestData === undefined) {
219
- return Promise.reject(Error('Missing authorization request data in context'));
220
- }
221
- // TODO: Makes sense to move these types of common queries/retrievals to the SIOP auth request object
222
- const clientId = authorizationRequestData.clientId ?? authorizationRequestData.issuer;
223
- const correlationId = clientId
224
- ? clientId.startsWith('did:')
225
- ? clientId
226
- : `${new URL(clientId).protocol}//${new URL(clientId).hostname}`
227
- : undefined;
228
- if (correlationId) {
229
- const identity = {
230
- alias: correlationId,
231
- origin: IdentityOrigin.EXTERNAL,
232
- roles: [CredentialRole.ISSUER],
233
- identifier: {
234
- type: correlationId.startsWith('did:') ? CorrelationIdentifierType.DID : CorrelationIdentifierType.URL,
235
- correlationId,
236
- },
237
- };
238
- const addedIdentity = await agent.cmAddIdentity({ contactId: contact.id, identity });
239
- await context.agent.emit(Siopv2HolderEvent.CONTACT_IDENTITY_CREATED, {
240
- contactId: contact.id,
241
- identity: addedIdentity,
242
- });
243
- logger.info(`Contact identity created: ${JSON.stringify(addedIdentity)}`);
244
- }
245
- }
246
- async siopSendResponse(args, context) {
247
- const { didAuthConfig, authorizationRequestData, selectedCredentials, isFirstParty } = args;
248
- if (didAuthConfig === undefined) {
249
- return Promise.reject(Error('Missing config in context'));
250
- }
251
- if (authorizationRequestData === undefined) {
252
- return Promise.reject(Error('Missing authorization request data in context'));
253
- }
254
- const pex = new PEX({ hasher: this.hasher });
255
- const verifiableCredentialsWithDefinition = [];
256
- const dcqlCredentialsWithCredentials = new Map();
257
- if (Array.isArray(authorizationRequestData.presentationDefinitions) && authorizationRequestData?.presentationDefinitions.length > 0) {
258
- try {
259
- authorizationRequestData.presentationDefinitions?.forEach((presentationDefinition) => {
260
- const { areRequiredCredentialsPresent, verifiableCredential: verifiableCredentials } = pex.selectFrom(presentationDefinition.definition, selectedCredentials.map((udc) => udc.originalVerifiableCredential));
261
- if (areRequiredCredentialsPresent !== Status.ERROR && verifiableCredentials) {
262
- let uniqueDigitalCredentials = [];
263
- uniqueDigitalCredentials = verifiableCredentials.map((vc) => {
264
- // @ts-ignore FIXME Funke
265
- const hash = typeof vc === 'string' ? computeEntryHash(vc.split('~'[0])) : computeEntryHash(vc);
266
- const udc = selectedCredentials.find((udc) => udc.hash == hash || udc.originalVerifiableCredential == vc);
267
- if (!udc) {
268
- throw Error(`UniqueDigitalCredential could not be found in store. Either the credential is not present in the store or the hash is not correct.`);
269
- }
270
- return udc;
271
- });
272
- verifiableCredentialsWithDefinition.push({
273
- definition: presentationDefinition,
274
- credentials: uniqueDigitalCredentials,
275
- });
276
- }
277
- });
278
- }
279
- catch (e) {
280
- return Promise.reject(e);
281
- }
282
- if (verifiableCredentialsWithDefinition.length === 0) {
283
- return Promise.reject(Error('None of the selected credentials match any of the presentation definitions.'));
284
- }
285
- }
286
- else if (authorizationRequestData.dcqlQuery) {
287
- //TODO Only SD-JWT and MSO MDOC are supported at the moment
288
- if (this.hasMDocCredentials(selectedCredentials) || this.hasSdJwtCredentials(selectedCredentials)) {
289
- try {
290
- selectedCredentials.forEach((vc) => {
291
- if (this.isSdJwtCredential(vc)) {
292
- const payload = vc.originalVerifiableCredential.decodedPayload;
293
- const result = {
294
- claims: payload,
295
- vct: payload.vct,
296
- credential_format: 'vc+sd-jwt',
297
- };
298
- dcqlCredentialsWithCredentials.set(result, vc);
299
- //FIXME MDoc namespaces are incompatible: array of strings vs complex object - https://sphereon.atlassian.net/browse/SPRIND-143
300
- }
301
- else {
302
- throw Error(`Invalid credential format: ${vc.digitalCredential.documentFormat}`);
303
- }
304
- });
305
- }
306
- catch (e) {
307
- return Promise.reject(e);
308
- }
309
- const dcqlPresentationRecord = {};
310
- const queryResult = DcqlQuery.query(authorizationRequestData.dcqlQuery, Array.from(dcqlCredentialsWithCredentials.keys()));
311
- for (const [key, value] of Object.entries(queryResult.credential_matches)) {
312
- if (value.success) {
313
- dcqlPresentationRecord[key] = this.retrieveEncodedCredential(dcqlCredentialsWithCredentials.get(value.output));
314
- }
315
- }
316
- }
317
- }
318
- const response = await siopSendAuthorizationResponse(ConnectionType.SIOPv2_OpenID4VP, {
319
- sessionId: didAuthConfig.sessionId,
320
- ...(args.idOpts && { idOpts: args.idOpts }),
321
- ...(authorizationRequestData.presentationDefinitions !== undefined && { verifiableCredentialsWithDefinition }),
322
- isFirstParty,
323
- hasher: this.hasher,
324
- }, context);
325
- const contentType = response.headers.get('content-type') || '';
326
- let responseBody = null;
327
- const text = await response.text();
328
- if (text) {
329
- responseBody = contentType.includes('application/json') || text.startsWith('{') ? JSON.parse(text) : text;
330
- }
331
- return {
332
- body: responseBody,
333
- url: response?.url,
334
- queryParams: decodeUriAsJson(response?.url),
335
- };
336
- }
337
- hasMDocCredentials = (credentials) => {
338
- return credentials.some(this.isMDocCredential);
339
- };
340
- isMDocCredential = (credential) => {
341
- return (credential.digitalCredential.documentFormat === CredentialDocumentFormat.MSO_MDOC &&
342
- credential.digitalCredential.documentType === DocumentType.VC);
343
- };
344
- hasSdJwtCredentials = (credentials) => {
345
- return credentials.some(this.isSdJwtCredential);
346
- };
347
- isSdJwtCredential = (credential) => {
348
- return (credential.digitalCredential.documentFormat === CredentialDocumentFormat.SD_JWT && credential.digitalCredential.documentType === DocumentType.VC);
349
- };
350
- retrieveEncodedCredential = (credential) => {
351
- return credential.originalVerifiableCredential !== undefined &&
352
- credential.originalVerifiableCredential !== null &&
353
- credential?.originalVerifiableCredential?.compactSdJwtVc !== undefined &&
354
- credential?.originalVerifiableCredential?.compactSdJwtVc !== null
355
- ? credential.originalVerifiableCredential.compactSdJwtVc
356
- : credential.originalVerifiableCredential;
357
- };
358
- async siopGetSelectableCredentials(args, context) {
359
- const { authorizationRequestData } = args;
360
- if (!authorizationRequestData ||
361
- !authorizationRequestData.presentationDefinitions ||
362
- authorizationRequestData.presentationDefinitions.length === 0) {
363
- return Promise.reject(Error('Missing required fields in arguments or context'));
364
- }
365
- if (authorizationRequestData.presentationDefinitions.length > 1) {
366
- return Promise.reject(Error('Multiple presentation definitions present'));
367
- }
368
- return getSelectableCredentials(authorizationRequestData.presentationDefinitions[0].definition, context);
369
- }
370
- }
371
- //# sourceMappingURL=DidAuthSiopOpAuthenticator.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DidAuthSiopOpAuthenticator.js","sourceRoot":"","sources":["../../src/agent/DidAuthSiopOpAuthenticator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAA4B,gBAAgB,EAAgC,MAAM,yBAAyB,CAAA;AACnI,OAAO,EACL,cAAc,EACd,yBAAyB,EACzB,wBAAwB,EACxB,cAAc,EACd,YAAY,EAEZ,cAAc,GAGf,MAAM,8BAA8B,CAAA;AACrC,OAAO,EAAc,OAAO,EAAoC,MAAM,qBAAqB,CAAA;AAE3F,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAA;AACnC,OAAO,EAKL,gBAAgB,EAEhB,MAAM,GAIP,MAAM,UAAU,CAAA;AACjB,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AACxD,OAAO,EAAE,wBAAwB,EAAE,6BAA6B,EAAE,4BAA4B,EAAE,MAAM,kCAAkC,CAAA;AACxI,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AACtC,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAYhD,OAAO,EAUL,iBAAiB,GAGlB,MAAM,UAAU,CAAA;AACjB,OAAO,EAAoC,SAAS,EAAyB,MAAM,MAAM,CAAA;AAEzF,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,gBAAgB,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAA;AAElF,wDAAwD;AACxD,MAAM,CAAC,MAAM,iCAAiC,GAAkB;IAC9D,eAAe;IACf,cAAc;IACd,cAAc;IACd,eAAe;IACf,gBAAgB;IAChB,eAAe;IACf,gBAAgB;IAChB,wBAAwB;IACxB,sCAAsC;IAC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AC,MAAM,CAAC,KAAK,CAAC,iDAAiD,CAAC,CAAC,CAAA;QACjF,CAAC;QACD,IAAI,wBAAwB,CAAC,uBAAuB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAChE,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,2CAA2C,CAAC,CAAC,CAAA;QAC3E,CAAC;QAED,OAAO,wBAAwB,CAAC,wBAAwB,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC,UAAU,EAAE,OAAO,CAAC,CAAA;IAC1G,CAAC;CACF"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,QAAA,MAAM,MAAM,KAAmC,CAAA;AAC/C,OAAO,EAAE,MAAM,EAAE,CAAA;AACjB,OAAO,EAAE,0BAA0B,EAAE,iCAAiC,EAAE,MAAM,oCAAoC,CAAA;AAClH,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AACvD,cAAc,iCAAiC,CAAA;AAC/C,cAAc,WAAW,CAAA;AACzB,cAAc,SAAS,CAAA;AACvB,cAAc,gBAAgB,CAAA"}
@@ -1,22 +0,0 @@
1
- import { ManagedIdentifierOptsOrResult } from '@sphereon/ssi-sdk-ext.identifier-resolution';
2
- import { LinkHandlerAdapter } from '@sphereon/ssi-sdk.core';
3
- import { IMachineStatePersistence, SerializableState } from '@sphereon/ssi-sdk.xstate-machine-persistence';
4
- import { IAgentContext } from '@veramo/core';
5
- import { GetMachineArgs, IDidAuthSiopOpAuthenticator } from '../types';
6
- export declare class Siopv2OID4VPLinkHandler extends LinkHandlerAdapter {
7
- private readonly context;
8
- private readonly stateNavigationListener;
9
- private readonly noStateMachinePersistence;
10
- private readonly idOpts?;
11
- constructor(args: Pick<GetMachineArgs, 'stateNavigationListener'> & {
12
- protocols?: Array<string | RegExp>;
13
- context: IAgentContext<IDidAuthSiopOpAuthenticator & IMachineStatePersistence>;
14
- noStateMachinePersistence?: boolean;
15
- idOpts?: ManagedIdentifierOptsOrResult;
16
- });
17
- handle(url: string | URL, opts?: {
18
- machineState?: SerializableState;
19
- idOpts?: ManagedIdentifierOptsOrResult;
20
- }): Promise<void>;
21
- }
22
- //# sourceMappingURL=index.d.ts.map