@mattrglobal/verifier-sdk-web 2.0.3-unstable.47 → 2.0.3-unstable.49
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/lib/verifier-js-no-deps.cjs.js +10 -10
- package/dist/lib/verifier-js-no-deps.cjs.js.map +1 -1
- package/dist/lib/verifier-js.cjs.js +10 -10
- package/dist/lib/verifier-js.cjs.js.map +1 -1
- package/dist/verifier-js.development.js +10 -10
- package/dist/verifier-js.development.js.map +1 -1
- package/dist/verifier-js.production.esm.js +1 -1
- package/dist/verifier-js.production.esm.js.map +1 -1
- package/dist/verifier-js.production.js +1 -1
- package/dist/verifier-js.production.js.map +1 -1
- package/package.json +2 -2
|
@@ -493,13 +493,16 @@ const getHashParamValue = (hash, param) => {
|
|
|
493
493
|
};
|
|
494
494
|
|
|
495
495
|
const createSession = async ({credentialQuery: credentialQuery, challenge: challenge, redirectUri: redirectUri, apiBaseUrl: apiBaseUrl, walletProviderId: walletProviderId, dcApiSupported: dcApiSupported, applicationId: applicationId}) => {
|
|
496
|
+
const openid4VpConfiguration = !!walletProviderId || !!redirectUri ? {
|
|
497
|
+
redirectUri: redirectUri,
|
|
498
|
+
walletProviderId: walletProviderId
|
|
499
|
+
} : undefined;
|
|
496
500
|
const postData = {
|
|
497
501
|
credentialQuery: credentialQuery,
|
|
498
502
|
challenge: challenge,
|
|
499
503
|
applicationId: applicationId,
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
dcApiSupported: dcApiSupported
|
|
504
|
+
dcApiSupported: dcApiSupported,
|
|
505
|
+
openid4VpConfiguration: openid4VpConfiguration
|
|
503
506
|
};
|
|
504
507
|
const responseResult = await safeFetch(`${apiBaseUrl}/v2/presentations/web/sessions`, {
|
|
505
508
|
method: "POST",
|
|
@@ -772,8 +775,7 @@ const requestCredentialsWithDigitalCredentialsApi = async options => {
|
|
|
772
775
|
sessionId: sessionId,
|
|
773
776
|
sessionKey: sessionKey,
|
|
774
777
|
challenge: challenge,
|
|
775
|
-
|
|
776
|
-
data: parsedCredentialResponse.data
|
|
778
|
+
response: parsedCredentialResponse
|
|
777
779
|
});
|
|
778
780
|
if (credentialVerificationResult.isErr()) {
|
|
779
781
|
return neverthrow.err({
|
|
@@ -852,12 +854,10 @@ const parseCredentialResponse = credentialResponse => {
|
|
|
852
854
|
};
|
|
853
855
|
|
|
854
856
|
const verifyCredentialResponse = async options => {
|
|
855
|
-
const {apiBaseUrl: apiBaseUrl, sessionId: sessionId, sessionKey: sessionKey, challenge: challenge,
|
|
856
|
-
const requestBody = {
|
|
857
|
-
protocol: protocol,
|
|
858
|
-
data: data,
|
|
857
|
+
const {apiBaseUrl: apiBaseUrl, sessionId: sessionId, sessionKey: sessionKey, challenge: challenge, response: response} = options;
|
|
858
|
+
const requestBody = Object.assign(Object.assign({}, response), {
|
|
859
859
|
challenge: challenge
|
|
860
|
-
};
|
|
860
|
+
});
|
|
861
861
|
const credentialVerificationResult = await safeFetch(`${apiBaseUrl}/v2/presentations/web/sessions/${sessionId}/dc-api/response`, {
|
|
862
862
|
method: "POST",
|
|
863
863
|
headers: {
|