@dxos/client-services 0.1.53-main.d1a4933 → 0.1.53-main.d824199
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/browser/{chunk-EYXOVYW5.mjs → chunk-3EI4PM2V.mjs} +10 -9
- package/dist/lib/browser/chunk-3EI4PM2V.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +1 -1
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/packlets/testing/index.mjs +1 -1
- package/dist/lib/node/index.cjs +9 -8
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/packlets/testing/index.cjs +9 -8
- package/dist/lib/node/packlets/testing/index.cjs.map +3 -3
- package/dist/types/src/packlets/identity/authenticator.d.ts.map +1 -1
- package/package.json +32 -32
- package/src/packlets/identity/authenticator.ts +4 -2
- package/src/packlets/spaces/data-space-manager.test.ts +3 -1
- package/src/packlets/spaces/spaces-service.test.ts +5 -3
- package/dist/lib/browser/chunk-EYXOVYW5.mjs.map +0 -7
|
@@ -353,6 +353,7 @@ import { verifyCredential } from "@dxos/credentials";
|
|
|
353
353
|
import { log } from "@dxos/log";
|
|
354
354
|
import { schema } from "@dxos/protocols";
|
|
355
355
|
var __dxlog_file = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/identity/authenticator.ts";
|
|
356
|
+
var Credential = schema.getCodecForType("dxos.halo.credentials.Credential");
|
|
356
357
|
var createAuthProvider = (signer) => async (nonce) => {
|
|
357
358
|
const credential = await signer.createCredential({
|
|
358
359
|
assertion: {
|
|
@@ -361,7 +362,7 @@ var createAuthProvider = (signer) => async (nonce) => {
|
|
|
361
362
|
subject: signer.getIssuer(),
|
|
362
363
|
nonce
|
|
363
364
|
});
|
|
364
|
-
return
|
|
365
|
+
return Credential.encode(credential);
|
|
365
366
|
};
|
|
366
367
|
var TrustedKeySetAuthVerifier = class {
|
|
367
368
|
// prettier-ignore
|
|
@@ -374,12 +375,12 @@ var TrustedKeySetAuthVerifier = class {
|
|
|
374
375
|
}
|
|
375
376
|
get verifier() {
|
|
376
377
|
return async (nonce, auth) => {
|
|
377
|
-
const credential =
|
|
378
|
+
const credential = Credential.decode(auth);
|
|
378
379
|
log("authenticating...", {
|
|
379
380
|
credential
|
|
380
381
|
}, {
|
|
381
382
|
F: __dxlog_file,
|
|
382
|
-
L:
|
|
383
|
+
L: 59,
|
|
383
384
|
S: this,
|
|
384
385
|
C: (f, a) => f(...a)
|
|
385
386
|
});
|
|
@@ -389,7 +390,7 @@ var TrustedKeySetAuthVerifier = class {
|
|
|
389
390
|
result
|
|
390
391
|
}, {
|
|
391
392
|
F: __dxlog_file,
|
|
392
|
-
L:
|
|
393
|
+
L: 63,
|
|
393
394
|
S: this,
|
|
394
395
|
C: (f, a) => f(...a)
|
|
395
396
|
});
|
|
@@ -401,7 +402,7 @@ var TrustedKeySetAuthVerifier = class {
|
|
|
401
402
|
credential
|
|
402
403
|
}, {
|
|
403
404
|
F: __dxlog_file,
|
|
404
|
-
L:
|
|
405
|
+
L: 68,
|
|
405
406
|
S: this,
|
|
406
407
|
C: (f, a) => f(...a)
|
|
407
408
|
});
|
|
@@ -412,7 +413,7 @@ var TrustedKeySetAuthVerifier = class {
|
|
|
412
413
|
key: credential.issuer
|
|
413
414
|
}, {
|
|
414
415
|
F: __dxlog_file,
|
|
415
|
-
L:
|
|
416
|
+
L: 73,
|
|
416
417
|
S: this,
|
|
417
418
|
C: (f, a) => f(...a)
|
|
418
419
|
});
|
|
@@ -428,7 +429,7 @@ var TrustedKeySetAuthVerifier = class {
|
|
|
428
429
|
key: credential.issuer
|
|
429
430
|
}, {
|
|
430
431
|
F: __dxlog_file,
|
|
431
|
-
L:
|
|
432
|
+
L: 84,
|
|
432
433
|
S: this,
|
|
433
434
|
C: (f, a) => f(...a)
|
|
434
435
|
});
|
|
@@ -438,7 +439,7 @@ var TrustedKeySetAuthVerifier = class {
|
|
|
438
439
|
key: credential.issuer
|
|
439
440
|
}, {
|
|
440
441
|
F: __dxlog_file,
|
|
441
|
-
L:
|
|
442
|
+
L: 87,
|
|
442
443
|
S: this,
|
|
443
444
|
C: (f, a) => f(...a)
|
|
444
445
|
});
|
|
@@ -4111,4 +4112,4 @@ export {
|
|
|
4111
4112
|
createDefaultModelFactory,
|
|
4112
4113
|
ClientServicesHost
|
|
4113
4114
|
};
|
|
4114
|
-
//# sourceMappingURL=chunk-
|
|
4115
|
+
//# sourceMappingURL=chunk-3EI4PM2V.mjs.map
|