@structured-id/proto 0.1.0 → 0.2.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 +15 -0
- package/README.md +72 -4
- package/dist/generated/sid/v1/authn/auth.client.d.ts +46 -3
- package/dist/generated/sid/v1/authn/auth.client.js +73 -49
- package/dist/generated/sid/v1/authn/auth.client.js.map +1 -1
- package/dist/generated/sid/v1/authn/auth.d.ts +42 -27
- package/dist/generated/sid/v1/authn/auth.js +39 -50
- package/dist/generated/sid/v1/authn/auth.js.map +1 -1
- package/dist/generated/sid/v1/authn/password_history.client.d.ts +68 -0
- package/dist/generated/sid/v1/authn/password_history.client.js +36 -0
- package/dist/generated/sid/v1/authn/password_history.client.js.map +1 -1
- package/dist/generated/sid/v1/authn/password_history.d.ts +254 -0
- package/dist/generated/sid/v1/authn/password_history.js +348 -2
- package/dist/generated/sid/v1/authn/password_history.js.map +1 -1
- package/dist/generated/sid/v1/identity/identity.d.ts +118 -0
- package/dist/generated/sid/v1/identity/identity.js +143 -1
- package/dist/generated/sid/v1/identity/identity.js.map +1 -1
- package/dist/transport/adaptive.d.ts +4 -1
- package/dist/transport/adaptive.js +40 -21
- package/dist/transport/adaptive.js.map +1 -1
- package/dist/transport/framing.js +2 -1
- package/dist/transport/framing.js.map +1 -1
- package/dist/transport/transport-failure.d.ts +7 -0
- package/dist/transport/transport-failure.js +17 -0
- package/dist/transport/transport-failure.js.map +1 -0
- package/dist/transport/webtransport.d.ts +4 -0
- package/dist/transport/webtransport.js +100 -28
- package/dist/transport/webtransport.js.map +1 -1
- package/package.json +5 -3
|
@@ -7,7 +7,344 @@ import { WireType } from "@protobuf-ts/runtime";
|
|
|
7
7
|
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
|
8
8
|
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
|
9
9
|
import { MessageType } from "@protobuf-ts/runtime";
|
|
10
|
+
import { Timestamp } from "../../../google/protobuf/timestamp.js";
|
|
10
11
|
import { PasswordOperationId } from "../ids/ids.js";
|
|
12
|
+
/**
|
|
13
|
+
* What a password operation does to its owner's history.
|
|
14
|
+
*
|
|
15
|
+
* @generated from protobuf enum sid.v1.authn.PasswordHistoryOwnerKind
|
|
16
|
+
*/
|
|
17
|
+
export var PasswordHistoryOwnerKind;
|
|
18
|
+
(function (PasswordHistoryOwnerKind) {
|
|
19
|
+
/**
|
|
20
|
+
* @generated from protobuf enum value: PASSWORD_HISTORY_OWNER_KIND_UNSPECIFIED = 0;
|
|
21
|
+
*/
|
|
22
|
+
PasswordHistoryOwnerKind[PasswordHistoryOwnerKind["UNSPECIFIED"] = 0] = "UNSPECIFIED";
|
|
23
|
+
/**
|
|
24
|
+
* An owner with an account: its existing history keys apply.
|
|
25
|
+
*
|
|
26
|
+
* @generated from protobuf enum value: PASSWORD_HISTORY_OWNER_KIND_EXISTING = 1;
|
|
27
|
+
*/
|
|
28
|
+
PasswordHistoryOwnerKind[PasswordHistoryOwnerKind["EXISTING"] = 1] = "EXISTING";
|
|
29
|
+
/**
|
|
30
|
+
* An owner the operation creates: it gets its first history key. Fails for
|
|
31
|
+
* an owner that already has one, so it never resets a history.
|
|
32
|
+
*
|
|
33
|
+
* @generated from protobuf enum value: PASSWORD_HISTORY_OWNER_KIND_NEW = 2;
|
|
34
|
+
*/
|
|
35
|
+
PasswordHistoryOwnerKind[PasswordHistoryOwnerKind["NEW"] = 2] = "NEW";
|
|
36
|
+
/**
|
|
37
|
+
* A registration start for an identifier someone holds: answered like any
|
|
38
|
+
* other with throwaway keys, and never committed.
|
|
39
|
+
*
|
|
40
|
+
* @generated from protobuf enum value: PASSWORD_HISTORY_OWNER_KIND_DECOY = 3;
|
|
41
|
+
*/
|
|
42
|
+
PasswordHistoryOwnerKind[PasswordHistoryOwnerKind["DECOY"] = 3] = "DECOY";
|
|
43
|
+
})(PasswordHistoryOwnerKind || (PasswordHistoryOwnerKind = {}));
|
|
44
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
45
|
+
class PreparePasswordHistoryRequest$Type extends MessageType {
|
|
46
|
+
constructor() {
|
|
47
|
+
super("sid.v1.authn.PreparePasswordHistoryRequest", [
|
|
48
|
+
{ no: 1, name: "operation_id", kind: "message", T: () => PasswordOperationId },
|
|
49
|
+
{ no: 5, name: "owner_domain", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
|
|
50
|
+
{ no: 6, name: "owner_kind", kind: "enum", T: () => ["sid.v1.authn.PasswordHistoryOwnerKind", PasswordHistoryOwnerKind, "PASSWORD_HISTORY_OWNER_KIND_"] },
|
|
51
|
+
{ no: 7, name: "expires_at", kind: "message", T: () => Timestamp },
|
|
52
|
+
{ no: 8, name: "charge_key", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
53
|
+
{ no: 2, name: "live_comparison_domains", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ },
|
|
54
|
+
{ no: 3, name: "history_revision", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ },
|
|
55
|
+
{ no: 4, name: "settled_operations", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => PasswordOperationId }
|
|
56
|
+
]);
|
|
57
|
+
}
|
|
58
|
+
create(value) {
|
|
59
|
+
const message = globalThis.Object.create((this.messagePrototype));
|
|
60
|
+
message.ownerDomain = new Uint8Array(0);
|
|
61
|
+
message.ownerKind = 0;
|
|
62
|
+
message.chargeKey = "";
|
|
63
|
+
message.liveComparisonDomains = [];
|
|
64
|
+
message.historyRevision = 0n;
|
|
65
|
+
message.settledOperations = [];
|
|
66
|
+
if (value !== undefined)
|
|
67
|
+
reflectionMergePartial(this, message, value);
|
|
68
|
+
return message;
|
|
69
|
+
}
|
|
70
|
+
internalBinaryRead(reader, length, options, target) {
|
|
71
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
72
|
+
while (reader.pos < end) {
|
|
73
|
+
let [fieldNo, wireType] = reader.tag();
|
|
74
|
+
switch (fieldNo) {
|
|
75
|
+
case /* sid.v1.ids.PasswordOperationId operation_id */ 1:
|
|
76
|
+
message.operationId = PasswordOperationId.internalBinaryRead(reader, reader.uint32(), options, message.operationId);
|
|
77
|
+
break;
|
|
78
|
+
case /* bytes owner_domain */ 5:
|
|
79
|
+
message.ownerDomain = reader.bytes();
|
|
80
|
+
break;
|
|
81
|
+
case /* sid.v1.authn.PasswordHistoryOwnerKind owner_kind */ 6:
|
|
82
|
+
message.ownerKind = reader.int32();
|
|
83
|
+
break;
|
|
84
|
+
case /* google.protobuf.Timestamp expires_at */ 7:
|
|
85
|
+
message.expiresAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.expiresAt);
|
|
86
|
+
break;
|
|
87
|
+
case /* string charge_key */ 8:
|
|
88
|
+
message.chargeKey = reader.string();
|
|
89
|
+
break;
|
|
90
|
+
case /* repeated bytes live_comparison_domains */ 2:
|
|
91
|
+
message.liveComparisonDomains.push(reader.bytes());
|
|
92
|
+
break;
|
|
93
|
+
case /* uint64 history_revision */ 3:
|
|
94
|
+
message.historyRevision = reader.uint64().toBigInt();
|
|
95
|
+
break;
|
|
96
|
+
case /* repeated sid.v1.ids.PasswordOperationId settled_operations */ 4:
|
|
97
|
+
message.settledOperations.push(PasswordOperationId.internalBinaryRead(reader, reader.uint32(), options));
|
|
98
|
+
break;
|
|
99
|
+
default:
|
|
100
|
+
let u = options.readUnknownField;
|
|
101
|
+
if (u === "throw")
|
|
102
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
103
|
+
let d = reader.skip(wireType);
|
|
104
|
+
if (u !== false)
|
|
105
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return message;
|
|
109
|
+
}
|
|
110
|
+
internalBinaryWrite(message, writer, options) {
|
|
111
|
+
/* sid.v1.ids.PasswordOperationId operation_id = 1; */
|
|
112
|
+
if (message.operationId)
|
|
113
|
+
PasswordOperationId.internalBinaryWrite(message.operationId, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
114
|
+
/* repeated bytes live_comparison_domains = 2; */
|
|
115
|
+
for (let i = 0; i < message.liveComparisonDomains.length; i++)
|
|
116
|
+
writer.tag(2, WireType.LengthDelimited).bytes(message.liveComparisonDomains[i]);
|
|
117
|
+
/* uint64 history_revision = 3; */
|
|
118
|
+
if (message.historyRevision !== 0n)
|
|
119
|
+
writer.tag(3, WireType.Varint).uint64(message.historyRevision);
|
|
120
|
+
/* repeated sid.v1.ids.PasswordOperationId settled_operations = 4; */
|
|
121
|
+
for (let i = 0; i < message.settledOperations.length; i++)
|
|
122
|
+
PasswordOperationId.internalBinaryWrite(message.settledOperations[i], writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
123
|
+
/* bytes owner_domain = 5; */
|
|
124
|
+
if (message.ownerDomain.length)
|
|
125
|
+
writer.tag(5, WireType.LengthDelimited).bytes(message.ownerDomain);
|
|
126
|
+
/* sid.v1.authn.PasswordHistoryOwnerKind owner_kind = 6; */
|
|
127
|
+
if (message.ownerKind !== 0)
|
|
128
|
+
writer.tag(6, WireType.Varint).int32(message.ownerKind);
|
|
129
|
+
/* google.protobuf.Timestamp expires_at = 7; */
|
|
130
|
+
if (message.expiresAt)
|
|
131
|
+
Timestamp.internalBinaryWrite(message.expiresAt, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
|
|
132
|
+
/* string charge_key = 8; */
|
|
133
|
+
if (message.chargeKey !== "")
|
|
134
|
+
writer.tag(8, WireType.LengthDelimited).string(message.chargeKey);
|
|
135
|
+
let u = options.writeUnknownFields;
|
|
136
|
+
if (u !== false)
|
|
137
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
138
|
+
return writer;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* @generated MessageType for protobuf message sid.v1.authn.PreparePasswordHistoryRequest
|
|
143
|
+
*/
|
|
144
|
+
export const PreparePasswordHistoryRequest = new PreparePasswordHistoryRequest$Type();
|
|
145
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
146
|
+
class PreparePasswordHistoryResponse$Type extends MessageType {
|
|
147
|
+
constructor() {
|
|
148
|
+
super("sid.v1.authn.PreparePasswordHistoryResponse", [
|
|
149
|
+
{ no: 1, name: "domains", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => PasswordHistoryDomain },
|
|
150
|
+
{ no: 2, name: "epochs", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => PasswordHistoryEpochDescriptor }
|
|
151
|
+
]);
|
|
152
|
+
}
|
|
153
|
+
create(value) {
|
|
154
|
+
const message = globalThis.Object.create((this.messagePrototype));
|
|
155
|
+
message.domains = [];
|
|
156
|
+
message.epochs = [];
|
|
157
|
+
if (value !== undefined)
|
|
158
|
+
reflectionMergePartial(this, message, value);
|
|
159
|
+
return message;
|
|
160
|
+
}
|
|
161
|
+
internalBinaryRead(reader, length, options, target) {
|
|
162
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
163
|
+
while (reader.pos < end) {
|
|
164
|
+
let [fieldNo, wireType] = reader.tag();
|
|
165
|
+
switch (fieldNo) {
|
|
166
|
+
case /* repeated sid.v1.authn.PasswordHistoryDomain domains */ 1:
|
|
167
|
+
message.domains.push(PasswordHistoryDomain.internalBinaryRead(reader, reader.uint32(), options));
|
|
168
|
+
break;
|
|
169
|
+
case /* repeated sid.v1.authn.PasswordHistoryEpochDescriptor epochs */ 2:
|
|
170
|
+
message.epochs.push(PasswordHistoryEpochDescriptor.internalBinaryRead(reader, reader.uint32(), options));
|
|
171
|
+
break;
|
|
172
|
+
default:
|
|
173
|
+
let u = options.readUnknownField;
|
|
174
|
+
if (u === "throw")
|
|
175
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
176
|
+
let d = reader.skip(wireType);
|
|
177
|
+
if (u !== false)
|
|
178
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
return message;
|
|
182
|
+
}
|
|
183
|
+
internalBinaryWrite(message, writer, options) {
|
|
184
|
+
/* repeated sid.v1.authn.PasswordHistoryDomain domains = 1; */
|
|
185
|
+
for (let i = 0; i < message.domains.length; i++)
|
|
186
|
+
PasswordHistoryDomain.internalBinaryWrite(message.domains[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
187
|
+
/* repeated sid.v1.authn.PasswordHistoryEpochDescriptor epochs = 2; */
|
|
188
|
+
for (let i = 0; i < message.epochs.length; i++)
|
|
189
|
+
PasswordHistoryEpochDescriptor.internalBinaryWrite(message.epochs[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
190
|
+
let u = options.writeUnknownFields;
|
|
191
|
+
if (u !== false)
|
|
192
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
193
|
+
return writer;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* @generated MessageType for protobuf message sid.v1.authn.PreparePasswordHistoryResponse
|
|
198
|
+
*/
|
|
199
|
+
export const PreparePasswordHistoryResponse = new PreparePasswordHistoryResponse$Type();
|
|
200
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
201
|
+
class PasswordHistoryEpochDescriptor$Type extends MessageType {
|
|
202
|
+
constructor() {
|
|
203
|
+
super("sid.v1.authn.PasswordHistoryEpochDescriptor", [
|
|
204
|
+
{ no: 1, name: "epoch_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
|
|
205
|
+
{ no: 2, name: "public_key", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
|
|
206
|
+
{ no: 3, name: "suite", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
207
|
+
{ no: 4, name: "ksf", kind: "message", T: () => PasswordHistoryKsf },
|
|
208
|
+
{ no: 5, name: "ksf_salt", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
|
|
209
|
+
{ no: 6, name: "created_at", kind: "message", T: () => Timestamp }
|
|
210
|
+
]);
|
|
211
|
+
}
|
|
212
|
+
create(value) {
|
|
213
|
+
const message = globalThis.Object.create((this.messagePrototype));
|
|
214
|
+
message.epochId = new Uint8Array(0);
|
|
215
|
+
message.publicKey = new Uint8Array(0);
|
|
216
|
+
message.suite = "";
|
|
217
|
+
message.ksfSalt = new Uint8Array(0);
|
|
218
|
+
if (value !== undefined)
|
|
219
|
+
reflectionMergePartial(this, message, value);
|
|
220
|
+
return message;
|
|
221
|
+
}
|
|
222
|
+
internalBinaryRead(reader, length, options, target) {
|
|
223
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
224
|
+
while (reader.pos < end) {
|
|
225
|
+
let [fieldNo, wireType] = reader.tag();
|
|
226
|
+
switch (fieldNo) {
|
|
227
|
+
case /* bytes epoch_id */ 1:
|
|
228
|
+
message.epochId = reader.bytes();
|
|
229
|
+
break;
|
|
230
|
+
case /* bytes public_key */ 2:
|
|
231
|
+
message.publicKey = reader.bytes();
|
|
232
|
+
break;
|
|
233
|
+
case /* string suite */ 3:
|
|
234
|
+
message.suite = reader.string();
|
|
235
|
+
break;
|
|
236
|
+
case /* sid.v1.authn.PasswordHistoryKsf ksf */ 4:
|
|
237
|
+
message.ksf = PasswordHistoryKsf.internalBinaryRead(reader, reader.uint32(), options, message.ksf);
|
|
238
|
+
break;
|
|
239
|
+
case /* bytes ksf_salt */ 5:
|
|
240
|
+
message.ksfSalt = reader.bytes();
|
|
241
|
+
break;
|
|
242
|
+
case /* google.protobuf.Timestamp created_at */ 6:
|
|
243
|
+
message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
|
|
244
|
+
break;
|
|
245
|
+
default:
|
|
246
|
+
let u = options.readUnknownField;
|
|
247
|
+
if (u === "throw")
|
|
248
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
249
|
+
let d = reader.skip(wireType);
|
|
250
|
+
if (u !== false)
|
|
251
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
return message;
|
|
255
|
+
}
|
|
256
|
+
internalBinaryWrite(message, writer, options) {
|
|
257
|
+
/* bytes epoch_id = 1; */
|
|
258
|
+
if (message.epochId.length)
|
|
259
|
+
writer.tag(1, WireType.LengthDelimited).bytes(message.epochId);
|
|
260
|
+
/* bytes public_key = 2; */
|
|
261
|
+
if (message.publicKey.length)
|
|
262
|
+
writer.tag(2, WireType.LengthDelimited).bytes(message.publicKey);
|
|
263
|
+
/* string suite = 3; */
|
|
264
|
+
if (message.suite !== "")
|
|
265
|
+
writer.tag(3, WireType.LengthDelimited).string(message.suite);
|
|
266
|
+
/* sid.v1.authn.PasswordHistoryKsf ksf = 4; */
|
|
267
|
+
if (message.ksf)
|
|
268
|
+
PasswordHistoryKsf.internalBinaryWrite(message.ksf, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
269
|
+
/* bytes ksf_salt = 5; */
|
|
270
|
+
if (message.ksfSalt.length)
|
|
271
|
+
writer.tag(5, WireType.LengthDelimited).bytes(message.ksfSalt);
|
|
272
|
+
/* google.protobuf.Timestamp created_at = 6; */
|
|
273
|
+
if (message.createdAt)
|
|
274
|
+
Timestamp.internalBinaryWrite(message.createdAt, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
|
|
275
|
+
let u = options.writeUnknownFields;
|
|
276
|
+
if (u !== false)
|
|
277
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
278
|
+
return writer;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* @generated MessageType for protobuf message sid.v1.authn.PasswordHistoryEpochDescriptor
|
|
283
|
+
*/
|
|
284
|
+
export const PasswordHistoryEpochDescriptor = new PasswordHistoryEpochDescriptor$Type();
|
|
285
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
286
|
+
class PasswordHistoryKsf$Type extends MessageType {
|
|
287
|
+
constructor() {
|
|
288
|
+
super("sid.v1.authn.PasswordHistoryKsf", [
|
|
289
|
+
{ no: 1, name: "memory_kib", kind: "scalar", T: 13 /*ScalarType.UINT32*/ },
|
|
290
|
+
{ no: 2, name: "passes", kind: "scalar", T: 13 /*ScalarType.UINT32*/ },
|
|
291
|
+
{ no: 3, name: "lanes", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }
|
|
292
|
+
]);
|
|
293
|
+
}
|
|
294
|
+
create(value) {
|
|
295
|
+
const message = globalThis.Object.create((this.messagePrototype));
|
|
296
|
+
message.memoryKib = 0;
|
|
297
|
+
message.passes = 0;
|
|
298
|
+
message.lanes = 0;
|
|
299
|
+
if (value !== undefined)
|
|
300
|
+
reflectionMergePartial(this, message, value);
|
|
301
|
+
return message;
|
|
302
|
+
}
|
|
303
|
+
internalBinaryRead(reader, length, options, target) {
|
|
304
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
305
|
+
while (reader.pos < end) {
|
|
306
|
+
let [fieldNo, wireType] = reader.tag();
|
|
307
|
+
switch (fieldNo) {
|
|
308
|
+
case /* uint32 memory_kib */ 1:
|
|
309
|
+
message.memoryKib = reader.uint32();
|
|
310
|
+
break;
|
|
311
|
+
case /* uint32 passes */ 2:
|
|
312
|
+
message.passes = reader.uint32();
|
|
313
|
+
break;
|
|
314
|
+
case /* uint32 lanes */ 3:
|
|
315
|
+
message.lanes = reader.uint32();
|
|
316
|
+
break;
|
|
317
|
+
default:
|
|
318
|
+
let u = options.readUnknownField;
|
|
319
|
+
if (u === "throw")
|
|
320
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
321
|
+
let d = reader.skip(wireType);
|
|
322
|
+
if (u !== false)
|
|
323
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
return message;
|
|
327
|
+
}
|
|
328
|
+
internalBinaryWrite(message, writer, options) {
|
|
329
|
+
/* uint32 memory_kib = 1; */
|
|
330
|
+
if (message.memoryKib !== 0)
|
|
331
|
+
writer.tag(1, WireType.Varint).uint32(message.memoryKib);
|
|
332
|
+
/* uint32 passes = 2; */
|
|
333
|
+
if (message.passes !== 0)
|
|
334
|
+
writer.tag(2, WireType.Varint).uint32(message.passes);
|
|
335
|
+
/* uint32 lanes = 3; */
|
|
336
|
+
if (message.lanes !== 0)
|
|
337
|
+
writer.tag(3, WireType.Varint).uint32(message.lanes);
|
|
338
|
+
let u = options.writeUnknownFields;
|
|
339
|
+
if (u !== false)
|
|
340
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
341
|
+
return writer;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
/**
|
|
345
|
+
* @generated MessageType for protobuf message sid.v1.authn.PasswordHistoryKsf
|
|
346
|
+
*/
|
|
347
|
+
export const PasswordHistoryKsf = new PasswordHistoryKsf$Type();
|
|
11
348
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
12
349
|
class PasswordHistoryContext$Type extends MessageType {
|
|
13
350
|
constructor() {
|
|
@@ -348,13 +685,15 @@ class PasswordRegistrationProof$Type extends MessageType {
|
|
|
348
685
|
constructor() {
|
|
349
686
|
super("sid.v1.authn.PasswordRegistrationProof", [
|
|
350
687
|
{ no: 1, name: "zkpp_proof", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
|
|
351
|
-
{ no: 2, name: "instances", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ }
|
|
688
|
+
{ no: 2, name: "instances", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ },
|
|
689
|
+
{ no: 4, name: "evaluation_proofs", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => PasswordHistoryEvaluationProof }
|
|
352
690
|
]);
|
|
353
691
|
}
|
|
354
692
|
create(value) {
|
|
355
693
|
const message = globalThis.Object.create((this.messagePrototype));
|
|
356
694
|
message.zkppProof = new Uint8Array(0);
|
|
357
695
|
message.instances = [];
|
|
696
|
+
message.evaluationProofs = [];
|
|
358
697
|
if (value !== undefined)
|
|
359
698
|
reflectionMergePartial(this, message, value);
|
|
360
699
|
return message;
|
|
@@ -370,6 +709,9 @@ class PasswordRegistrationProof$Type extends MessageType {
|
|
|
370
709
|
case /* repeated bytes instances */ 2:
|
|
371
710
|
message.instances.push(reader.bytes());
|
|
372
711
|
break;
|
|
712
|
+
case /* repeated sid.v1.authn.PasswordHistoryEvaluationProof evaluation_proofs */ 4:
|
|
713
|
+
message.evaluationProofs.push(PasswordHistoryEvaluationProof.internalBinaryRead(reader, reader.uint32(), options));
|
|
714
|
+
break;
|
|
373
715
|
default:
|
|
374
716
|
let u = options.readUnknownField;
|
|
375
717
|
if (u === "throw")
|
|
@@ -388,6 +730,9 @@ class PasswordRegistrationProof$Type extends MessageType {
|
|
|
388
730
|
/* repeated bytes instances = 2; */
|
|
389
731
|
for (let i = 0; i < message.instances.length; i++)
|
|
390
732
|
writer.tag(2, WireType.LengthDelimited).bytes(message.instances[i]);
|
|
733
|
+
/* repeated sid.v1.authn.PasswordHistoryEvaluationProof evaluation_proofs = 4; */
|
|
734
|
+
for (let i = 0; i < message.evaluationProofs.length; i++)
|
|
735
|
+
PasswordHistoryEvaluationProof.internalBinaryWrite(message.evaluationProofs[i], writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
391
736
|
let u = options.writeUnknownFields;
|
|
392
737
|
if (u !== false)
|
|
393
738
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -402,6 +747,7 @@ export const PasswordRegistrationProof = new PasswordRegistrationProof$Type();
|
|
|
402
747
|
* @generated ServiceType for protobuf service sid.v1.authn.PasswordHistoryEvaluatorService
|
|
403
748
|
*/
|
|
404
749
|
export const PasswordHistoryEvaluatorService = new ServiceType("sid.v1.authn.PasswordHistoryEvaluatorService", [
|
|
405
|
-
{ name: "EvaluatePasswordHistory", idempotency: "IDEMPOTENT", options: { "google.api.http": { post: "/v1/auth/password-history/evaluate", body: "*" } }, I: EvaluatePasswordHistoryRequest, O: EvaluatePasswordHistoryResponse }
|
|
750
|
+
{ name: "EvaluatePasswordHistory", idempotency: "IDEMPOTENT", options: { "google.api.http": { post: "/v1/auth/password-history/evaluate", body: "*" } }, I: EvaluatePasswordHistoryRequest, O: EvaluatePasswordHistoryResponse },
|
|
751
|
+
{ name: "PreparePasswordHistory", idempotency: "IDEMPOTENT", options: {}, I: PreparePasswordHistoryRequest, O: PreparePasswordHistoryResponse }
|
|
406
752
|
]);
|
|
407
753
|
//# sourceMappingURL=password_history.js.map
|