@sphereon/ssi-sdk.siopv2-oid4vp-op-auth 0.34.1-fix.117 → 0.34.1-fix.141
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/index.cjs +13 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/package.json +19 -19
- package/src/agent/DidAuthSiopOpAuthenticator.ts +4 -21
- package/src/services/Siopv2MachineService.ts +75 -101
package/dist/index.cjs
CHANGED
|
@@ -425,7 +425,7 @@ var plugin_schema_default = {
|
|
|
425
425
|
// src/agent/DidAuthSiopOpAuthenticator.ts
|
|
426
426
|
var import_did_auth_siop5 = require("@sphereon/did-auth-siop");
|
|
427
427
|
var import_ssi_sdk6 = require("@sphereon/ssi-sdk.data-store");
|
|
428
|
-
var
|
|
428
|
+
var import_ssi_types8 = require("@sphereon/ssi-types");
|
|
429
429
|
var import_uuid2 = require("uuid");
|
|
430
430
|
|
|
431
431
|
// src/session/functions.ts
|
|
@@ -1351,6 +1351,7 @@ var import_ssi_sdk_ext3 = require("@sphereon/ssi-sdk-ext.identifier-resolution")
|
|
|
1351
1351
|
var import_ssi_sdk3 = require("@sphereon/ssi-sdk.credential-store");
|
|
1352
1352
|
var import_ssi_sdk4 = require("@sphereon/ssi-sdk.data-store");
|
|
1353
1353
|
var import_ssi_types6 = require("@sphereon/ssi-types");
|
|
1354
|
+
var import_ssi_types7 = require("@sphereon/ssi-types");
|
|
1354
1355
|
var import_ssi_sdk5 = require("@sphereon/ssi-sdk.core");
|
|
1355
1356
|
var import_dcql = require("dcql");
|
|
1356
1357
|
|
|
@@ -1393,7 +1394,7 @@ __name(convertToDcqlCredentials, "convertToDcqlCredentials");
|
|
|
1393
1394
|
|
|
1394
1395
|
// src/services/Siopv2MachineService.ts
|
|
1395
1396
|
var import_ssi_sdk_ext4 = require("@sphereon/ssi-sdk-ext.did-utils");
|
|
1396
|
-
var logger3 =
|
|
1397
|
+
var logger3 = import_ssi_types7.Loggers.DEFAULT.get(LOGGER_NAMESPACE);
|
|
1397
1398
|
var siopSendAuthorizationResponse = /* @__PURE__ */ __name(async (connectionType, args, context) => {
|
|
1398
1399
|
const { agent } = context;
|
|
1399
1400
|
const { credentials } = args;
|
|
@@ -1416,7 +1417,7 @@ var siopSendAuthorizationResponse = /* @__PURE__ */ __name(async (connectionType
|
|
|
1416
1417
|
let identifier;
|
|
1417
1418
|
const digitalCredential = firstUniqueDC.digitalCredential;
|
|
1418
1419
|
const firstVC = firstUniqueDC.uniformVerifiableCredential;
|
|
1419
|
-
const holder =
|
|
1420
|
+
const holder = import_ssi_types7.CredentialMapper.isSdJwtDecodedCredential(firstVC) ? firstVC.decodedPayload.cnf?.jwk ? (
|
|
1420
1421
|
//doesn't apply to did:jwk only, as you can represent any DID key as a JWK. So whenever you encounter a JWK it doesn't mean it had to come from a did:jwk in the system. It just can always be represented as a did:jwk
|
|
1421
1422
|
`did:jwk:${(0, import_ssi_sdk5.encodeJoseBlob)(firstVC.decodedPayload.cnf?.jwk)}#0`
|
|
1422
1423
|
) : firstVC.decodedPayload.sub : Array.isArray(firstVC.credentialSubject) ? firstVC.credentialSubject[0].id : firstVC.credentialSubject.id;
|
|
@@ -1498,7 +1499,7 @@ var getSelectableCredentials = /* @__PURE__ */ __name(async (dcqlQuery, context)
|
|
|
1498
1499
|
};
|
|
1499
1500
|
const { agent } = agentContext;
|
|
1500
1501
|
const uniqueVerifiableCredentials = await agent.crsGetUniqueCredentials({
|
|
1501
|
-
filter: (0, import_ssi_sdk3.verifiableCredentialForRoleFilter)(
|
|
1502
|
+
filter: (0, import_ssi_sdk3.verifiableCredentialForRoleFilter)(import_ssi_types6.CredentialRole.HOLDER)
|
|
1502
1503
|
});
|
|
1503
1504
|
const branding = await agent.ibGetCredentialBranding();
|
|
1504
1505
|
const dcqlCredentialsWithCredentials = new Map(uniqueVerifiableCredentials.map((vc) => [
|
|
@@ -1569,7 +1570,7 @@ var translateCorrelationIdToName = /* @__PURE__ */ __name(async (correlationId,
|
|
|
1569
1570
|
}, "translateCorrelationIdToName");
|
|
1570
1571
|
|
|
1571
1572
|
// src/agent/DidAuthSiopOpAuthenticator.ts
|
|
1572
|
-
var logger4 =
|
|
1573
|
+
var logger4 = import_ssi_types8.Loggers.DEFAULT.options(LOGGER_NAMESPACE, {}).get(LOGGER_NAMESPACE);
|
|
1573
1574
|
var didAuthSiopOpAuthenticatorMethods = [
|
|
1574
1575
|
"cmGetContacts",
|
|
1575
1576
|
"cmGetContact",
|
|
@@ -1787,7 +1788,7 @@ var DidAuthSiopOpAuthenticator = class {
|
|
|
1787
1788
|
alias: correlationId,
|
|
1788
1789
|
origin: import_ssi_sdk6.IdentityOrigin.EXTERNAL,
|
|
1789
1790
|
roles: [
|
|
1790
|
-
|
|
1791
|
+
import_ssi_types8.CredentialRole.ISSUER
|
|
1791
1792
|
],
|
|
1792
1793
|
identifier: {
|
|
1793
1794
|
type: correlationId.startsWith("did:") ? import_ssi_sdk6.CorrelationIdentifierType.DID : import_ssi_sdk6.CorrelationIdentifierType.URL,
|
|
@@ -1844,11 +1845,11 @@ var DidAuthSiopOpAuthenticator = class {
|
|
|
1844
1845
|
};
|
|
1845
1846
|
|
|
1846
1847
|
// src/machine/CallbackStateListener.ts
|
|
1847
|
-
var
|
|
1848
|
-
var logger5 =
|
|
1849
|
-
defaultLogLevel:
|
|
1848
|
+
var import_ssi_types9 = require("@sphereon/ssi-types");
|
|
1849
|
+
var logger5 = import_ssi_types9.Loggers.DEFAULT.options("sphereon:siopv2-oid4vp:op-auth", {
|
|
1850
|
+
defaultLogLevel: import_ssi_types9.LogLevel.DEBUG,
|
|
1850
1851
|
methods: [
|
|
1851
|
-
|
|
1852
|
+
import_ssi_types9.LogMethod.CONSOLE
|
|
1852
1853
|
]
|
|
1853
1854
|
}).get("sphereon:siopv2-oid4vp:op-auth");
|
|
1854
1855
|
var OID4VPCallbackStateListener = /* @__PURE__ */ __name((callbacks) => {
|
|
@@ -1881,8 +1882,8 @@ var OID4VPCallbackStateListener = /* @__PURE__ */ __name((callbacks) => {
|
|
|
1881
1882
|
var import_ssi_sdk7 = require("@sphereon/ssi-sdk.agent-config");
|
|
1882
1883
|
var import_ssi_sdk8 = require("@sphereon/ssi-sdk.core");
|
|
1883
1884
|
var import_ssi_sdk9 = require("@sphereon/ssi-sdk.xstate-machine-persistence");
|
|
1884
|
-
var
|
|
1885
|
-
var logger6 =
|
|
1885
|
+
var import_ssi_types10 = require("@sphereon/ssi-types");
|
|
1886
|
+
var logger6 = import_ssi_types10.Loggers.DEFAULT.options(LOGGER_NAMESPACE, {}).get(LOGGER_NAMESPACE);
|
|
1886
1887
|
var Siopv2OID4VPLinkHandler = class extends import_ssi_sdk8.LinkHandlerAdapter {
|
|
1887
1888
|
static {
|
|
1888
1889
|
__name(this, "Siopv2OID4VPLinkHandler");
|