@eudiplo/sdk-core 9.1.0-main.d8fc118 → 9.1.0-main.da23cae
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/README.md +4 -1
- package/dist/api/index.d.mts +102 -103
- package/dist/api/index.d.ts +102 -103
- package/dist/api/index.js +97 -121
- package/dist/api/index.mjs +80 -100
- package/dist/index.d.mts +8 -5
- package/dist/index.d.ts +8 -5
- package/dist/index.js +97 -121
- package/dist/index.mjs +80 -100
- package/dist/{types.gen-CFxpxUXT.d.mts → types.gen-CgeSVka2.d.mts} +1647 -1614
- package/dist/{types.gen-CFxpxUXT.d.ts → types.gen-CgeSVka2.d.ts} +1647 -1614
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -95,9 +95,11 @@ import { EudiploClient } from '@eudiplo/sdk-core';
|
|
|
95
95
|
|
|
96
96
|
const client = new EudiploClient({...});
|
|
97
97
|
|
|
98
|
-
// Create DC API session with request object
|
|
98
|
+
// Create DC API session with request object. In a browser, origin defaults
|
|
99
|
+
// to location.origin; on a server, set the origin of your page.
|
|
99
100
|
const session = await client.createDcApiPresentationRequest({
|
|
100
101
|
configId: 'age-over-18',
|
|
102
|
+
origin: 'https://shop.example',
|
|
101
103
|
});
|
|
102
104
|
|
|
103
105
|
// Submit using the browser-native DC API end-to-end
|
|
@@ -108,6 +110,7 @@ const result = await client.submitDcApiPresentation(session);
|
|
|
108
110
|
|
|
109
111
|
For production deployments, keep `clientId` and `clientSecret` on the server.
|
|
110
112
|
Use `EudiploClient` methods to run the full flow (`createDcApiPresentationRequest` + `submitDcApiPresentation`) from trusted backend/application code.
|
|
113
|
+
Server-side calls must pass `origin`, the origin of the page that calls the wallet, taken from your own configuration and never from the end user's request. Without it, EUDIPLO answers `400` unless the presentation configuration lists exactly one allowed origin.
|
|
111
114
|
|
|
112
115
|
### Class-based API (More Control)
|
|
113
116
|
|