@sphereon/ssi-sdk.siopv2-oid4vp-op-auth 0.34.1-feature.SSISDK.45.135 → 0.34.1-feature.SSISDK.45.189

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 CHANGED
@@ -451,10 +451,8 @@ __name(createOID4VPPresentationSignCallback, "createOID4VPPresentationSignCallba
451
451
  async function createOPBuilder({ opOptions, idOpts: idOpts1, context }) {
452
452
  const eventEmitter = opOptions.eventEmitter ?? new import_events.EventEmitter();
453
453
  const builder = import_did_auth_siop.OP.builder().withResponseMode(opOptions.responseMode ?? import_did_auth_siop.ResponseMode.DIRECT_POST).withSupportedVersions(opOptions.supportedVersions ?? [
454
- import_did_auth_siop.SupportedVersion.SIOPv2_ID1,
455
- import_did_auth_siop.SupportedVersion.JWT_VC_PRESENTATION_PROFILE_v1,
456
- import_did_auth_siop.SupportedVersion.SIOPv2_D11,
457
- import_did_auth_siop.SupportedVersion.SIOPv2_D12_OID4VP_D18
454
+ import_did_auth_siop.SupportedVersion.OID4VP_v1,
455
+ import_did_auth_siop.SupportedVersion.SIOPv2_OID4VP_D28
458
456
  ]).withExpiresIn(opOptions.expiresIn ?? 300).withEventEmitter(eventEmitter).withRegistration({
459
457
  passBy: import_did_auth_siop.PassBy.VALUE
460
458
  });
@@ -864,19 +862,19 @@ var LOGGER_NAMESPACE = "sphereon:siopv2-oid4vp:op-auth";
864
862
  var DEFAULT_JWT_PROOF_TYPE = "JwtProof2020";
865
863
 
866
864
  // src/types/siop-service/index.ts
867
- var Siopv2HolderEvent = /* @__PURE__ */ function(Siopv2HolderEvent2) {
865
+ var Siopv2HolderEvent = /* @__PURE__ */ (function(Siopv2HolderEvent2) {
868
866
  Siopv2HolderEvent2["CONTACT_IDENTITY_CREATED"] = "contact_identity_created";
869
867
  Siopv2HolderEvent2["IDENTIFIER_CREATED"] = "identifier_created";
870
868
  return Siopv2HolderEvent2;
871
- }({});
872
- var SupportedLanguage = /* @__PURE__ */ function(SupportedLanguage2) {
869
+ })({});
870
+ var SupportedLanguage = /* @__PURE__ */ (function(SupportedLanguage2) {
873
871
  SupportedLanguage2["ENGLISH"] = "en";
874
872
  SupportedLanguage2["DUTCH"] = "nl";
875
873
  return SupportedLanguage2;
876
- }({});
874
+ })({});
877
875
 
878
876
  // src/types/machine/index.ts
879
- var Siopv2MachineStates = /* @__PURE__ */ function(Siopv2MachineStates2) {
877
+ var Siopv2MachineStates = /* @__PURE__ */ (function(Siopv2MachineStates2) {
880
878
  Siopv2MachineStates2["createConfig"] = "createConfig";
881
879
  Siopv2MachineStates2["getSiopRequest"] = "getSiopRequest";
882
880
  Siopv2MachineStates2["getSelectableCredentials"] = "getSelectableCredentials";
@@ -892,14 +890,14 @@ var Siopv2MachineStates = /* @__PURE__ */ function(Siopv2MachineStates2) {
892
890
  Siopv2MachineStates2["error"] = "error";
893
891
  Siopv2MachineStates2["done"] = "done";
894
892
  return Siopv2MachineStates2;
895
- }({});
896
- var Siopv2MachineAddContactStates = /* @__PURE__ */ function(Siopv2MachineAddContactStates2) {
893
+ })({});
894
+ var Siopv2MachineAddContactStates = /* @__PURE__ */ (function(Siopv2MachineAddContactStates2) {
897
895
  Siopv2MachineAddContactStates2["idle"] = "idle";
898
896
  Siopv2MachineAddContactStates2["executing"] = "executing";
899
897
  Siopv2MachineAddContactStates2["next"] = "next";
900
898
  return Siopv2MachineAddContactStates2;
901
- }({});
902
- var Siopv2MachineEvents = /* @__PURE__ */ function(Siopv2MachineEvents2) {
899
+ })({});
900
+ var Siopv2MachineEvents = /* @__PURE__ */ (function(Siopv2MachineEvents2) {
903
901
  Siopv2MachineEvents2["NEXT"] = "NEXT";
904
902
  Siopv2MachineEvents2["PREVIOUS"] = "PREVIOUS";
905
903
  Siopv2MachineEvents2["DECLINE"] = "DECLINE";
@@ -908,8 +906,8 @@ var Siopv2MachineEvents = /* @__PURE__ */ function(Siopv2MachineEvents2) {
908
906
  Siopv2MachineEvents2["CREATE_CONTACT"] = "CREATE_CONTACT";
909
907
  Siopv2MachineEvents2["SET_SELECTED_CREDENTIALS"] = "SET_SELECTED_CREDENTIALS";
910
908
  return Siopv2MachineEvents2;
911
- }({});
912
- var Siopv2MachineGuards = /* @__PURE__ */ function(Siopv2MachineGuards2) {
909
+ })({});
910
+ var Siopv2MachineGuards = /* @__PURE__ */ (function(Siopv2MachineGuards2) {
913
911
  Siopv2MachineGuards2["hasNoContactGuard"] = "Siopv2HasNoContactGuard";
914
912
  Siopv2MachineGuards2["createContactGuard"] = "Siopv2CreateContactGuard";
915
913
  Siopv2MachineGuards2["hasContactGuard"] = "Siopv2HasContactGuard";
@@ -919,8 +917,8 @@ var Siopv2MachineGuards = /* @__PURE__ */ function(Siopv2MachineGuards2) {
919
917
  Siopv2MachineGuards2["siopOnlyGuard"] = "Siopv2IsSiopOnlyGuard";
920
918
  Siopv2MachineGuards2["siopWithOID4VPGuard"] = "Siopv2IsSiopWithOID4VPGuard";
921
919
  return Siopv2MachineGuards2;
922
- }({});
923
- var Siopv2MachineServices = /* @__PURE__ */ function(Siopv2MachineServices2) {
920
+ })({});
921
+ var Siopv2MachineServices = /* @__PURE__ */ (function(Siopv2MachineServices2) {
924
922
  Siopv2MachineServices2["getSiopRequest"] = "getSiopRequest";
925
923
  Siopv2MachineServices2["getSelectableCredentials"] = "getSelectableCredentials";
926
924
  Siopv2MachineServices2["retrieveContact"] = "retrieveContact";
@@ -928,7 +926,7 @@ var Siopv2MachineServices = /* @__PURE__ */ function(Siopv2MachineServices2) {
928
926
  Siopv2MachineServices2["sendResponse"] = "sendResponse";
929
927
  Siopv2MachineServices2["createConfig"] = "createConfig";
930
928
  return Siopv2MachineServices2;
931
- }({});
929
+ })({});
932
930
 
933
931
  // src/types/identifier/index.ts
934
932
  var DID_PREFIX = "did";
@@ -1728,7 +1726,7 @@ var DidAuthSiopOpAuthenticator = class {
1728
1726
  const verifiedAuthorizationRequest = await session.getAuthorizationRequest();
1729
1727
  const clientName = verifiedAuthorizationRequest.registrationMetadataPayload?.client_name;
1730
1728
  const url = verifiedAuthorizationRequest.responseURI ?? (args.url.includes("request_uri") ? decodeURIComponent(args.url.split("?request_uri=")[1].trim()) : verifiedAuthorizationRequest.issuer ?? verifiedAuthorizationRequest.registrationMetadataPayload?.client_id);
1731
- const uri = url.includes("://") ? new URL(url) : void 0;
1729
+ const uri = url?.includes("://") ? new URL(url) : void 0;
1732
1730
  const correlationId = uri?.hostname ?? await this.determineCorrelationId(uri, verifiedAuthorizationRequest, clientName, context);
1733
1731
  const clientId = verifiedAuthorizationRequest.authorizationRequest.getMergedProperty("client_id");
1734
1732
  return {