@bedrock/vc-verifier 20.1.1 → 20.1.2
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/lib/vcjwt.js +3 -3
- package/package.json +1 -1
package/lib/vcjwt.js
CHANGED
|
@@ -229,7 +229,7 @@ function _jwtPayloadToCredential({verifyResult} = {}) {
|
|
|
229
229
|
vc.issuer = iss;
|
|
230
230
|
} else if(vc.issuer && typeof vc.issuer === 'object' &&
|
|
231
231
|
vc.issuer.id === undefined) {
|
|
232
|
-
vc.issuer.id = iss;
|
|
232
|
+
vc.issuer.id = {id: iss, ...vc.issuer};
|
|
233
233
|
} else if(iss !== vc.issuer && iss !== vc.issuer?.id) {
|
|
234
234
|
throw new BedrockError(
|
|
235
235
|
'VC-JWT "iss" claim does not equal nor does it exclusively ' +
|
|
@@ -283,7 +283,7 @@ function _jwtPayloadToCredential({verifyResult} = {}) {
|
|
|
283
283
|
});
|
|
284
284
|
}
|
|
285
285
|
if(vc.credentialSubject?.id === undefined) {
|
|
286
|
-
vc.credentialSubject
|
|
286
|
+
vc.credentialSubject = {id: sub, ...vc.credentialSubject};
|
|
287
287
|
} else {
|
|
288
288
|
throw new BedrockError(
|
|
289
289
|
'VC-JWT "sub" claim does not equal nor does it exclusively ' +
|
|
@@ -412,7 +412,7 @@ function _jwtPayloadToPresentation({verifyResult, challenge} = {}) {
|
|
|
412
412
|
vp.holder = iss;
|
|
413
413
|
} else if(vp.holder && typeof vp.holder === 'object' &&
|
|
414
414
|
vp.holder.id === undefined) {
|
|
415
|
-
vp.holder.id = iss;
|
|
415
|
+
vp.holder.id = {id: iss, ...vp.holder};
|
|
416
416
|
} else if(iss !== vp.holder && iss !== vp.holder?.id) {
|
|
417
417
|
throw new BedrockError(
|
|
418
418
|
'VC-JWT "iss" claim does not equal nor does it exclusively ' +
|