@velocitycareerlabs/server-webwallet 1.25.0-dev-build.13b0fa707 → 1.25.0-dev-build.1b05aec41

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@velocitycareerlabs/server-webwallet",
3
- "version": "1.25.0-dev-build.13b0fa707",
3
+ "version": "1.25.0-dev-build.1b05aec41",
4
4
  "description": "Web Wallet application",
5
5
  "repository": "https://github.com/velocitycareerlabs/packages",
6
6
  "engines": {
@@ -26,8 +26,12 @@
26
26
  "access": "public"
27
27
  },
28
28
  "dependencies": {
29
- "@fastify/autoload": "5.10.0",
30
- "@fastify/multipart": "~8.3.1",
29
+ "@fastify/autoload": "^5.10.0",
30
+ "@fastify/helmet": "^11.1.1",
31
+ "@fastify/multipart": "^8.3.1",
32
+ "@fastify/sensible": "^5.6.0",
33
+ "@fastify/swagger": "^8.15.0",
34
+ "@fastify/swagger-ui": "^4.2.0",
31
35
  "@spencejs/spence-mongo-repos": "^0.10.2",
32
36
  "@velocitycareerlabs/auth": "1.25.0-dev-build.1c2d6340d",
33
37
  "@velocitycareerlabs/common-functions": "1.25.0-dev-build.1c2d6340d",
@@ -35,15 +39,15 @@
35
39
  "@velocitycareerlabs/config": "1.25.0-dev-build.1c2d6340d",
36
40
  "@velocitycareerlabs/fastify-plugins": "1.25.0-dev-build.1c2d6340d",
37
41
  "@velocitycareerlabs/jwt": "1.25.0-dev-build.1c2d6340d",
38
- "@velocitycareerlabs/migrations": "1.25.0-dev-build.13b0fa707",
42
+ "@velocitycareerlabs/migrations": "1.25.0-dev-build.1b05aec41",
39
43
  "@velocitycareerlabs/request": "1.25.0-dev-build.1c2d6340d",
40
44
  "@velocitycareerlabs/server-provider": "1.25.0-dev-build.1c2d6340d",
41
45
  "@velocitycareerlabs/vc-checks": "1.25.0-dev-build.1c2d6340d",
42
46
  "@velocitycareerlabs/vnf-nodejs-wallet-sdk": "1.25.0-dev-build.1c2d6340d",
43
47
  "blueimp-md5": "2.19.0",
44
48
  "env-var": "^7.0.0",
45
- "fastify": "4.29.0",
46
- "fastify-plugin": "4.5.1",
49
+ "fastify": "^4.29.0",
50
+ "fastify-plugin": "^4.5.1",
47
51
  "got": "11.8.6",
48
52
  "http-errors": "2.0.0",
49
53
  "lodash": "^4.17.21",
@@ -69,5 +73,5 @@
69
73
  "nodemon": "3.1.9",
70
74
  "prettier": "2.8.8"
71
75
  },
72
- "gitHead": "f5b5a15174feab9d1de5263508b5fc66e3c52f1e"
76
+ "gitHead": "ef9459df2829570c9dee64cb2f5748a5bf00215c"
73
77
  }
@@ -117,12 +117,18 @@ const disclosureController = async (fastify) => {
117
117
  )
118
118
  );
119
119
 
120
+ let authToken = null;
121
+ if (presentationRequest.feed) {
122
+ authToken = await vclSdk.getAuthToken({ presentationRequest });
123
+ }
124
+
120
125
  const { payload: presentation } = jwtDecode(
121
126
  presentationRequest.jwt.encodedJwt
122
127
  );
123
128
 
124
129
  const submissionResult = await vclSdk.submitPresentation(
125
- new VCLPresentationSubmission(presentationRequest, body.credentials)
130
+ new VCLPresentationSubmission(presentationRequest, body.credentials),
131
+ authToken
126
132
  );
127
133
 
128
134
  const { did: userDid } = await repos.accounts.findOne({
@@ -34,6 +34,7 @@ jest.mock('@velocitycareerlabs/vnf-nodejs-wallet-sdk', () => {
34
34
  .fn()
35
35
  .mockResolvedValue(getCredentialManifestMock),
36
36
  submitPresentation: jest.fn().mockResolvedValue(submissionResultMock),
37
+ getAuthToken: jest.fn(),
37
38
  }),
38
39
  },
39
40
  };
@@ -166,6 +167,7 @@ describe('Test disclosure credentials controller', () => {
166
167
 
167
168
  describe('POST /disclosures/accept-presentation-request - accept presentation of selected credentials', () => {
168
169
  it('should accept presentation successfully', async () => {
170
+ // eslint-disable-next-line no-shadow
169
171
  const { presentationRequestMock } = require('./mocks');
170
172
 
171
173
  const response = await fastify.injectJson({
@@ -215,7 +217,8 @@ describe('Test disclosure credentials controller', () => {
215
217
  jwtVc: CredentialMocks.JwtCredentialEmail,
216
218
  },
217
219
  ],
218
- })
220
+ }),
221
+ null
219
222
  );
220
223
  const savedDisclosure = await mongoDb()
221
224
  .collection('disclosures')