@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
|
@@ -1859,13 +1859,16 @@ const getHashParamValue = (hash, param) => {
|
|
|
1859
1859
|
};
|
|
1860
1860
|
|
|
1861
1861
|
const createSession = async ({credentialQuery: credentialQuery, challenge: challenge, redirectUri: redirectUri, apiBaseUrl: apiBaseUrl, walletProviderId: walletProviderId, dcApiSupported: dcApiSupported, applicationId: applicationId}) => {
|
|
1862
|
+
const openid4VpConfiguration = !!walletProviderId || !!redirectUri ? {
|
|
1863
|
+
redirectUri: redirectUri,
|
|
1864
|
+
walletProviderId: walletProviderId
|
|
1865
|
+
} : undefined;
|
|
1862
1866
|
const postData = {
|
|
1863
1867
|
credentialQuery: credentialQuery,
|
|
1864
1868
|
challenge: challenge,
|
|
1865
1869
|
applicationId: applicationId,
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
dcApiSupported: dcApiSupported
|
|
1870
|
+
dcApiSupported: dcApiSupported,
|
|
1871
|
+
openid4VpConfiguration: openid4VpConfiguration
|
|
1869
1872
|
};
|
|
1870
1873
|
const responseResult = await safeFetch(`${apiBaseUrl}/v2/presentations/web/sessions`, {
|
|
1871
1874
|
method: "POST",
|
|
@@ -2138,8 +2141,7 @@ const requestCredentialsWithDigitalCredentialsApi = async options => {
|
|
|
2138
2141
|
sessionId: sessionId,
|
|
2139
2142
|
sessionKey: sessionKey,
|
|
2140
2143
|
challenge: challenge,
|
|
2141
|
-
|
|
2142
|
-
data: parsedCredentialResponse.data
|
|
2144
|
+
response: parsedCredentialResponse
|
|
2143
2145
|
});
|
|
2144
2146
|
if (credentialVerificationResult.isErr()) {
|
|
2145
2147
|
return err({
|
|
@@ -2218,12 +2220,10 @@ const parseCredentialResponse = credentialResponse => {
|
|
|
2218
2220
|
};
|
|
2219
2221
|
|
|
2220
2222
|
const verifyCredentialResponse = async options => {
|
|
2221
|
-
const {apiBaseUrl: apiBaseUrl, sessionId: sessionId, sessionKey: sessionKey, challenge: challenge,
|
|
2222
|
-
const requestBody = {
|
|
2223
|
-
protocol: protocol,
|
|
2224
|
-
data: data,
|
|
2223
|
+
const {apiBaseUrl: apiBaseUrl, sessionId: sessionId, sessionKey: sessionKey, challenge: challenge, response: response} = options;
|
|
2224
|
+
const requestBody = Object.assign(Object.assign({}, response), {
|
|
2225
2225
|
challenge: challenge
|
|
2226
|
-
};
|
|
2226
|
+
});
|
|
2227
2227
|
const credentialVerificationResult = await safeFetch(`${apiBaseUrl}/v2/presentations/web/sessions/${sessionId}/dc-api/response`, {
|
|
2228
2228
|
method: "POST",
|
|
2229
2229
|
headers: {
|