@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.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.SIOPv2_ID1,
398
- SupportedVersion.JWT_VC_PRESENTATION_PROFILE_v1,
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 { SupportedVersion as SupportedVersion2 } from "@sphereon/did-auth-siop";
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 ?? (request.versions.includes(SupportedVersion2.JWT_VC_PRESENTATION_PROFILE_v1) ? "https://self-issued.me/v2/openid-vc" : "https://self-issued.me/v2");
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.includes("://") ? new URL(url) : void 0;
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 {