@structured-id/proto 0.6.0 → 0.7.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/CHANGELOG.md +7 -0
- package/dist/generated/sid/v1/authn/auth.d.ts +44 -0
- package/dist/generated/sid/v1/authn/auth.js +72 -3
- package/dist/generated/sid/v1/authn/auth.js.map +1 -1
- package/dist/generated/sid/v1/authn/issuer.d.ts +25 -19
- package/dist/generated/sid/v1/authn/issuer.js +24 -30
- package/dist/generated/sid/v1/authn/issuer.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.7.0](https://github.com/structured-id/sdk/compare/typescript-proto-v0.6.0...typescript-proto-v0.7.0) (2026-10-28)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **proto:** the second factor a sign-in owes ([#34](https://github.com/structured-id/sdk/issues/34)) ([4805514](https://github.com/structured-id/sdk/commit/480551474e62be3e2526ead6680c3cb2eec47fa1)), closes [#33](https://github.com/structured-id/sdk/issues/33)
|
|
9
|
+
|
|
3
10
|
## [0.6.0](https://github.com/structured-id/sdk/compare/typescript-proto-v0.5.0...typescript-proto-v0.6.0) (2026-10-25)
|
|
4
11
|
|
|
5
12
|
|
|
@@ -196,6 +196,26 @@ export interface OpaqueLoginFinishResponse {
|
|
|
196
196
|
* @generated from protobuf field: int64 expires_in = 3
|
|
197
197
|
*/
|
|
198
198
|
expiresIn: bigint;
|
|
199
|
+
/**
|
|
200
|
+
* Set by the server when the login requirements need a second factor
|
|
201
|
+
* beyond the one this ceremony proved and the account has one of these
|
|
202
|
+
* enrolled. The delivered credential is then a pending context: it
|
|
203
|
+
* authorizes only completing the sign-in with one of these methods
|
|
204
|
+
* (VerifyTotp for STEP_UP_METHOD_TOTP), which returns the session. Empty
|
|
205
|
+
* when the session is complete.
|
|
206
|
+
*
|
|
207
|
+
* @generated from protobuf field: repeated sid.v1.authn.StepUpMethod second_factors = 4
|
|
208
|
+
*/
|
|
209
|
+
secondFactors: StepUpMethod[];
|
|
210
|
+
/**
|
|
211
|
+
* The CSRF token a browser sends in `X-CSRF-Token` when it completes the
|
|
212
|
+
* pending context with its cookie; set only with `second_factors` on a
|
|
213
|
+
* browser delivery, in this response to the configured sign-in page's
|
|
214
|
+
* origin. It authenticates nothing by itself.
|
|
215
|
+
*
|
|
216
|
+
* @generated from protobuf field: optional string browser_csrf = 5
|
|
217
|
+
*/
|
|
218
|
+
browserCsrf?: string;
|
|
199
219
|
}
|
|
200
220
|
/**
|
|
201
221
|
* @generated from protobuf message sid.v1.authn.OpaqueZkppRegistrationStartRequest
|
|
@@ -557,6 +577,18 @@ export interface WebAuthnAuthenticationFinishResponse {
|
|
|
557
577
|
* @generated from protobuf field: int64 expires_in = 3
|
|
558
578
|
*/
|
|
559
579
|
expiresIn: bigint;
|
|
580
|
+
/**
|
|
581
|
+
* Same semantics as OpaqueLoginFinishResponse.second_factors.
|
|
582
|
+
*
|
|
583
|
+
* @generated from protobuf field: repeated sid.v1.authn.StepUpMethod second_factors = 4
|
|
584
|
+
*/
|
|
585
|
+
secondFactors: StepUpMethod[];
|
|
586
|
+
/**
|
|
587
|
+
* Same semantics as OpaqueLoginFinishResponse.browser_csrf.
|
|
588
|
+
*
|
|
589
|
+
* @generated from protobuf field: optional string browser_csrf = 5
|
|
590
|
+
*/
|
|
591
|
+
browserCsrf?: string;
|
|
560
592
|
}
|
|
561
593
|
/**
|
|
562
594
|
* @generated from protobuf message sid.v1.authn.OAuth2AuthorizeRequest
|
|
@@ -1515,6 +1547,18 @@ export interface LegacyMigrateFinishResponse {
|
|
|
1515
1547
|
* @generated from protobuf field: int64 expires_in = 3
|
|
1516
1548
|
*/
|
|
1517
1549
|
expiresIn: bigint;
|
|
1550
|
+
/**
|
|
1551
|
+
* Same semantics as OpaqueLoginFinishResponse.second_factors.
|
|
1552
|
+
*
|
|
1553
|
+
* @generated from protobuf field: repeated sid.v1.authn.StepUpMethod second_factors = 4
|
|
1554
|
+
*/
|
|
1555
|
+
secondFactors: StepUpMethod[];
|
|
1556
|
+
/**
|
|
1557
|
+
* Same semantics as OpaqueLoginFinishResponse.browser_csrf.
|
|
1558
|
+
*
|
|
1559
|
+
* @generated from protobuf field: optional string browser_csrf = 5
|
|
1560
|
+
*/
|
|
1561
|
+
browserCsrf?: string;
|
|
1518
1562
|
}
|
|
1519
1563
|
/**
|
|
1520
1564
|
* @generated from protobuf message sid.v1.authn.GetZkppPolicyRequest
|
|
@@ -502,13 +502,16 @@ class OpaqueLoginFinishResponse$Type extends MessageType {
|
|
|
502
502
|
constructor() {
|
|
503
503
|
super("sid.v1.authn.OpaqueLoginFinishResponse", [
|
|
504
504
|
{ no: 1, name: "session_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
505
|
-
{ no: 3, name: "expires_in", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ }
|
|
505
|
+
{ no: 3, name: "expires_in", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
|
|
506
|
+
{ no: 4, name: "second_factors", kind: "enum", repeat: 1 /*RepeatType.PACKED*/, T: () => ["sid.v1.authn.StepUpMethod", StepUpMethod, "STEP_UP_METHOD_"] },
|
|
507
|
+
{ no: 5, name: "browser_csrf", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }
|
|
506
508
|
]);
|
|
507
509
|
}
|
|
508
510
|
create(value) {
|
|
509
511
|
const message = globalThis.Object.create((this.messagePrototype));
|
|
510
512
|
message.sessionId = "";
|
|
511
513
|
message.expiresIn = 0n;
|
|
514
|
+
message.secondFactors = [];
|
|
512
515
|
if (value !== undefined)
|
|
513
516
|
reflectionMergePartial(this, message, value);
|
|
514
517
|
return message;
|
|
@@ -524,6 +527,16 @@ class OpaqueLoginFinishResponse$Type extends MessageType {
|
|
|
524
527
|
case /* int64 expires_in */ 3:
|
|
525
528
|
message.expiresIn = reader.int64().toBigInt();
|
|
526
529
|
break;
|
|
530
|
+
case /* repeated sid.v1.authn.StepUpMethod second_factors */ 4:
|
|
531
|
+
if (wireType === WireType.LengthDelimited)
|
|
532
|
+
for (let e = reader.int32() + reader.pos; reader.pos < e;)
|
|
533
|
+
message.secondFactors.push(reader.int32());
|
|
534
|
+
else
|
|
535
|
+
message.secondFactors.push(reader.int32());
|
|
536
|
+
break;
|
|
537
|
+
case /* optional string browser_csrf */ 5:
|
|
538
|
+
message.browserCsrf = reader.string();
|
|
539
|
+
break;
|
|
527
540
|
default:
|
|
528
541
|
let u = options.readUnknownField;
|
|
529
542
|
if (u === "throw")
|
|
@@ -542,6 +555,16 @@ class OpaqueLoginFinishResponse$Type extends MessageType {
|
|
|
542
555
|
/* int64 expires_in = 3; */
|
|
543
556
|
if (message.expiresIn !== 0n)
|
|
544
557
|
writer.tag(3, WireType.Varint).int64(message.expiresIn);
|
|
558
|
+
/* repeated sid.v1.authn.StepUpMethod second_factors = 4; */
|
|
559
|
+
if (message.secondFactors.length) {
|
|
560
|
+
writer.tag(4, WireType.LengthDelimited).fork();
|
|
561
|
+
for (let i = 0; i < message.secondFactors.length; i++)
|
|
562
|
+
writer.int32(message.secondFactors[i]);
|
|
563
|
+
writer.join();
|
|
564
|
+
}
|
|
565
|
+
/* optional string browser_csrf = 5; */
|
|
566
|
+
if (message.browserCsrf !== undefined)
|
|
567
|
+
writer.tag(5, WireType.LengthDelimited).string(message.browserCsrf);
|
|
545
568
|
let u = options.writeUnknownFields;
|
|
546
569
|
if (u !== false)
|
|
547
570
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -1455,13 +1478,16 @@ class WebAuthnAuthenticationFinishResponse$Type extends MessageType {
|
|
|
1455
1478
|
constructor() {
|
|
1456
1479
|
super("sid.v1.authn.WebAuthnAuthenticationFinishResponse", [
|
|
1457
1480
|
{ no: 1, name: "session_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1458
|
-
{ no: 3, name: "expires_in", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ }
|
|
1481
|
+
{ no: 3, name: "expires_in", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
|
|
1482
|
+
{ no: 4, name: "second_factors", kind: "enum", repeat: 1 /*RepeatType.PACKED*/, T: () => ["sid.v1.authn.StepUpMethod", StepUpMethod, "STEP_UP_METHOD_"] },
|
|
1483
|
+
{ no: 5, name: "browser_csrf", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }
|
|
1459
1484
|
]);
|
|
1460
1485
|
}
|
|
1461
1486
|
create(value) {
|
|
1462
1487
|
const message = globalThis.Object.create((this.messagePrototype));
|
|
1463
1488
|
message.sessionId = "";
|
|
1464
1489
|
message.expiresIn = 0n;
|
|
1490
|
+
message.secondFactors = [];
|
|
1465
1491
|
if (value !== undefined)
|
|
1466
1492
|
reflectionMergePartial(this, message, value);
|
|
1467
1493
|
return message;
|
|
@@ -1477,6 +1503,16 @@ class WebAuthnAuthenticationFinishResponse$Type extends MessageType {
|
|
|
1477
1503
|
case /* int64 expires_in */ 3:
|
|
1478
1504
|
message.expiresIn = reader.int64().toBigInt();
|
|
1479
1505
|
break;
|
|
1506
|
+
case /* repeated sid.v1.authn.StepUpMethod second_factors */ 4:
|
|
1507
|
+
if (wireType === WireType.LengthDelimited)
|
|
1508
|
+
for (let e = reader.int32() + reader.pos; reader.pos < e;)
|
|
1509
|
+
message.secondFactors.push(reader.int32());
|
|
1510
|
+
else
|
|
1511
|
+
message.secondFactors.push(reader.int32());
|
|
1512
|
+
break;
|
|
1513
|
+
case /* optional string browser_csrf */ 5:
|
|
1514
|
+
message.browserCsrf = reader.string();
|
|
1515
|
+
break;
|
|
1480
1516
|
default:
|
|
1481
1517
|
let u = options.readUnknownField;
|
|
1482
1518
|
if (u === "throw")
|
|
@@ -1495,6 +1531,16 @@ class WebAuthnAuthenticationFinishResponse$Type extends MessageType {
|
|
|
1495
1531
|
/* int64 expires_in = 3; */
|
|
1496
1532
|
if (message.expiresIn !== 0n)
|
|
1497
1533
|
writer.tag(3, WireType.Varint).int64(message.expiresIn);
|
|
1534
|
+
/* repeated sid.v1.authn.StepUpMethod second_factors = 4; */
|
|
1535
|
+
if (message.secondFactors.length) {
|
|
1536
|
+
writer.tag(4, WireType.LengthDelimited).fork();
|
|
1537
|
+
for (let i = 0; i < message.secondFactors.length; i++)
|
|
1538
|
+
writer.int32(message.secondFactors[i]);
|
|
1539
|
+
writer.join();
|
|
1540
|
+
}
|
|
1541
|
+
/* optional string browser_csrf = 5; */
|
|
1542
|
+
if (message.browserCsrf !== undefined)
|
|
1543
|
+
writer.tag(5, WireType.LengthDelimited).string(message.browserCsrf);
|
|
1498
1544
|
let u = options.writeUnknownFields;
|
|
1499
1545
|
if (u !== false)
|
|
1500
1546
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -3296,13 +3342,16 @@ class LegacyMigrateFinishResponse$Type extends MessageType {
|
|
|
3296
3342
|
constructor() {
|
|
3297
3343
|
super("sid.v1.authn.LegacyMigrateFinishResponse", [
|
|
3298
3344
|
{ no: 1, name: "session_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
3299
|
-
{ no: 3, name: "expires_in", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ }
|
|
3345
|
+
{ no: 3, name: "expires_in", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
|
|
3346
|
+
{ no: 4, name: "second_factors", kind: "enum", repeat: 1 /*RepeatType.PACKED*/, T: () => ["sid.v1.authn.StepUpMethod", StepUpMethod, "STEP_UP_METHOD_"] },
|
|
3347
|
+
{ no: 5, name: "browser_csrf", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }
|
|
3300
3348
|
]);
|
|
3301
3349
|
}
|
|
3302
3350
|
create(value) {
|
|
3303
3351
|
const message = globalThis.Object.create((this.messagePrototype));
|
|
3304
3352
|
message.sessionId = "";
|
|
3305
3353
|
message.expiresIn = 0n;
|
|
3354
|
+
message.secondFactors = [];
|
|
3306
3355
|
if (value !== undefined)
|
|
3307
3356
|
reflectionMergePartial(this, message, value);
|
|
3308
3357
|
return message;
|
|
@@ -3318,6 +3367,16 @@ class LegacyMigrateFinishResponse$Type extends MessageType {
|
|
|
3318
3367
|
case /* int64 expires_in */ 3:
|
|
3319
3368
|
message.expiresIn = reader.int64().toBigInt();
|
|
3320
3369
|
break;
|
|
3370
|
+
case /* repeated sid.v1.authn.StepUpMethod second_factors */ 4:
|
|
3371
|
+
if (wireType === WireType.LengthDelimited)
|
|
3372
|
+
for (let e = reader.int32() + reader.pos; reader.pos < e;)
|
|
3373
|
+
message.secondFactors.push(reader.int32());
|
|
3374
|
+
else
|
|
3375
|
+
message.secondFactors.push(reader.int32());
|
|
3376
|
+
break;
|
|
3377
|
+
case /* optional string browser_csrf */ 5:
|
|
3378
|
+
message.browserCsrf = reader.string();
|
|
3379
|
+
break;
|
|
3321
3380
|
default:
|
|
3322
3381
|
let u = options.readUnknownField;
|
|
3323
3382
|
if (u === "throw")
|
|
@@ -3336,6 +3395,16 @@ class LegacyMigrateFinishResponse$Type extends MessageType {
|
|
|
3336
3395
|
/* int64 expires_in = 3; */
|
|
3337
3396
|
if (message.expiresIn !== 0n)
|
|
3338
3397
|
writer.tag(3, WireType.Varint).int64(message.expiresIn);
|
|
3398
|
+
/* repeated sid.v1.authn.StepUpMethod second_factors = 4; */
|
|
3399
|
+
if (message.secondFactors.length) {
|
|
3400
|
+
writer.tag(4, WireType.LengthDelimited).fork();
|
|
3401
|
+
for (let i = 0; i < message.secondFactors.length; i++)
|
|
3402
|
+
writer.int32(message.secondFactors[i]);
|
|
3403
|
+
writer.join();
|
|
3404
|
+
}
|
|
3405
|
+
/* optional string browser_csrf = 5; */
|
|
3406
|
+
if (message.browserCsrf !== undefined)
|
|
3407
|
+
writer.tag(5, WireType.LengthDelimited).string(message.browserCsrf);
|
|
3339
3408
|
let u = options.writeUnknownFields;
|
|
3340
3409
|
if (u !== false)
|
|
3341
3410
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|