@twin.org/identity-connector-entity-storage 0.0.1-next.11 → 0.0.1-next.12
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/dist/cjs/index.cjs +5 -6
- package/dist/esm/index.mjs +5 -6
- package/docs/changelog.md +1 -1
- package/package.json +2 -2
package/dist/cjs/index.cjs
CHANGED
|
@@ -412,12 +412,11 @@ class EntityStorageIdentityConnector {
|
|
|
412
412
|
throw new core.GeneralError(this.CLASS_NAME, "publicKeyJwkMissing");
|
|
413
413
|
}
|
|
414
414
|
const revocationService = issuerDidDocument.service?.find(s => s.id.endsWith("#revocation"));
|
|
415
|
+
const credentialClone = core.ObjectHelper.clone(credential);
|
|
415
416
|
const finalTypes = [standardsW3cDid.DidTypes.VerifiableCredential];
|
|
416
|
-
const credContext = core.ObjectHelper.extractProperty(
|
|
417
|
-
|
|
418
|
-
]);
|
|
419
|
-
const credId = core.ObjectHelper.extractProperty(credential, ["@id", "id"], false);
|
|
420
|
-
const credType = core.ObjectHelper.extractProperty(credential, ["@type", "type"]);
|
|
417
|
+
const credContext = core.ObjectHelper.extractProperty(credentialClone, ["@context"]);
|
|
418
|
+
const credId = core.ObjectHelper.extractProperty(credentialClone, ["@id", "id"], false);
|
|
419
|
+
const credType = core.ObjectHelper.extractProperty(credentialClone, ["@type", "type"]);
|
|
421
420
|
if (core.Is.stringValue(credType)) {
|
|
422
421
|
finalTypes.push(credType);
|
|
423
422
|
}
|
|
@@ -425,7 +424,7 @@ class EntityStorageIdentityConnector {
|
|
|
425
424
|
"@context": dataJsonLd.JsonLdProcessor.combineContexts(standardsW3cDid.DidContexts.ContextV1, credContext) ?? null,
|
|
426
425
|
id,
|
|
427
426
|
type: finalTypes,
|
|
428
|
-
credentialSubject:
|
|
427
|
+
credentialSubject: credentialClone,
|
|
429
428
|
issuer: issuerDidDocument.id,
|
|
430
429
|
issuanceDate: new Date().toISOString(),
|
|
431
430
|
credentialStatus: revocationService && !core.Is.undefined(revocationIndex)
|
package/dist/esm/index.mjs
CHANGED
|
@@ -410,12 +410,11 @@ class EntityStorageIdentityConnector {
|
|
|
410
410
|
throw new GeneralError(this.CLASS_NAME, "publicKeyJwkMissing");
|
|
411
411
|
}
|
|
412
412
|
const revocationService = issuerDidDocument.service?.find(s => s.id.endsWith("#revocation"));
|
|
413
|
+
const credentialClone = ObjectHelper.clone(credential);
|
|
413
414
|
const finalTypes = [DidTypes.VerifiableCredential];
|
|
414
|
-
const credContext = ObjectHelper.extractProperty(
|
|
415
|
-
|
|
416
|
-
]);
|
|
417
|
-
const credId = ObjectHelper.extractProperty(credential, ["@id", "id"], false);
|
|
418
|
-
const credType = ObjectHelper.extractProperty(credential, ["@type", "type"]);
|
|
415
|
+
const credContext = ObjectHelper.extractProperty(credentialClone, ["@context"]);
|
|
416
|
+
const credId = ObjectHelper.extractProperty(credentialClone, ["@id", "id"], false);
|
|
417
|
+
const credType = ObjectHelper.extractProperty(credentialClone, ["@type", "type"]);
|
|
419
418
|
if (Is.stringValue(credType)) {
|
|
420
419
|
finalTypes.push(credType);
|
|
421
420
|
}
|
|
@@ -423,7 +422,7 @@ class EntityStorageIdentityConnector {
|
|
|
423
422
|
"@context": JsonLdProcessor.combineContexts(DidContexts.ContextV1, credContext) ?? null,
|
|
424
423
|
id,
|
|
425
424
|
type: finalTypes,
|
|
426
|
-
credentialSubject:
|
|
425
|
+
credentialSubject: credentialClone,
|
|
427
426
|
issuer: issuerDidDocument.id,
|
|
428
427
|
issuanceDate: new Date().toISOString(),
|
|
429
428
|
credentialStatus: revocationService && !Is.undefined(revocationIndex)
|
package/docs/changelog.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/identity-connector-entity-storage",
|
|
3
|
-
"version": "0.0.1-next.
|
|
3
|
+
"version": "0.0.1-next.12",
|
|
4
4
|
"description": "Identity connector implementation using entity storage",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"@twin.org/data-core": "next",
|
|
20
20
|
"@twin.org/data-json-ld": "next",
|
|
21
21
|
"@twin.org/entity": "next",
|
|
22
|
-
"@twin.org/identity-models": "0.0.1-next.
|
|
22
|
+
"@twin.org/identity-models": "0.0.1-next.12",
|
|
23
23
|
"@twin.org/nameof": "next",
|
|
24
24
|
"@twin.org/standards-w3c-did": "next",
|
|
25
25
|
"@twin.org/vault-models": "next",
|