@sphereon/oid4vci-client 0.19.1-feature.SSISDK.78.code.auth.flow.220 → 0.19.1-feature.SSISDK.78.code.auth.flow.224
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 +9 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -8
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -1205,7 +1205,7 @@ var createAuthorizationRequestUrl = /* @__PURE__ */ __name(async ({ pkce, endpoi
|
|
|
1205
1205
|
...credentialOffer?.issuerState && {
|
|
1206
1206
|
issuer_state: credentialOffer.issuerState
|
|
1207
1207
|
},
|
|
1208
|
-
scope: authorizationRequest.scope
|
|
1208
|
+
scope: authorizationRequest.scope ?? "openid"
|
|
1209
1209
|
};
|
|
1210
1210
|
if (credentialOffer?.issuerState) {
|
|
1211
1211
|
queryObj.state = credentialOffer?.issuerState;
|
|
@@ -1214,7 +1214,7 @@ var createAuthorizationRequestUrl = /* @__PURE__ */ __name(async ({ pkce, endpoi
|
|
|
1214
1214
|
throw Error(`PAR mode is set to required by Authorization Server does not support PAR!`);
|
|
1215
1215
|
} else if (parEndpoint && parMode !== import_oid4vci_common11.PARMode.NEVER) {
|
|
1216
1216
|
logger4.debug(`USING PAR with endpoint ${parEndpoint}`);
|
|
1217
|
-
const
|
|
1217
|
+
const parBody = (0, import_oid4vci_common11.convertJsonToURI)(queryObj, {
|
|
1218
1218
|
mode: import_oid4vci_common11.JsonURIMode.X_FORM_WWW_URLENCODED,
|
|
1219
1219
|
uriTypeProperties: [
|
|
1220
1220
|
"client_id",
|
|
@@ -1225,7 +1225,8 @@ var createAuthorizationRequestUrl = /* @__PURE__ */ __name(async ({ pkce, endpoi
|
|
|
1225
1225
|
"issuer_state",
|
|
1226
1226
|
"state"
|
|
1227
1227
|
]
|
|
1228
|
-
})
|
|
1228
|
+
});
|
|
1229
|
+
const parResponse = await (0, import_oid4vci_common11.formPost)(parEndpoint, parBody, {
|
|
1229
1230
|
contentType: "application/x-www-form-urlencoded",
|
|
1230
1231
|
accept: "application/json"
|
|
1231
1232
|
});
|
|
@@ -1304,6 +1305,11 @@ var handleLocations = /* @__PURE__ */ __name((endpointMetadata, authorizationDet
|
|
|
1304
1305
|
endpointMetadata.issuer
|
|
1305
1306
|
];
|
|
1306
1307
|
}
|
|
1308
|
+
if (Array.isArray(authorizationDetails.locations)) {
|
|
1309
|
+
authorizationDetails.locations = [
|
|
1310
|
+
...new Set(authorizationDetails.locations)
|
|
1311
|
+
];
|
|
1312
|
+
}
|
|
1307
1313
|
}
|
|
1308
1314
|
return authorizationDetails;
|
|
1309
1315
|
}, "handleLocations");
|
|
@@ -1503,11 +1509,6 @@ var CredentialRequestClient = class {
|
|
|
1503
1509
|
});
|
|
1504
1510
|
}
|
|
1505
1511
|
response.access_token = requestToken;
|
|
1506
|
-
if (uniformRequest.credential_subject_issuance && response.successBody || response.successBody?.credential_subject_issuance) {
|
|
1507
|
-
if (JSON.stringify(uniformRequest.credential_subject_issuance) !== JSON.stringify(response.successBody?.credential_subject_issuance)) {
|
|
1508
|
-
throw Error("Subject signing was requested, but issuer did not provide the options in its response");
|
|
1509
|
-
}
|
|
1510
|
-
}
|
|
1511
1512
|
logger5.debug(`Credential endpoint ${credentialEndpoint} response:\r
|
|
1512
1513
|
${JSON.stringify(response, null, 2)}`);
|
|
1513
1514
|
return {
|