@sphereon/ssi-sdk.siopv2-oid4vp-op-auth 0.34.1-feature.SSISDK.57.uni.client.206 → 0.34.1-feature.SSISDK.58.host.nonce.endpoint.145

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