@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
|
@@ -1713,13 +1713,16 @@
|
|
|
1713
1713
|
return urlParams.get(param);
|
|
1714
1714
|
};
|
|
1715
1715
|
const createSession = async ({credentialQuery: credentialQuery, challenge: challenge, redirectUri: redirectUri, apiBaseUrl: apiBaseUrl, walletProviderId: walletProviderId, dcApiSupported: dcApiSupported, applicationId: applicationId}) => {
|
|
1716
|
+
const openid4VpConfiguration = !!walletProviderId || !!redirectUri ? {
|
|
1717
|
+
redirectUri: redirectUri,
|
|
1718
|
+
walletProviderId: walletProviderId
|
|
1719
|
+
} : undefined;
|
|
1716
1720
|
const postData = {
|
|
1717
1721
|
credentialQuery: credentialQuery,
|
|
1718
1722
|
challenge: challenge,
|
|
1719
1723
|
applicationId: applicationId,
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
dcApiSupported: dcApiSupported
|
|
1724
|
+
dcApiSupported: dcApiSupported,
|
|
1725
|
+
openid4VpConfiguration: openid4VpConfiguration
|
|
1723
1726
|
};
|
|
1724
1727
|
const responseResult = await safeFetch(`${apiBaseUrl}/v2/presentations/web/sessions`, {
|
|
1725
1728
|
method: "POST",
|
|
@@ -1977,8 +1980,7 @@
|
|
|
1977
1980
|
sessionId: sessionId,
|
|
1978
1981
|
sessionKey: sessionKey,
|
|
1979
1982
|
challenge: challenge,
|
|
1980
|
-
|
|
1981
|
-
data: parsedCredentialResponse.data
|
|
1983
|
+
response: parsedCredentialResponse
|
|
1982
1984
|
});
|
|
1983
1985
|
if (credentialVerificationResult.isErr()) {
|
|
1984
1986
|
return err({
|
|
@@ -2054,12 +2056,10 @@
|
|
|
2054
2056
|
});
|
|
2055
2057
|
};
|
|
2056
2058
|
const verifyCredentialResponse = async options => {
|
|
2057
|
-
const {apiBaseUrl: apiBaseUrl, sessionId: sessionId, sessionKey: sessionKey, challenge: challenge,
|
|
2058
|
-
const requestBody = {
|
|
2059
|
-
protocol: protocol,
|
|
2060
|
-
data: data,
|
|
2059
|
+
const {apiBaseUrl: apiBaseUrl, sessionId: sessionId, sessionKey: sessionKey, challenge: challenge, response: response} = options;
|
|
2060
|
+
const requestBody = Object.assign(Object.assign({}, response), {
|
|
2061
2061
|
challenge: challenge
|
|
2062
|
-
};
|
|
2062
|
+
});
|
|
2063
2063
|
const credentialVerificationResult = await safeFetch(`${apiBaseUrl}/v2/presentations/web/sessions/${sessionId}/dc-api/response`, {
|
|
2064
2064
|
method: "POST",
|
|
2065
2065
|
headers: {
|