@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 +17 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +17 -19
- package/dist/index.js.map +1 -1
- package/package.json +23 -22
- package/src/agent/DidAuthSiopOpAuthenticator.ts +1 -1
- package/src/session/functions.ts +1 -8
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
|
});
|
|
@@ -807,19 +805,19 @@ var LOGGER_NAMESPACE = "sphereon:siopv2-oid4vp:op-auth";
|
|
|
807
805
|
var DEFAULT_JWT_PROOF_TYPE = "JwtProof2020";
|
|
808
806
|
|
|
809
807
|
// src/types/siop-service/index.ts
|
|
810
|
-
var Siopv2HolderEvent = /* @__PURE__ */ function(Siopv2HolderEvent2) {
|
|
808
|
+
var Siopv2HolderEvent = /* @__PURE__ */ (function(Siopv2HolderEvent2) {
|
|
811
809
|
Siopv2HolderEvent2["CONTACT_IDENTITY_CREATED"] = "contact_identity_created";
|
|
812
810
|
Siopv2HolderEvent2["IDENTIFIER_CREATED"] = "identifier_created";
|
|
813
811
|
return Siopv2HolderEvent2;
|
|
814
|
-
}({});
|
|
815
|
-
var SupportedLanguage = /* @__PURE__ */ function(SupportedLanguage2) {
|
|
812
|
+
})({});
|
|
813
|
+
var SupportedLanguage = /* @__PURE__ */ (function(SupportedLanguage2) {
|
|
816
814
|
SupportedLanguage2["ENGLISH"] = "en";
|
|
817
815
|
SupportedLanguage2["DUTCH"] = "nl";
|
|
818
816
|
return SupportedLanguage2;
|
|
819
|
-
}({});
|
|
817
|
+
})({});
|
|
820
818
|
|
|
821
819
|
// src/types/machine/index.ts
|
|
822
|
-
var Siopv2MachineStates = /* @__PURE__ */ function(Siopv2MachineStates2) {
|
|
820
|
+
var Siopv2MachineStates = /* @__PURE__ */ (function(Siopv2MachineStates2) {
|
|
823
821
|
Siopv2MachineStates2["createConfig"] = "createConfig";
|
|
824
822
|
Siopv2MachineStates2["getSiopRequest"] = "getSiopRequest";
|
|
825
823
|
Siopv2MachineStates2["getSelectableCredentials"] = "getSelectableCredentials";
|
|
@@ -835,14 +833,14 @@ var Siopv2MachineStates = /* @__PURE__ */ function(Siopv2MachineStates2) {
|
|
|
835
833
|
Siopv2MachineStates2["error"] = "error";
|
|
836
834
|
Siopv2MachineStates2["done"] = "done";
|
|
837
835
|
return Siopv2MachineStates2;
|
|
838
|
-
}({});
|
|
839
|
-
var Siopv2MachineAddContactStates = /* @__PURE__ */ function(Siopv2MachineAddContactStates2) {
|
|
836
|
+
})({});
|
|
837
|
+
var Siopv2MachineAddContactStates = /* @__PURE__ */ (function(Siopv2MachineAddContactStates2) {
|
|
840
838
|
Siopv2MachineAddContactStates2["idle"] = "idle";
|
|
841
839
|
Siopv2MachineAddContactStates2["executing"] = "executing";
|
|
842
840
|
Siopv2MachineAddContactStates2["next"] = "next";
|
|
843
841
|
return Siopv2MachineAddContactStates2;
|
|
844
|
-
}({});
|
|
845
|
-
var Siopv2MachineEvents = /* @__PURE__ */ function(Siopv2MachineEvents2) {
|
|
842
|
+
})({});
|
|
843
|
+
var Siopv2MachineEvents = /* @__PURE__ */ (function(Siopv2MachineEvents2) {
|
|
846
844
|
Siopv2MachineEvents2["NEXT"] = "NEXT";
|
|
847
845
|
Siopv2MachineEvents2["PREVIOUS"] = "PREVIOUS";
|
|
848
846
|
Siopv2MachineEvents2["DECLINE"] = "DECLINE";
|
|
@@ -851,8 +849,8 @@ var Siopv2MachineEvents = /* @__PURE__ */ function(Siopv2MachineEvents2) {
|
|
|
851
849
|
Siopv2MachineEvents2["CREATE_CONTACT"] = "CREATE_CONTACT";
|
|
852
850
|
Siopv2MachineEvents2["SET_SELECTED_CREDENTIALS"] = "SET_SELECTED_CREDENTIALS";
|
|
853
851
|
return Siopv2MachineEvents2;
|
|
854
|
-
}({});
|
|
855
|
-
var Siopv2MachineGuards = /* @__PURE__ */ function(Siopv2MachineGuards2) {
|
|
852
|
+
})({});
|
|
853
|
+
var Siopv2MachineGuards = /* @__PURE__ */ (function(Siopv2MachineGuards2) {
|
|
856
854
|
Siopv2MachineGuards2["hasNoContactGuard"] = "Siopv2HasNoContactGuard";
|
|
857
855
|
Siopv2MachineGuards2["createContactGuard"] = "Siopv2CreateContactGuard";
|
|
858
856
|
Siopv2MachineGuards2["hasContactGuard"] = "Siopv2HasContactGuard";
|
|
@@ -862,8 +860,8 @@ var Siopv2MachineGuards = /* @__PURE__ */ function(Siopv2MachineGuards2) {
|
|
|
862
860
|
Siopv2MachineGuards2["siopOnlyGuard"] = "Siopv2IsSiopOnlyGuard";
|
|
863
861
|
Siopv2MachineGuards2["siopWithOID4VPGuard"] = "Siopv2IsSiopWithOID4VPGuard";
|
|
864
862
|
return Siopv2MachineGuards2;
|
|
865
|
-
}({});
|
|
866
|
-
var Siopv2MachineServices = /* @__PURE__ */ function(Siopv2MachineServices2) {
|
|
863
|
+
})({});
|
|
864
|
+
var Siopv2MachineServices = /* @__PURE__ */ (function(Siopv2MachineServices2) {
|
|
867
865
|
Siopv2MachineServices2["getSiopRequest"] = "getSiopRequest";
|
|
868
866
|
Siopv2MachineServices2["getSelectableCredentials"] = "getSelectableCredentials";
|
|
869
867
|
Siopv2MachineServices2["retrieveContact"] = "retrieveContact";
|
|
@@ -871,7 +869,7 @@ var Siopv2MachineServices = /* @__PURE__ */ function(Siopv2MachineServices2) {
|
|
|
871
869
|
Siopv2MachineServices2["sendResponse"] = "sendResponse";
|
|
872
870
|
Siopv2MachineServices2["createConfig"] = "createConfig";
|
|
873
871
|
return Siopv2MachineServices2;
|
|
874
|
-
}({});
|
|
872
|
+
})({});
|
|
875
873
|
|
|
876
874
|
// src/types/identifier/index.ts
|
|
877
875
|
var DID_PREFIX = "did";
|
|
@@ -1671,7 +1669,7 @@ var DidAuthSiopOpAuthenticator = class {
|
|
|
1671
1669
|
const verifiedAuthorizationRequest = await session.getAuthorizationRequest();
|
|
1672
1670
|
const clientName = verifiedAuthorizationRequest.registrationMetadataPayload?.client_name;
|
|
1673
1671
|
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
|
|
1672
|
+
const uri = url?.includes("://") ? new URL(url) : void 0;
|
|
1675
1673
|
const correlationId = uri?.hostname ?? await this.determineCorrelationId(uri, verifiedAuthorizationRequest, clientName, context);
|
|
1676
1674
|
const clientId = verifiedAuthorizationRequest.authorizationRequest.getMergedProperty("client_id");
|
|
1677
1675
|
return {
|