@enbox/agent 0.3.0 → 0.4.0
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/browser.mjs +12 -30
- package/dist/browser.mjs.map +4 -4
- package/dist/esm/connect.js +22 -30
- package/dist/esm/connect.js.map +1 -1
- package/dist/esm/dwn-api.js +149 -22
- package/dist/esm/dwn-api.js.map +1 -1
- package/dist/esm/dwn-discovery-file.js +1 -1
- package/dist/esm/dwn-discovery-payload.js +20 -21
- package/dist/esm/dwn-discovery-payload.js.map +1 -1
- package/dist/esm/dwn-key-delivery.js.map +1 -1
- package/dist/esm/{oidc.js → enbox-connect-protocol.js} +236 -248
- package/dist/esm/enbox-connect-protocol.js.map +1 -0
- package/dist/esm/enbox-user-agent.js +18 -5
- package/dist/esm/enbox-user-agent.js.map +1 -1
- package/dist/esm/index.js +4 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/local-dwn.js +21 -51
- package/dist/esm/local-dwn.js.map +1 -1
- package/dist/esm/permissions-api.js.map +1 -1
- package/dist/esm/store-data.js.map +1 -1
- package/dist/esm/sync-engine-level.js +1 -1
- package/dist/esm/sync-engine-level.js.map +1 -1
- package/dist/esm/sync-messages.js +1 -1
- package/dist/esm/sync-messages.js.map +1 -1
- package/dist/types/connect.d.ts +15 -19
- package/dist/types/connect.d.ts.map +1 -1
- package/dist/types/dwn-api.d.ts +46 -6
- package/dist/types/dwn-api.d.ts.map +1 -1
- package/dist/types/dwn-discovery-file.d.ts +1 -1
- package/dist/types/dwn-discovery-payload.d.ts +18 -19
- package/dist/types/dwn-discovery-payload.d.ts.map +1 -1
- package/dist/types/enbox-connect-protocol.d.ts +220 -0
- package/dist/types/enbox-connect-protocol.d.ts.map +1 -0
- package/dist/types/enbox-user-agent.d.ts +10 -1
- package/dist/types/enbox-user-agent.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/local-dwn.d.ts +16 -32
- package/dist/types/local-dwn.d.ts.map +1 -1
- package/package.json +9 -11
- package/src/connect.ts +40 -54
- package/src/dwn-api.ts +175 -29
- package/src/dwn-discovery-file.ts +1 -1
- package/src/dwn-discovery-payload.ts +23 -24
- package/src/dwn-key-delivery.ts +1 -1
- package/src/enbox-connect-protocol.ts +778 -0
- package/src/enbox-user-agent.ts +27 -4
- package/src/index.ts +4 -2
- package/src/local-dwn.ts +22 -53
- package/src/permissions-api.ts +3 -3
- package/src/store-data.ts +1 -1
- package/src/sync-engine-level.ts +1 -1
- package/src/sync-messages.ts +1 -1
- package/dist/esm/oidc.js.map +0 -1
- package/dist/types/oidc.d.ts +0 -250
- package/dist/types/oidc.d.ts.map +0 -1
- package/src/oidc.ts +0 -864
package/src/enbox-user-agent.ts
CHANGED
|
@@ -90,6 +90,16 @@ export type AgentParams<TKeyManager extends AgentKeyManager = LocalKeyManager> =
|
|
|
90
90
|
|
|
91
91
|
export type CreateUserAgentParams = Partial<AgentParams> & {
|
|
92
92
|
localDwnStrategy?: LocalDwnStrategy;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* When set, the agent operates in "remote mode": no in-process DWN is
|
|
96
|
+
* created. All `processRequest()` calls are routed through RPC to
|
|
97
|
+
* this endpoint instead.
|
|
98
|
+
*
|
|
99
|
+
* Typically set by `AuthManager.create()` after standalone discovery
|
|
100
|
+
* determines that a local DWN server is running.
|
|
101
|
+
*/
|
|
102
|
+
localDwnEndpoint?: string;
|
|
93
103
|
};
|
|
94
104
|
|
|
95
105
|
export class EnboxUserAgent<TKeyManager extends AgentKeyManager = LocalKeyManager> implements EnboxPlatformAgent<TKeyManager> {
|
|
@@ -146,6 +156,7 @@ export class EnboxUserAgent<TKeyManager extends AgentKeyManager = LocalKeyManage
|
|
|
146
156
|
public static async create({
|
|
147
157
|
dataPath = 'DATA/AGENT',
|
|
148
158
|
localDwnStrategy,
|
|
159
|
+
localDwnEndpoint,
|
|
149
160
|
agentDid, agentVault, cryptoApi, didApi, dwnApi, identityApi, keyManager, permissionsApi, rpcClient, syncApi
|
|
150
161
|
}: CreateUserAgentParams = {}
|
|
151
162
|
): Promise<EnboxUserAgent> {
|
|
@@ -163,10 +174,22 @@ export class EnboxUserAgent<TKeyManager extends AgentKeyManager = LocalKeyManage
|
|
|
163
174
|
store : new DwnDidStore()
|
|
164
175
|
});
|
|
165
176
|
|
|
166
|
-
dwnApi
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
177
|
+
if (!dwnApi) {
|
|
178
|
+
if (localDwnEndpoint) {
|
|
179
|
+
// Remote mode: no in-process DWN. All operations route through
|
|
180
|
+
// RPC to the local DWN server.
|
|
181
|
+
dwnApi = new AgentDwnApi({
|
|
182
|
+
localDwnEndpoint,
|
|
183
|
+
localDwnStrategy: localDwnStrategy ?? 'prefer',
|
|
184
|
+
});
|
|
185
|
+
} else {
|
|
186
|
+
// Local mode: create an in-process DWN with LevelDB stores.
|
|
187
|
+
dwnApi = new AgentDwnApi({
|
|
188
|
+
dwn : await AgentDwnApi.createDwn({ dataPath, didResolver: didApi }),
|
|
189
|
+
localDwnStrategy : localDwnStrategy ?? 'prefer',
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
}
|
|
170
193
|
if (localDwnStrategy) {
|
|
171
194
|
dwnApi.setLocalDwnStrategy(localDwnStrategy);
|
|
172
195
|
}
|
package/src/index.ts
CHANGED
|
@@ -17,7 +17,9 @@ export * from './dwn-discovery-file.js';
|
|
|
17
17
|
export * from './dwn-discovery-payload.js';
|
|
18
18
|
export * from './dwn-encryption.js';
|
|
19
19
|
export * from './dwn-key-delivery.js';
|
|
20
|
-
|
|
20
|
+
// NOTE: dwn-record-upgrade.js is intentionally NOT exported — the module
|
|
21
|
+
// is disabled (see TODO in dwn-api.ts postWriteKeyDelivery). Keeping the
|
|
22
|
+
// source file for reference until the redesign in a future PR.
|
|
21
23
|
export * from './dwn-type-guards.js';
|
|
22
24
|
export * from './protocol-utils.js';
|
|
23
25
|
export * from './hd-identity-vault.js';
|
|
@@ -34,5 +36,5 @@ export * from './sync-engine-level.js';
|
|
|
34
36
|
export * from './test-harness.js';
|
|
35
37
|
export * from './utils.js';
|
|
36
38
|
export * from './connect.js';
|
|
37
|
-
export * from './
|
|
39
|
+
export * from './enbox-connect-protocol.js';
|
|
38
40
|
export * from './enbox-user-agent.js';
|
package/src/local-dwn.ts
CHANGED
|
@@ -7,10 +7,11 @@
|
|
|
7
7
|
* 2. **Discovery file** (`~/.enbox/dwn.json`) — written by `electrobun-dwn`
|
|
8
8
|
* on startup. Fast filesystem read, no network. Available for CLI and
|
|
9
9
|
* native apps; skipped in browsers.
|
|
10
|
-
* 3. **
|
|
11
|
-
*
|
|
10
|
+
* 3. **Injected endpoint** — in browsers, the `dwn://connect` redirect
|
|
11
|
+
* flow delivers the endpoint, which is injected via
|
|
12
|
+
* {@link LocalDwnDiscovery.setCachedEndpoint | setCachedEndpoint()}.
|
|
12
13
|
*
|
|
13
|
-
* @see https://github.com/enboxorg/enbox/issues/
|
|
14
|
+
* @see https://github.com/enboxorg/enbox/issues/677
|
|
14
15
|
* @module
|
|
15
16
|
*/
|
|
16
17
|
|
|
@@ -18,31 +19,11 @@ import type { EnboxRpc } from '@enbox/dwn-clients';
|
|
|
18
19
|
|
|
19
20
|
import type { DwnDiscoveryFile } from './dwn-discovery-file.js';
|
|
20
21
|
|
|
21
|
-
/**
|
|
22
|
-
* Well-known ports the local DWN desktop app may bind to.
|
|
23
|
-
*
|
|
24
|
-
* Per the DWN Transport Spec, clients probe ports `55500` through `55509`
|
|
25
|
-
* (inclusive). Port `3000` is included as a development convenience.
|
|
26
|
-
*
|
|
27
|
-
* @see https://identity.foundation/dwn-transport/#port-probing
|
|
28
|
-
*/
|
|
29
|
-
export const localDwnPortCandidates = [3000, 55500, 55501, 55502, 55503, 55504, 55505, 55506, 55507, 55508, 55509] as const;
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Hosts probed when discovering a local DWN server.
|
|
33
|
-
*
|
|
34
|
-
* Per the DWN Transport Spec, clients MUST use `127.0.0.1` rather than
|
|
35
|
-
* `localhost` to avoid DNS resolution ambiguity.
|
|
36
|
-
*
|
|
37
|
-
* @see https://identity.foundation/dwn-transport/#port-probing
|
|
38
|
-
*/
|
|
39
|
-
export const localDwnHostCandidates = ['127.0.0.1'] as const;
|
|
40
|
-
|
|
41
22
|
/**
|
|
42
23
|
* Controls how the agent discovers and routes to a local DWN server.
|
|
43
24
|
*
|
|
44
25
|
* - `'off'` — (default) skip local discovery entirely.
|
|
45
|
-
* - `'prefer'` —
|
|
26
|
+
* - `'prefer'` — try local DWN first; fall back to DID-document endpoints.
|
|
46
27
|
* - `'only'` — require a local server; throw if none is found.
|
|
47
28
|
*/
|
|
48
29
|
export type LocalDwnStrategy = 'prefer' | 'only' | 'off';
|
|
@@ -61,7 +42,7 @@ export function normalizeBaseUrl(url: string): string {
|
|
|
61
42
|
* Results are cached for {@link _cacheTtlMs} milliseconds (default 10 s) to
|
|
62
43
|
* avoid repeated I/O on hot paths such as sync.
|
|
63
44
|
*
|
|
64
|
-
* @example Discovery with file-based channel
|
|
45
|
+
* @example Discovery with file-based channel (CLI / native)
|
|
65
46
|
* ```ts
|
|
66
47
|
* import { DwnDiscoveryFile } from './dwn-discovery-file.js';
|
|
67
48
|
*
|
|
@@ -70,7 +51,7 @@ export function normalizeBaseUrl(url: string): string {
|
|
|
70
51
|
* const endpoint = await discovery.getEndpoint();
|
|
71
52
|
* ```
|
|
72
53
|
*
|
|
73
|
-
* @example Browser: inject cached endpoint from `dwn://
|
|
54
|
+
* @example Browser: inject cached endpoint from `dwn://connect` redirect
|
|
74
55
|
* ```ts
|
|
75
56
|
* const discovery = new LocalDwnDiscovery(rpcClient);
|
|
76
57
|
* discovery.setCachedEndpoint('http://127.0.0.1:55557');
|
|
@@ -95,7 +76,14 @@ export class LocalDwnDiscovery {
|
|
|
95
76
|
* 2. `~/.enbox/dwn.json` discovery file (if a {@link DwnDiscoveryFile}
|
|
96
77
|
* was provided). The endpoint from the file is validated via
|
|
97
78
|
* `GET /info` to ensure the server is still running.
|
|
98
|
-
*
|
|
79
|
+
*
|
|
80
|
+
* If neither channel finds an endpoint, the result (`undefined`) is
|
|
81
|
+
* cached to avoid repeated discovery file reads on hot paths.
|
|
82
|
+
*
|
|
83
|
+
* In browser environments (where no discovery file is available), the
|
|
84
|
+
* endpoint must be injected externally via
|
|
85
|
+
* {@link setCachedEndpoint | setCachedEndpoint()} — typically after a
|
|
86
|
+
* `dwn://connect` redirect delivers the endpoint in the URL fragment.
|
|
99
87
|
*/
|
|
100
88
|
public async getEndpoint(): Promise<string | undefined> {
|
|
101
89
|
const now = Date.now();
|
|
@@ -103,22 +91,21 @@ export class LocalDwnDiscovery {
|
|
|
103
91
|
return this._cachedEndpoint;
|
|
104
92
|
}
|
|
105
93
|
|
|
106
|
-
//
|
|
94
|
+
// File-based discovery (CLI / native — skipped when no file is configured).
|
|
107
95
|
const fileEndpoint = await this._tryDiscoveryFile();
|
|
108
96
|
if (fileEndpoint !== undefined) {
|
|
109
97
|
this._setCacheEntry(fileEndpoint, now);
|
|
110
98
|
return fileEndpoint;
|
|
111
99
|
}
|
|
112
100
|
|
|
113
|
-
//
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
return probeEndpoint;
|
|
101
|
+
// No endpoint found. Cache the negative result to avoid repeated
|
|
102
|
+
// discovery file reads within the TTL window.
|
|
103
|
+
this._setCacheEntry(undefined, now);
|
|
104
|
+
return undefined;
|
|
118
105
|
}
|
|
119
106
|
|
|
120
107
|
/**
|
|
121
|
-
* Inject a cached endpoint (e.g. from a `dwn://
|
|
108
|
+
* Inject a cached endpoint (e.g. from a `dwn://connect` browser redirect
|
|
122
109
|
* or from `localStorage`). The endpoint is validated via `GET /info` before
|
|
123
110
|
* caching.
|
|
124
111
|
*
|
|
@@ -142,7 +129,7 @@ export class LocalDwnDiscovery {
|
|
|
142
129
|
this._cacheExpiry = 0;
|
|
143
130
|
}
|
|
144
131
|
|
|
145
|
-
// ─── Private
|
|
132
|
+
// ─── Private ──────────────────────────────────────────────────
|
|
146
133
|
|
|
147
134
|
/**
|
|
148
135
|
* Try the `~/.enbox/dwn.json` discovery file. Returns the endpoint if
|
|
@@ -168,24 +155,6 @@ export class LocalDwnDiscovery {
|
|
|
168
155
|
}
|
|
169
156
|
}
|
|
170
157
|
|
|
171
|
-
/**
|
|
172
|
-
* Sequential HTTP probe on well-known localhost port candidates.
|
|
173
|
-
* Returns the first endpoint whose `GET /info` response identifies
|
|
174
|
-
* as `@enbox/dwn-server`, or `undefined` if none is found.
|
|
175
|
-
*/
|
|
176
|
-
private async _probePortCandidates(): Promise<string | undefined> {
|
|
177
|
-
for (const port of localDwnPortCandidates) {
|
|
178
|
-
for (const host of localDwnHostCandidates) {
|
|
179
|
-
const endpoint = `http://${host}:${port}`;
|
|
180
|
-
const valid = await this._validateEndpoint(endpoint);
|
|
181
|
-
if (valid) {
|
|
182
|
-
return normalizeBaseUrl(endpoint);
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
return undefined;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
158
|
/**
|
|
190
159
|
* Call `GET /info` on the endpoint and check that
|
|
191
160
|
* `serverInfo.server === '@enbox/dwn-server'`.
|
package/src/permissions-api.ts
CHANGED
|
@@ -263,7 +263,7 @@ export class AgentPermissionsApi implements PermissionsApi {
|
|
|
263
263
|
target : author,
|
|
264
264
|
messageType : DwnInterface.RecordsWrite,
|
|
265
265
|
messageParams,
|
|
266
|
-
dataStream : new Blob([ permissionsGrantBytes ])
|
|
266
|
+
dataStream : new Blob([ permissionsGrantBytes as BlobPart ])
|
|
267
267
|
});
|
|
268
268
|
|
|
269
269
|
if (reply.status.code !== 202) {
|
|
@@ -309,7 +309,7 @@ export class AgentPermissionsApi implements PermissionsApi {
|
|
|
309
309
|
target : author,
|
|
310
310
|
messageType : DwnInterface.RecordsWrite,
|
|
311
311
|
messageParams,
|
|
312
|
-
dataStream : new Blob([ permissionRequestBytes ])
|
|
312
|
+
dataStream : new Blob([ permissionRequestBytes as BlobPart ])
|
|
313
313
|
});
|
|
314
314
|
|
|
315
315
|
if (reply.status.code !== 202) {
|
|
@@ -352,7 +352,7 @@ export class AgentPermissionsApi implements PermissionsApi {
|
|
|
352
352
|
target : author,
|
|
353
353
|
messageType : DwnInterface.RecordsWrite,
|
|
354
354
|
messageParams,
|
|
355
|
-
dataStream : new Blob([ permissionRevocationBytes ])
|
|
355
|
+
dataStream : new Blob([ permissionRevocationBytes as BlobPart ])
|
|
356
356
|
});
|
|
357
357
|
|
|
358
358
|
if (reply.status.code !== 202) {
|
package/src/store-data.ts
CHANGED
|
@@ -194,7 +194,7 @@ export class DwnDataStore<TStoreObject extends Record<string, any> = Jwk> implem
|
|
|
194
194
|
target : tenantDid,
|
|
195
195
|
messageType : DwnInterface.RecordsWrite,
|
|
196
196
|
messageParams : { ...this._recordProperties, ...messageParams },
|
|
197
|
-
dataStream : new Blob([dataBytes], { type: 'application/json' }),
|
|
197
|
+
dataStream : new Blob([dataBytes as BlobPart], { type: 'application/json' }),
|
|
198
198
|
...(encryptionActive ? { encryption: true } : {}),
|
|
199
199
|
});
|
|
200
200
|
|
package/src/sync-engine-level.ts
CHANGED
|
@@ -521,7 +521,7 @@ export class SyncEngineLevel implements SyncEngine {
|
|
|
521
521
|
try {
|
|
522
522
|
// Process the message locally.
|
|
523
523
|
const dataStream = this.extractDataStream(event);
|
|
524
|
-
await this.agent.dwn.
|
|
524
|
+
await this.agent.dwn.processRawMessage(did, event.message, { dataStream });
|
|
525
525
|
} catch (error: any) {
|
|
526
526
|
console.error(`SyncEngineLevel: Error processing live-pull event for ${did}`, error);
|
|
527
527
|
}
|
package/src/sync-messages.ts
CHANGED
|
@@ -75,7 +75,7 @@ export async function pullMessages({ did, dwnUrl, delegateDid, protocol, message
|
|
|
75
75
|
const failedCids: string[] = [];
|
|
76
76
|
|
|
77
77
|
for (const entry of pending) {
|
|
78
|
-
const pullReply = await agent.dwn.
|
|
78
|
+
const pullReply = await agent.dwn.processRawMessage(did, entry.message, { dataStream: entry.dataStream });
|
|
79
79
|
if (!syncMessageReplyIsSuccessful(pullReply)) {
|
|
80
80
|
const cid = await getMessageCid(entry.message);
|
|
81
81
|
failedCids.push(cid);
|
package/dist/esm/oidc.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"oidc.js","sourceRoot":"","sources":["../../src/oidc.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AASA,OAAO,EAAkB,MAAM,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EACL,WAAW,EACX,OAAO,EACP,cAAc,EACd,IAAI,EACJ,MAAM,EACN,MAAM,EACN,iBAAiB,GAClB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAkKvD;;;;;;;;;GASG;AACH,SAAS,YAAY,CAAC,EACpB,OAAO,EACP,QAAQ,EACR,SAAS,EACT,UAAU,GAMX;IACC,QAAQ,QAAQ,EAAE,CAAC;QACjB,6FAA6F;QAC7F,KAAK,4BAA4B;YAC/B,OAAO,cAAc,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QACxC,uDAAuD;QACvD,KAAK,WAAW;YACd,IAAI,CAAC,SAAS,EACd,CAAC;gBAAA,MAAM,IAAI,KAAK,CACd,uDAAuD,CACxD,CAAC;YAAA,CAAC;YACH,OAAO,cAAc,CAAC,OAAO,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AAc,EAAE,mCAAmC;aACpD;YACD,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,KAAM,CAAC;SACpC,CAAC,CAAC;IACL,CAAC;CAAA;AAED,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB,iBAAiB;IACjB,kBAAkB;IAClB,cAAc;IACd,kBAAkB;IAClB,sBAAsB;IACtB,oBAAoB;IACpB,mBAAmB;IACnB,mBAAmB;IACnB,eAAe;IACf,OAAO;IACP,SAAS;IACT,YAAY;IACZ,qBAAqB;IACrB,kBAAkB;CACnB,CAAC"}
|
package/dist/types/oidc.d.ts
DELETED
|
@@ -1,250 +0,0 @@
|
|
|
1
|
-
import type { ConnectPermissionRequest } from './connect.js';
|
|
2
|
-
import type { EnboxAgent } from './types/agent.js';
|
|
3
|
-
import type { RequireOnly } from '@enbox/common';
|
|
4
|
-
import type { DidDocument, PortableDid } from '@enbox/dids';
|
|
5
|
-
import type { DwnDataEncodedRecordsWriteMessage, DwnPermissionScope } from './types/dwn.js';
|
|
6
|
-
import { type BearerDid } from '@enbox/dids';
|
|
7
|
-
/**
|
|
8
|
-
* Sent to an OIDC server to authorize a client. Allows clients
|
|
9
|
-
* to securely send authorization request parameters directly to
|
|
10
|
-
* the server via POST. This avoids exposing sensitive data in URLs
|
|
11
|
-
* and ensures the server validates the request before user interaction.
|
|
12
|
-
*
|
|
13
|
-
* @see {@link https://www.rfc-editor.org/rfc/rfc9126.html | OAuth 2.0 Pushed Authorization Requests}
|
|
14
|
-
*/
|
|
15
|
-
export type PushedAuthRequest = {
|
|
16
|
-
/** The JWT which contains the {@link EnboxConnectAuthRequest} */
|
|
17
|
-
request: string;
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
* Sent back by OIDC server in response to {@link PushedAuthRequest}
|
|
21
|
-
* The server generates a TTL and a unique request_uri. The request_uri can be shared
|
|
22
|
-
* with the Provider using a link or a QR code along with additional params
|
|
23
|
-
* to access the url and decrypt the payload.
|
|
24
|
-
*/
|
|
25
|
-
export type PushedAuthResponse = {
|
|
26
|
-
request_uri: string;
|
|
27
|
-
expires_in: number;
|
|
28
|
-
};
|
|
29
|
-
/**
|
|
30
|
-
* Used in decentralized apps. The SIOPv2 Auth Request is created by a client relying party (RP)
|
|
31
|
-
* often a web service or an app who wants to obtain information from a provider
|
|
32
|
-
* The contents of this are inserted into a JWT inside of the {@link PushedAuthRequest}.
|
|
33
|
-
* @see {@link https://github.com/enboxorg/enbox | Enbox OIDC Documentation for SIOPv2 }
|
|
34
|
-
*/
|
|
35
|
-
export type SIOPv2AuthRequest = {
|
|
36
|
-
/** The DID of the client (RP) */
|
|
37
|
-
client_id: string;
|
|
38
|
-
/** The scope of the access request (e.g., `openid profile`). */
|
|
39
|
-
scope: string;
|
|
40
|
-
/** The type of response desired (e.g. `id_token`) */
|
|
41
|
-
response_type: string;
|
|
42
|
-
/** the URL to which the Identity Provider will post the Authorization Response */
|
|
43
|
-
redirect_uri: string;
|
|
44
|
-
/** The URI to which the SIOPv2 Authorization Response will be sent (Tim's note: not used with encrypted request JWT)*/
|
|
45
|
-
response_uri?: string;
|
|
46
|
-
/**
|
|
47
|
-
* An opaque value used to maintain state between the request and the callback.
|
|
48
|
-
* Recommended for security to prevent CSRF attacks.
|
|
49
|
-
*/
|
|
50
|
-
state: string;
|
|
51
|
-
/**
|
|
52
|
-
* A string value used to associate a client session with an ID token to mitigate replay attacks.
|
|
53
|
-
* Recommended when requesting ID tokens.
|
|
54
|
-
*/
|
|
55
|
-
nonce: string;
|
|
56
|
-
/**
|
|
57
|
-
* The PKCE code challenge.
|
|
58
|
-
* Required if `code_challenge_method` is used. Enhances security for public clients (e.g., single-page apps,
|
|
59
|
-
* mobile apps) by requiring an additional verification step during token exchange.
|
|
60
|
-
*/
|
|
61
|
-
code_challenge?: string;
|
|
62
|
-
/** The method used for the PKCE challenge (typically `S256`). Must be present if `code_challenge` is included. */
|
|
63
|
-
code_challenge_method?: 'S256';
|
|
64
|
-
/**
|
|
65
|
-
* An ID token previously issued to the client, passed as a hint about the end-user’s current or past authenticated
|
|
66
|
-
* session with the client. Can streamline user experience if already logged in.
|
|
67
|
-
*/
|
|
68
|
-
id_token_hint?: string;
|
|
69
|
-
/** A hint to the authorization server about the login identifier the user might use. Useful for pre-filling login information. */
|
|
70
|
-
login_hint?: string;
|
|
71
|
-
/** Requested Authentication Context Class Reference values. Specifies the authentication context requirements. */
|
|
72
|
-
acr_values?: string;
|
|
73
|
-
/** When using a PAR for secure cross device flows we use a "form_post" rather than a "direct_post" */
|
|
74
|
-
response_mode: 'direct_post';
|
|
75
|
-
/** Used by PFI to request VCs as input to IDV process. If present, `response_type: "vp_token""` MUST also be present */
|
|
76
|
-
presentation_definition?: any;
|
|
77
|
-
/** A JSON object containing the Verifier metadata values (Tim's note: from TBD KCC Repo) */
|
|
78
|
-
client_metadata?: {
|
|
79
|
-
/** Array of strings, each a DID method supported for the subject of ID Token */
|
|
80
|
-
subject_syntax_types_supported: string[];
|
|
81
|
-
/** Human-readable string name of the client to be presented to the end-user during authorization */
|
|
82
|
-
client_name?: string;
|
|
83
|
-
/** URI of a web page providing information about the client */
|
|
84
|
-
client_uri?: string;
|
|
85
|
-
/** URI of an image logo for the client */
|
|
86
|
-
logo_uri?: string;
|
|
87
|
-
/** Array of strings representing ways to contact people responsible for this client, typically email addresses */
|
|
88
|
-
contacts?: string[];
|
|
89
|
-
/** URI that points to a terms of service document for the client */
|
|
90
|
-
tos_uri?: string;
|
|
91
|
-
/** URI that points to a privacy policy document */
|
|
92
|
-
policy_uri?: string;
|
|
93
|
-
};
|
|
94
|
-
};
|
|
95
|
-
/**
|
|
96
|
-
* An auth request that is compatible with both Web5 Connect and (hopefully, WIP) OIDC SIOPv2
|
|
97
|
-
* The contents of this are inserted into a JWT inside of the {@link PushedAuthRequest}.
|
|
98
|
-
*/
|
|
99
|
-
export type EnboxConnectAuthRequest = {
|
|
100
|
-
/** The user friendly name of the client/app to be displayed when prompting end-user with permission requests. */
|
|
101
|
-
displayName: string;
|
|
102
|
-
/** PermissionGrants that are to be sent to the provider */
|
|
103
|
-
permissionRequests: ConnectPermissionRequest[];
|
|
104
|
-
} & SIOPv2AuthRequest;
|
|
105
|
-
/** The fields for an OIDC SIOPv2 Auth Repsonse */
|
|
106
|
-
export type SIOPv2AuthResponse = {
|
|
107
|
-
/** Issuer MUST match the value of sub (Applicant's DID) */
|
|
108
|
-
iss: string;
|
|
109
|
-
/** Subject Identifier. A locally unique and never reassigned identifier
|
|
110
|
-
* within the Issuer for the End-User, which is intended to be consumed
|
|
111
|
-
* by the Client. */
|
|
112
|
-
sub: string;
|
|
113
|
-
/** Audience(s) that this ID Token is intended for. It MUST contain the
|
|
114
|
-
* OAuth 2.0 client_id of the Relying Party as an audience value. */
|
|
115
|
-
aud: string;
|
|
116
|
-
/** Time at which the JWT was issued. */
|
|
117
|
-
iat: number;
|
|
118
|
-
/** Expiration time on or after which the ID Token MUST NOT be accepted
|
|
119
|
-
* for processing. */
|
|
120
|
-
exp: number;
|
|
121
|
-
/** Time when the End-User authentication occurred. */
|
|
122
|
-
auth_time?: number;
|
|
123
|
-
/** b64url encoded nonce used to associate a Client session with an ID Token, and to
|
|
124
|
-
* mitigate replay attacks. */
|
|
125
|
-
nonce?: string;
|
|
126
|
-
/** Custom claims. */
|
|
127
|
-
[key: string]: any;
|
|
128
|
-
};
|
|
129
|
-
/** An auth response that is compatible with both Web5 Connect and (hopefully, WIP) OIDC SIOPv2 */
|
|
130
|
-
export type EnboxConnectAuthResponse = {
|
|
131
|
-
delegateGrants: DwnDataEncodedRecordsWriteMessage[];
|
|
132
|
-
delegatePortableDid: PortableDid;
|
|
133
|
-
} & SIOPv2AuthResponse;
|
|
134
|
-
/** Represents the different OIDC endpoint types.
|
|
135
|
-
* 1. `pushedAuthorizationRequest`: client sends {@link PushedAuthRequest} receives {@link PushedAuthResponse}
|
|
136
|
-
* 2. `authorize`: provider gets the {@link EnboxConnectAuthRequest} JWT that was stored by the PAR
|
|
137
|
-
* 3. `callback`: provider sends {@link EnboxConnectAuthResponse} to this endpoint
|
|
138
|
-
* 4. `token`: client gets {@link EnboxConnectAuthResponse} from this endpoint
|
|
139
|
-
*/
|
|
140
|
-
type OidcEndpoint = 'pushedAuthorizationRequest' | 'authorize' | 'callback' | 'token';
|
|
141
|
-
/**
|
|
142
|
-
* Gets the correct OIDC endpoint out of the {@link OidcEndpoint} options provided.
|
|
143
|
-
* Handles a trailing slash on baseURL
|
|
144
|
-
*
|
|
145
|
-
* @param {Object} options the options object
|
|
146
|
-
* @param {string} options.baseURL for example `http://foo.com/connect/
|
|
147
|
-
* @param {OidcEndpoint} options.endpoint the OIDC endpoint desired
|
|
148
|
-
* @param {string} options.authParam this is the unique id which must be provided when getting the `authorize` endpoint
|
|
149
|
-
* @param {string} options.tokenParam this is the random state as b64url which must be provided with the `token` endpoint
|
|
150
|
-
*/
|
|
151
|
-
declare function buildOidcUrl({ baseURL, endpoint, authParam, tokenParam, }: {
|
|
152
|
-
baseURL: string;
|
|
153
|
-
endpoint: OidcEndpoint;
|
|
154
|
-
authParam?: string;
|
|
155
|
-
tokenParam?: string;
|
|
156
|
-
}): string;
|
|
157
|
-
/**
|
|
158
|
-
* Generates a cryptographically random "code challenge" in
|
|
159
|
-
* accordance with the RFC 7636 PKCE specification.
|
|
160
|
-
*
|
|
161
|
-
* @see {@link https://datatracker.ietf.org/doc/html/rfc7636#section-4.2 | RFC 7636 }
|
|
162
|
-
*/
|
|
163
|
-
declare function generateCodeChallenge(): Promise<{
|
|
164
|
-
codeChallengeBytes: Uint8Array;
|
|
165
|
-
codeChallengeBase64Url: string;
|
|
166
|
-
}>;
|
|
167
|
-
/** Client creates the {@link EnboxConnectAuthRequest} */
|
|
168
|
-
declare function createAuthRequest(options: RequireOnly<EnboxConnectAuthRequest, 'client_id' | 'scope' | 'redirect_uri' | 'permissionRequests' | 'displayName'>): Promise<EnboxConnectAuthRequest>;
|
|
169
|
-
/** Encrypts the auth request with the key which will be passed through QR code */
|
|
170
|
-
declare function encryptAuthRequest({ jwt, encryptionKey, }: {
|
|
171
|
-
jwt: string;
|
|
172
|
-
encryptionKey: Uint8Array;
|
|
173
|
-
}): Promise<string>;
|
|
174
|
-
/** Create a response object compatible with Web5 Connect and OIDC SIOPv2 */
|
|
175
|
-
declare function createResponseObject(options: RequireOnly<EnboxConnectAuthResponse, 'iss' | 'sub' | 'aud' | 'delegateGrants' | 'delegatePortableDid'>): Promise<EnboxConnectAuthResponse>;
|
|
176
|
-
/** sign an object and transform it into a jwt using a did */
|
|
177
|
-
declare function signJwt({ did, data, }: {
|
|
178
|
-
did: BearerDid;
|
|
179
|
-
data: Record<string, unknown>;
|
|
180
|
-
}): Promise<string>;
|
|
181
|
-
/** Take the decrypted JWT and verify it was signed by its public DID. Return parsed object. */
|
|
182
|
-
declare function verifyJwt({ jwt }: {
|
|
183
|
-
jwt: string;
|
|
184
|
-
}): Promise<Record<string, unknown>>;
|
|
185
|
-
/** Take the encrypted JWE, decrypt using the code challenge and return a JWT string which will need to be verified */
|
|
186
|
-
declare function decryptAuthRequest({ jwe, encryption_key, }: {
|
|
187
|
-
jwe: string;
|
|
188
|
-
encryption_key: string;
|
|
189
|
-
}): Promise<string>;
|
|
190
|
-
/**
|
|
191
|
-
* The client uses to decrypt the jwe obtained from the auth server which contains
|
|
192
|
-
* the {@link EnboxConnectAuthResponse} that was sent by the provider to the auth server.
|
|
193
|
-
*
|
|
194
|
-
* @async
|
|
195
|
-
* @param {BearerDid} clientDid - The did that was initially used by the client for ECDH at connect init.
|
|
196
|
-
* @param {string} jwe - The encrypted data as a jwe.
|
|
197
|
-
* @param {string} pin - The pin that was obtained from the user.
|
|
198
|
-
*/
|
|
199
|
-
declare function decryptAuthResponse(clientDid: BearerDid, jwe: string, pin: string): Promise<string>;
|
|
200
|
-
/** Derives a shared ECDH private key in order to encrypt the {@link EnboxConnectAuthResponse} */
|
|
201
|
-
declare function deriveSharedKey(privateKeyDid: BearerDid, publicKeyDid: DidDocument): Promise<Uint8Array>;
|
|
202
|
-
/**
|
|
203
|
-
* Encrypts the auth response jwt. Requires a randomPin is added to the AAD of the
|
|
204
|
-
* encryption algorithm in order to prevent man in the middle and eavesdropping attacks.
|
|
205
|
-
* The keyid of the delegate did is used to pass the public key to the client in order
|
|
206
|
-
* for the client to derive the shared ECDH private key.
|
|
207
|
-
*/
|
|
208
|
-
declare function encryptAuthResponse({ jwt, encryptionKey, delegateDidKeyId, randomPin, }: {
|
|
209
|
-
jwt: string;
|
|
210
|
-
encryptionKey: Uint8Array;
|
|
211
|
-
delegateDidKeyId: string;
|
|
212
|
-
randomPin: string;
|
|
213
|
-
}): Promise<string>;
|
|
214
|
-
/**
|
|
215
|
-
* Creates the permission grants that assign to the selectedDid the level of
|
|
216
|
-
* permissions that the web app requested in the {@link EnboxConnectAuthRequest}
|
|
217
|
-
*/
|
|
218
|
-
declare function createPermissionGrants(selectedDid: string, delegateBearerDid: BearerDid, agent: EnboxAgent, scopes: DwnPermissionScope[]): Promise<DwnDataEncodedRecordsWriteMessage[]>;
|
|
219
|
-
/**
|
|
220
|
-
* Creates a delegate did which the web app will use as its future indentity.
|
|
221
|
-
* Assigns to that DID the level of permissions that the web app requested in
|
|
222
|
-
* the {@link EnboxConnectAuthRequest}. Encrypts via ECDH key that the web app
|
|
223
|
-
* will have access to because the web app has the public key which it provided
|
|
224
|
-
* in the {@link EnboxConnectAuthRequest}. Then sends the ciphertext of this
|
|
225
|
-
* {@link EnboxConnectAuthResponse} to the callback endpoint. Which the
|
|
226
|
-
* web app will need to retrieve from the token endpoint and decrypt with the pin to access.
|
|
227
|
-
*/
|
|
228
|
-
declare function submitAuthResponse(selectedDid: string, authRequest: EnboxConnectAuthRequest, randomPin: string, agent: EnboxAgent): Promise<void>;
|
|
229
|
-
export declare const Oidc: {
|
|
230
|
-
createAuthRequest: typeof createAuthRequest;
|
|
231
|
-
encryptAuthRequest: typeof encryptAuthRequest;
|
|
232
|
-
getAuthRequest: (request_uri: string, encryption_key: string) => Promise<EnboxConnectAuthRequest>;
|
|
233
|
-
decryptAuthRequest: typeof decryptAuthRequest;
|
|
234
|
-
createPermissionGrants: typeof createPermissionGrants;
|
|
235
|
-
createResponseObject: typeof createResponseObject;
|
|
236
|
-
encryptAuthResponse: typeof encryptAuthResponse;
|
|
237
|
-
decryptAuthResponse: typeof decryptAuthResponse;
|
|
238
|
-
deriveSharedKey: typeof deriveSharedKey;
|
|
239
|
-
signJwt: typeof signJwt;
|
|
240
|
-
verifyJwt: typeof verifyJwt;
|
|
241
|
-
buildOidcUrl: typeof buildOidcUrl;
|
|
242
|
-
generateCodeChallenge: typeof generateCodeChallenge;
|
|
243
|
-
submitAuthResponse: typeof submitAuthResponse;
|
|
244
|
-
};
|
|
245
|
-
/** @deprecated Use {@link EnboxConnectAuthRequest} instead. */
|
|
246
|
-
export type Web5ConnectAuthRequest = EnboxConnectAuthRequest;
|
|
247
|
-
/** @deprecated Use {@link EnboxConnectAuthResponse} instead. */
|
|
248
|
-
export type Web5ConnectAuthResponse = EnboxConnectAuthResponse;
|
|
249
|
-
export {};
|
|
250
|
-
//# sourceMappingURL=oidc.d.ts.map
|
package/dist/types/oidc.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"oidc.d.ts","sourceRoot":"","sources":["../../src/oidc.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,KAAK,EAAE,iCAAiC,EAAE,kBAAkB,EAAyB,MAAM,gBAAgB,CAAC;AAKnH,OAAO,EAAE,KAAK,SAAS,EAAU,MAAM,aAAa,CAAC;AAkBrD;;;;;;;GAOG;AACH,MAAM,MAAM,iBAAiB,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