@sphereon/ssi-sdk.siopv2-oid4vp-op-auth 0.34.1-fix.182 → 0.34.1-fix.223
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 +26 -30
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -11
- package/dist/index.js.map +1 -1
- package/package.json +22 -22
- package/src/agent/DidAuthSiopOpAuthenticator.ts +1 -1
- package/src/services/Siopv2MachineService.ts +15 -12
- package/src/session/functions.ts +1 -8
- package/src/utils/CredentialUtils.ts +1 -1
package/dist/index.js
CHANGED
|
@@ -394,10 +394,8 @@ __name(createOID4VPPresentationSignCallback, "createOID4VPPresentationSignCallba
|
|
|
394
394
|
async function createOPBuilder({ opOptions, idOpts: idOpts1, context }) {
|
|
395
395
|
const eventEmitter = opOptions.eventEmitter ?? new EventEmitter();
|
|
396
396
|
const builder = OP.builder().withResponseMode(opOptions.responseMode ?? ResponseMode.DIRECT_POST).withSupportedVersions(opOptions.supportedVersions ?? [
|
|
397
|
-
SupportedVersion.
|
|
398
|
-
SupportedVersion.
|
|
399
|
-
SupportedVersion.SIOPv2_D11,
|
|
400
|
-
SupportedVersion.SIOPv2_D12_OID4VP_D18
|
|
397
|
+
SupportedVersion.OID4VP_v1,
|
|
398
|
+
SupportedVersion.SIOPv2_OID4VP_D28
|
|
401
399
|
]).withExpiresIn(opOptions.expiresIn ?? 300).withEventEmitter(eventEmitter).withRegistration({
|
|
402
400
|
passBy: PassBy.VALUE
|
|
403
401
|
});
|
|
@@ -1289,13 +1287,12 @@ var Siopv2Machine = class {
|
|
|
1289
1287
|
};
|
|
1290
1288
|
|
|
1291
1289
|
// src/services/Siopv2MachineService.ts
|
|
1292
|
-
import {
|
|
1290
|
+
import { getOrCreatePrimaryIdentifier, SupportedDidMethodEnum } from "@sphereon/ssi-sdk-ext.did-utils";
|
|
1293
1291
|
import { isOID4VCIssuerIdentifier } from "@sphereon/ssi-sdk-ext.identifier-resolution";
|
|
1292
|
+
import { encodeJoseBlob } from "@sphereon/ssi-sdk.core";
|
|
1294
1293
|
import { verifiableCredentialForRoleFilter } from "@sphereon/ssi-sdk.credential-store";
|
|
1295
1294
|
import { ConnectionType } from "@sphereon/ssi-sdk.data-store";
|
|
1296
|
-
import { CredentialRole } from "@sphereon/ssi-types";
|
|
1297
|
-
import { CredentialMapper as CredentialMapper3, Loggers as Loggers3 } from "@sphereon/ssi-types";
|
|
1298
|
-
import { encodeJoseBlob } from "@sphereon/ssi-sdk.core";
|
|
1295
|
+
import { CredentialMapper as CredentialMapper3, CredentialRole, Loggers as Loggers3 } from "@sphereon/ssi-types";
|
|
1299
1296
|
import { DcqlPresentation, DcqlQuery } from "dcql";
|
|
1300
1297
|
|
|
1301
1298
|
// src/utils/dcql.ts
|
|
@@ -1336,7 +1333,6 @@ function convertToDcqlCredentials(credential, hasher) {
|
|
|
1336
1333
|
__name(convertToDcqlCredentials, "convertToDcqlCredentials");
|
|
1337
1334
|
|
|
1338
1335
|
// src/services/Siopv2MachineService.ts
|
|
1339
|
-
import { getOrCreatePrimaryIdentifier, SupportedDidMethodEnum } from "@sphereon/ssi-sdk-ext.did-utils";
|
|
1340
1336
|
var logger3 = Loggers3.DEFAULT.get(LOGGER_NAMESPACE);
|
|
1341
1337
|
var siopSendAuthorizationResponse = /* @__PURE__ */ __name(async (connectionType, args, context) => {
|
|
1342
1338
|
const { agent } = context;
|
|
@@ -1351,7 +1347,7 @@ var siopSendAuthorizationResponse = /* @__PURE__ */ __name(async (connectionType
|
|
|
1351
1347
|
const aud = request.authorizationRequest.getMergedProperty("aud");
|
|
1352
1348
|
logger3.debug(`AUD: ${aud}`);
|
|
1353
1349
|
logger3.debug(JSON.stringify(request.authorizationRequest));
|
|
1354
|
-
const domain = await request.authorizationRequest.getMergedProperty("client_id") ?? request.issuer ??
|
|
1350
|
+
const domain = await request.authorizationRequest.getMergedProperty("client_id") ?? request.issuer ?? "https://self-issued.me/v2";
|
|
1355
1351
|
logger3.debug(`NONCE: ${session.nonce}, domain: ${domain}`);
|
|
1356
1352
|
const firstUniqueDC = credentials[0];
|
|
1357
1353
|
if (typeof firstUniqueDC !== "object" || !("digitalCredential" in firstUniqueDC)) {
|
|
@@ -1671,7 +1667,7 @@ var DidAuthSiopOpAuthenticator = class {
|
|
|
1671
1667
|
const verifiedAuthorizationRequest = await session.getAuthorizationRequest();
|
|
1672
1668
|
const clientName = verifiedAuthorizationRequest.registrationMetadataPayload?.client_name;
|
|
1673
1669
|
const url = verifiedAuthorizationRequest.responseURI ?? (args.url.includes("request_uri") ? decodeURIComponent(args.url.split("?request_uri=")[1].trim()) : verifiedAuthorizationRequest.issuer ?? verifiedAuthorizationRequest.registrationMetadataPayload?.client_id);
|
|
1674
|
-
const uri = url
|
|
1670
|
+
const uri = url?.includes("://") ? new URL(url) : void 0;
|
|
1675
1671
|
const correlationId = uri?.hostname ?? await this.determineCorrelationId(uri, verifiedAuthorizationRequest, clientName, context);
|
|
1676
1672
|
const clientId = verifiedAuthorizationRequest.authorizationRequest.getMergedProperty("client_id");
|
|
1677
1673
|
return {
|