@structured-id/ui-core 1.3.0 → 3.0.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.
Files changed (152) hide show
  1. package/README.md +22 -10
  2. package/package.json +25 -43
  3. package/src/components/SidStatusBadge.vue +1 -5
  4. package/src/composables/useAccountTransport.test.ts +2 -1
  5. package/src/composables/useGrpc.test.ts +17 -14
  6. package/src/composables/useGrpc.ts +4 -2
  7. package/src/index.ts +2 -120
  8. package/src/profile/components/ConsentManager.vue +5 -1
  9. package/src/profile/components/ProfileEditor.vue +1 -1
  10. package/src/profile/components/SecuritySettings.vue +5 -1
  11. package/src/profile/components/SessionList.vue +2 -1
  12. package/src/profile/components/SidRegistrationForm.test.ts +173 -1
  13. package/src/profile/components/SidRegistrationForm.vue +88 -32
  14. package/src/profile/components/index.ts +1 -4
  15. package/src/profile/composables/index.ts +1 -0
  16. package/src/profile/composables/operationPlan.test.ts +155 -0
  17. package/src/profile/composables/operationPlan.ts +218 -0
  18. package/src/profile/composables/useAccountApi.ts +4 -4
  19. package/src/profile/composables/useAuth.test.ts +312 -31
  20. package/src/profile/composables/useAuth.ts +176 -30
  21. package/src/profile/composables/useAuthApi.opaque.test.ts +13 -6
  22. package/src/profile/composables/useAuthApi.ts +40 -18
  23. package/src/profile/composables/useCurrentPasswordRequirement.test.ts +196 -0
  24. package/src/profile/composables/useCurrentPasswordRequirement.ts +95 -0
  25. package/src/profile/composables/useEnrollmentApi.test.ts +7 -3
  26. package/src/profile/composables/useEnrollmentApi.ts +3 -5
  27. package/src/profile/composables/useIdentityApi.ts +4 -4
  28. package/src/profile/composables/useSecurityLevel.test.ts +1 -1
  29. package/src/profile/composables/useSecurityLevel.ts +1 -1
  30. package/src/quasar/SidPasswordCeremony.test.ts +253 -0
  31. package/src/quasar/SidPasswordCeremony.vue +456 -0
  32. package/src/quasar/index.ts +2 -0
  33. package/src/utils/rpcRefusal.test.ts +4 -4
  34. package/src/utils/rpcRefusal.ts +8 -4
  35. package/dist/browser-vp/index.cjs +0 -349
  36. package/dist/browser-vp/index.d.cts +0 -276
  37. package/dist/browser-vp/index.d.ts +0 -276
  38. package/dist/browser-vp/index.js +0 -349
  39. package/dist/chunk-C3Q766CY.cjs +0 -125
  40. package/dist/chunk-J5YXRXB5.js +0 -125
  41. package/dist/index.cjs +0 -23581
  42. package/dist/index.d.cts +0 -11539
  43. package/dist/index.d.ts +0 -11539
  44. package/dist/index.js +0 -23581
  45. package/dist/storage-4CB2JTLW.cjs +0 -22
  46. package/dist/storage-THRWREZP.js +0 -22
  47. package/src/browser-vp/crypto.ts +0 -253
  48. package/src/browser-vp/index.test.ts +0 -10
  49. package/src/browser-vp/index.ts +0 -116
  50. package/src/browser-vp/prf.ts +0 -179
  51. package/src/browser-vp/storage.test.ts +0 -9
  52. package/src/browser-vp/storage.ts +0 -163
  53. package/src/browser-vp/types.ts +0 -95
  54. package/src/browser-vp/vp.test.ts +0 -43
  55. package/src/browser-vp/vp.ts +0 -111
  56. package/src/generated/google/api/http.ts +0 -687
  57. package/src/generated/google/api/httpbody.ts +0 -159
  58. package/src/generated/google/protobuf/any.ts +0 -326
  59. package/src/generated/google/protobuf/descriptor.ts +0 -4865
  60. package/src/generated/google/protobuf/duration.ts +0 -230
  61. package/src/generated/google/protobuf/empty.ts +0 -94
  62. package/src/generated/google/protobuf/struct.ts +0 -484
  63. package/src/generated/google/protobuf/timestamp.ts +0 -287
  64. package/src/generated/google/rpc/error_details.ts +0 -1386
  65. package/src/generated/google/rpc/status.ts +0 -127
  66. package/src/generated/sid/v1/account/account.client.ts +0 -527
  67. package/src/generated/sid/v1/account/account.ts +0 -3261
  68. package/src/generated/sid/v1/admin/admin.client.ts +0 -139
  69. package/src/generated/sid/v1/admin/admin.ts +0 -781
  70. package/src/generated/sid/v1/admin/admin_roles.client.ts +0 -181
  71. package/src/generated/sid/v1/admin/admin_roles.ts +0 -1606
  72. package/src/generated/sid/v1/admin/analytics.client.ts +0 -106
  73. package/src/generated/sid/v1/admin/analytics.ts +0 -1017
  74. package/src/generated/sid/v1/admin/branding.client.ts +0 -166
  75. package/src/generated/sid/v1/admin/branding.ts +0 -1906
  76. package/src/generated/sid/v1/admin/enrollment.client.ts +0 -177
  77. package/src/generated/sid/v1/admin/enrollment.ts +0 -1766
  78. package/src/generated/sid/v1/admin/events.client.ts +0 -195
  79. package/src/generated/sid/v1/admin/events.ts +0 -1900
  80. package/src/generated/sid/v1/admin/flow.client.ts +0 -183
  81. package/src/generated/sid/v1/admin/flow.ts +0 -1552
  82. package/src/generated/sid/v1/admin/keys.client.ts +0 -107
  83. package/src/generated/sid/v1/admin/keys.ts +0 -931
  84. package/src/generated/sid/v1/admin/login_experience.client.ts +0 -160
  85. package/src/generated/sid/v1/admin/login_experience.ts +0 -1061
  86. package/src/generated/sid/v1/admin/migration.client.ts +0 -127
  87. package/src/generated/sid/v1/admin/migration.ts +0 -1948
  88. package/src/generated/sid/v1/admin/notifications.client.ts +0 -134
  89. package/src/generated/sid/v1/admin/notifications.ts +0 -1273
  90. package/src/generated/sid/v1/admin/operations.client.ts +0 -241
  91. package/src/generated/sid/v1/admin/operations.ts +0 -2633
  92. package/src/generated/sid/v1/admin/organizations.client.ts +0 -57
  93. package/src/generated/sid/v1/admin/organizations.ts +0 -332
  94. package/src/generated/sid/v1/admin/provisioning.client.ts +0 -232
  95. package/src/generated/sid/v1/admin/provisioning.ts +0 -1383
  96. package/src/generated/sid/v1/admin/scopes.client.ts +0 -171
  97. package/src/generated/sid/v1/admin/scopes.ts +0 -1324
  98. package/src/generated/sid/v1/admin/security.client.ts +0 -410
  99. package/src/generated/sid/v1/admin/security.ts +0 -4077
  100. package/src/generated/sid/v1/admin/sessions.client.ts +0 -114
  101. package/src/generated/sid/v1/admin/sessions.ts +0 -923
  102. package/src/generated/sid/v1/admin/settings.client.ts +0 -351
  103. package/src/generated/sid/v1/admin/settings.ts +0 -2458
  104. package/src/generated/sid/v1/admin/user_profile.client.ts +0 -57
  105. package/src/generated/sid/v1/admin/user_profile.ts +0 -730
  106. package/src/generated/sid/v1/admin/webhooks.client.ts +0 -269
  107. package/src/generated/sid/v1/admin/webhooks.ts +0 -2804
  108. package/src/generated/sid/v1/attestation/attestation.client.ts +0 -115
  109. package/src/generated/sid/v1/attestation/attestation.ts +0 -813
  110. package/src/generated/sid/v1/authn/auth.client.ts +0 -943
  111. package/src/generated/sid/v1/authn/auth.ts +0 -9719
  112. package/src/generated/sid/v1/authn/flows.client.ts +0 -413
  113. package/src/generated/sid/v1/authn/flows.ts +0 -3205
  114. package/src/generated/sid/v1/authn/issuer.client.ts +0 -489
  115. package/src/generated/sid/v1/authn/issuer.ts +0 -1600
  116. package/src/generated/sid/v1/authn/password_history.client.ts +0 -57
  117. package/src/generated/sid/v1/authn/password_history.ts +0 -578
  118. package/src/generated/sid/v1/authn/system_integration.client.ts +0 -73
  119. package/src/generated/sid/v1/authn/system_integration.ts +0 -218
  120. package/src/generated/sid/v1/authz/authz.client.ts +0 -459
  121. package/src/generated/sid/v1/authz/authz.ts +0 -6524
  122. package/src/generated/sid/v1/authz/forward_auth.client.ts +0 -97
  123. package/src/generated/sid/v1/authz/forward_auth.ts +0 -79
  124. package/src/generated/sid/v1/authz/governance.client.ts +0 -102
  125. package/src/generated/sid/v1/authz/governance.ts +0 -875
  126. package/src/generated/sid/v1/common/errors.ts +0 -710
  127. package/src/generated/sid/v1/common/pagination.ts +0 -152
  128. package/src/generated/sid/v1/common/transport.ts +0 -227
  129. package/src/generated/sid/v1/common/types.ts +0 -151
  130. package/src/generated/sid/v1/events/event_stream.client.ts +0 -67
  131. package/src/generated/sid/v1/events/event_stream.ts +0 -375
  132. package/src/generated/sid/v1/federation/upstream.client.ts +0 -142
  133. package/src/generated/sid/v1/federation/upstream.ts +0 -1736
  134. package/src/generated/sid/v1/identity/identity.client.ts +0 -467
  135. package/src/generated/sid/v1/identity/identity.ts +0 -5676
  136. package/src/generated/sid/v1/ids/ids.ts +0 -395
  137. package/src/generated/sid/v1/machine/machine_user.client.ts +0 -219
  138. package/src/generated/sid/v1/machine/machine_user.ts +0 -2364
  139. package/src/generated/sid/v1/machine/pat.client.ts +0 -130
  140. package/src/generated/sid/v1/machine/pat.ts +0 -1083
  141. package/src/generated/sid/v1/projects/projects.client.ts +0 -404
  142. package/src/generated/sid/v1/projects/projects.ts +0 -4446
  143. package/src/generated/sid/v1/scim/scim.client.ts +0 -520
  144. package/src/generated/sid/v1/scim/scim.ts +0 -3182
  145. package/src/generated/sid/v1/test/test.client.ts +0 -232
  146. package/src/generated/sid/v1/test/test.ts +0 -1136
  147. package/src/transport/adaptive.test.ts +0 -728
  148. package/src/transport/adaptive.ts +0 -308
  149. package/src/transport/framing.test.ts +0 -227
  150. package/src/transport/framing.ts +0 -98
  151. package/src/transport/webtransport.test.ts +0 -728
  152. package/src/transport/webtransport.ts +0 -323
@@ -1,57 +0,0 @@
1
- // @generated by protobuf-ts 2.11.1 with parameter client_generic,generate_dependencies
2
- // @generated from protobuf file "sid/v1/authn/password_history.proto" (package "sid.v1.authn", syntax proto3)
3
- // tslint:disable
4
- import type { RpcTransport } from "@protobuf-ts/runtime-rpc";
5
- import type { ServiceInfo } from "@protobuf-ts/runtime-rpc";
6
- import { PasswordHistoryEvaluatorService } from "./password_history";
7
- import { stackIntercept } from "@protobuf-ts/runtime-rpc";
8
- import type { EvaluatePasswordHistoryResponse } from "./password_history";
9
- import type { EvaluatePasswordHistoryRequest } from "./password_history";
10
- import type { UnaryCall } from "@protobuf-ts/runtime-rpc";
11
- import type { RpcOptions } from "@protobuf-ts/runtime-rpc";
12
- /**
13
- * The VOPRF evaluator of password history. Deployed with its own service
14
- * identity and key access, separate from the credential service that runs the
15
- * history checker.
16
- *
17
- * @generated from protobuf service sid.v1.authn.PasswordHistoryEvaluatorService
18
- */
19
- export interface IPasswordHistoryEvaluatorServiceClient {
20
- /**
21
- * Evaluate the blinded history input of a pending password operation under
22
- * every history key the operation requires, in one bounded request. The
23
- * operation, not the caller, decides which keys; the work is charged to the
24
- * operation and its owner before any key is used, and an exact retry returns
25
- * the same charged evaluations.
26
- *
27
- * @generated from protobuf rpc: EvaluatePasswordHistory
28
- */
29
- evaluatePasswordHistory(input: EvaluatePasswordHistoryRequest, options?: RpcOptions): UnaryCall<EvaluatePasswordHistoryRequest, EvaluatePasswordHistoryResponse>;
30
- }
31
- /**
32
- * The VOPRF evaluator of password history. Deployed with its own service
33
- * identity and key access, separate from the credential service that runs the
34
- * history checker.
35
- *
36
- * @generated from protobuf service sid.v1.authn.PasswordHistoryEvaluatorService
37
- */
38
- export class PasswordHistoryEvaluatorServiceClient implements IPasswordHistoryEvaluatorServiceClient, ServiceInfo {
39
- typeName = PasswordHistoryEvaluatorService.typeName;
40
- methods = PasswordHistoryEvaluatorService.methods;
41
- options = PasswordHistoryEvaluatorService.options;
42
- constructor(private readonly _transport: RpcTransport) {
43
- }
44
- /**
45
- * Evaluate the blinded history input of a pending password operation under
46
- * every history key the operation requires, in one bounded request. The
47
- * operation, not the caller, decides which keys; the work is charged to the
48
- * operation and its owner before any key is used, and an exact retry returns
49
- * the same charged evaluations.
50
- *
51
- * @generated from protobuf rpc: EvaluatePasswordHistory
52
- */
53
- evaluatePasswordHistory(input: EvaluatePasswordHistoryRequest, options?: RpcOptions): UnaryCall<EvaluatePasswordHistoryRequest, EvaluatePasswordHistoryResponse> {
54
- const method = this.methods[0], opt = this._transport.mergeOptions(options);
55
- return stackIntercept<EvaluatePasswordHistoryRequest, EvaluatePasswordHistoryResponse>("unary", this._transport, method, opt, input);
56
- }
57
- }
@@ -1,578 +0,0 @@
1
- // @generated by protobuf-ts 2.11.1 with parameter client_generic,generate_dependencies
2
- // @generated from protobuf file "sid/v1/authn/password_history.proto" (package "sid.v1.authn", syntax proto3)
3
- // tslint:disable
4
- import { ServiceType } from "@protobuf-ts/runtime-rpc";
5
- import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
6
- import type { IBinaryWriter } from "@protobuf-ts/runtime";
7
- import { WireType } from "@protobuf-ts/runtime";
8
- import type { BinaryReadOptions } from "@protobuf-ts/runtime";
9
- import type { IBinaryReader } from "@protobuf-ts/runtime";
10
- import { UnknownFieldHandler } from "@protobuf-ts/runtime";
11
- import type { PartialMessage } from "@protobuf-ts/runtime";
12
- import { reflectionMergePartial } from "@protobuf-ts/runtime";
13
- import { MessageType } from "@protobuf-ts/runtime";
14
- import { PasswordOperationId } from "../ids/ids";
15
- /**
16
- * What a client needs to build its history request and proof for one
17
- * password operation. Returned by the step that prepares the operation
18
- * (registration start, password-change challenge, password-reset verification).
19
- *
20
- * @generated from protobuf message sid.v1.authn.PasswordHistoryContext
21
- */
22
- export interface PasswordHistoryContext {
23
- /**
24
- * The operation this context belongs to. Every later step of the operation
25
- * (evaluation, OPAQUE start, finish) and every retry carries it. Issued by
26
- * the server when it prepares the operation.
27
- *
28
- * @generated from protobuf field: sid.v1.ids.PasswordOperationId operation_id = 1
29
- */
30
- operationId?: PasswordOperationId;
31
- /**
32
- * The owner's history input domain: 32 bytes, a Pallas base-field element in
33
- * little-endian canonical form. The client hashes the password under it into
34
- * the history input it blinds. Server-derived from the credential owner;
35
- * opaque to the client and unlinkable across installations and owners.
36
- *
37
- * @generated from protobuf field: bytes owner_domain = 2
38
- */
39
- ownerDomain: Uint8Array;
40
- /**
41
- * The comparison domains the operation must produce a tag for, in the order
42
- * the evaluations and the proof's tags follow. Server-selected from the
43
- * owner's retained history; at least one. The client cannot omit or reorder
44
- * one: the proof commits to this list.
45
- *
46
- * @generated from protobuf field: repeated sid.v1.authn.PasswordHistoryDomain domains = 3
47
- */
48
- domains: PasswordHistoryDomain[];
49
- /**
50
- * Password policy version the registration proof must be made for; the
51
- * verifying key of that version and domain count checks it.
52
- *
53
- * @generated from protobuf field: uint32 policy_version = 4
54
- */
55
- policyVersion: number;
56
- }
57
- /**
58
- * One comparison domain: the epoch, key and format under which a tag is
59
- * compared with the entries retained in it.
60
- *
61
- * @generated from protobuf message sid.v1.authn.PasswordHistoryDomain
62
- */
63
- export interface PasswordHistoryDomain {
64
- /**
65
- * The domain element: 32 bytes, a Pallas base-field element in little-endian
66
- * canonical form. Enters the tag derivation, so tags of different domains
67
- * never compare equal.
68
- *
69
- * @generated from protobuf field: bytes comparison_domain = 1
70
- */
71
- comparisonDomain: Uint8Array;
72
- /**
73
- * The evaluator's public key for this domain, k·G: a compressed Pallas point,
74
- * 32 bytes. The client checks each evaluation proof against it before
75
- * proving, so a wrong or missing key fails before the costly proof.
76
- *
77
- * @generated from protobuf field: bytes evaluator_public_key = 2
78
- */
79
- evaluatorPublicKey: Uint8Array;
80
- }
81
- /**
82
- * @generated from protobuf message sid.v1.authn.EvaluatePasswordHistoryRequest
83
- */
84
- export interface EvaluatePasswordHistoryRequest {
85
- /**
86
- * The operation whose required domains are evaluated (from PasswordHistoryContext).
87
- *
88
- * @generated from protobuf field: sid.v1.ids.PasswordOperationId operation_id = 1
89
- */
90
- operationId?: PasswordOperationId;
91
- /**
92
- * The blinded history input B = r·H(u): a compressed Pallas point, 32 bytes,
93
- * not the identity. Client-computed from the password under the operation's
94
- * owner domain with a fresh nonzero blind r; reveals nothing about the password.
95
- *
96
- * @generated from protobuf field: bytes blinded_input = 2
97
- */
98
- blindedInput: Uint8Array;
99
- }
100
- /**
101
- * @generated from protobuf message sid.v1.authn.EvaluatePasswordHistoryResponse
102
- */
103
- export interface EvaluatePasswordHistoryResponse {
104
- /**
105
- * One evaluation per required comparison domain, in the order of
106
- * PasswordHistoryContext.domains. Either all are present or the call fails.
107
- *
108
- * @generated from protobuf field: repeated sid.v1.authn.PasswordHistoryEvaluation evaluations = 1
109
- */
110
- evaluations: PasswordHistoryEvaluation[];
111
- }
112
- /**
113
- * The evaluator's answer for one comparison domain.
114
- *
115
- * @generated from protobuf message sid.v1.authn.PasswordHistoryEvaluation
116
- */
117
- export interface PasswordHistoryEvaluation {
118
- /**
119
- * Z = k·B under this domain's key: a compressed Pallas point, 32 bytes.
120
- *
121
- * @generated from protobuf field: bytes evaluated_element = 1
122
- */
123
- evaluatedElement: Uint8Array;
124
- /**
125
- * Proof that Z uses the key behind this domain's evaluator_public_key
126
- * (Chaum-Pedersen DLEQ, RFC 9497 §2.2), bound to the operation.
127
- *
128
- * @generated from protobuf field: sid.v1.authn.PasswordHistoryEvaluationProof proof = 2
129
- */
130
- proof?: PasswordHistoryEvaluationProof;
131
- }
132
- /**
133
- * Chaum-Pedersen proof of log_G(pk) = log_B(Z). Each domain has its own key,
134
- * so each evaluation carries its own proof.
135
- *
136
- * @generated from protobuf message sid.v1.authn.PasswordHistoryEvaluationProof
137
- */
138
- export interface PasswordHistoryEvaluationProof {
139
- /**
140
- * Challenge c: a Pallas scalar, 32 bytes little-endian.
141
- *
142
- * @generated from protobuf field: bytes challenge = 1
143
- */
144
- challenge: Uint8Array;
145
- /**
146
- * Response s = nonce − c·k: a Pallas scalar, 32 bytes little-endian.
147
- *
148
- * @generated from protobuf field: bytes response = 2
149
- */
150
- response: Uint8Array;
151
- }
152
- /**
153
- * A registration proof for the password being installed: its policy, breach
154
- * and history relation, and that the operation's OPAQUE registration element
155
- * is the blinded hash of that password. The operation ID and the registration
156
- * request bytes enter the proof transcript, so it verifies for no other
157
- * operation or request. Sent with the final registration record, where the
158
- * history checker verifies it and commits the credential. Absent when the
159
- * client cannot prove; the credential then installs policy-unverified and does
160
- * not advance trusted history.
161
- *
162
- * @generated from protobuf message sid.v1.authn.PasswordRegistrationProof
163
- */
164
- export interface PasswordRegistrationProof {
165
- /**
166
- * Halo2 proof bytes. Client-generated with the OPAQUE registration request.
167
- *
168
- * @generated from protobuf field: bytes zkpp_proof = 1
169
- */
170
- zkppProof: Uint8Array;
171
- /**
172
- * The proof's public instances, 32 bytes each (Pallas base field,
173
- * little-endian): the OPAQUE registration element M = blind·H(P) (x, y), the
174
- * owner domain, the comparison domains, the blinded history input (x, y), and
175
- * per domain the evaluated element (x, y) and the tag. The server checks each
176
- * against the operation and its registration request; none is accepted from
177
- * the client on trust.
178
- *
179
- * @generated from protobuf field: repeated bytes instances = 2
180
- */
181
- instances: Uint8Array[];
182
- }
183
- // @generated message type with reflection information, may provide speed optimized methods
184
- class PasswordHistoryContext$Type extends MessageType<PasswordHistoryContext> {
185
- constructor() {
186
- super("sid.v1.authn.PasswordHistoryContext", [
187
- { no: 1, name: "operation_id", kind: "message", T: () => PasswordOperationId },
188
- { no: 2, name: "owner_domain", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
189
- { no: 3, name: "domains", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => PasswordHistoryDomain },
190
- { no: 4, name: "policy_version", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }
191
- ]);
192
- }
193
- create(value?: PartialMessage<PasswordHistoryContext>): PasswordHistoryContext {
194
- const message = globalThis.Object.create((this.messagePrototype!));
195
- message.ownerDomain = new Uint8Array(0);
196
- message.domains = [];
197
- message.policyVersion = 0;
198
- if (value !== undefined)
199
- reflectionMergePartial<PasswordHistoryContext>(this, message, value);
200
- return message;
201
- }
202
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PasswordHistoryContext): PasswordHistoryContext {
203
- let message = target ?? this.create(), end = reader.pos + length;
204
- while (reader.pos < end) {
205
- let [fieldNo, wireType] = reader.tag();
206
- switch (fieldNo) {
207
- case /* sid.v1.ids.PasswordOperationId operation_id */ 1:
208
- message.operationId = PasswordOperationId.internalBinaryRead(reader, reader.uint32(), options, message.operationId);
209
- break;
210
- case /* bytes owner_domain */ 2:
211
- message.ownerDomain = reader.bytes();
212
- break;
213
- case /* repeated sid.v1.authn.PasswordHistoryDomain domains */ 3:
214
- message.domains.push(PasswordHistoryDomain.internalBinaryRead(reader, reader.uint32(), options));
215
- break;
216
- case /* uint32 policy_version */ 4:
217
- message.policyVersion = reader.uint32();
218
- break;
219
- default:
220
- let u = options.readUnknownField;
221
- if (u === "throw")
222
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
223
- let d = reader.skip(wireType);
224
- if (u !== false)
225
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
226
- }
227
- }
228
- return message;
229
- }
230
- internalBinaryWrite(message: PasswordHistoryContext, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
231
- /* sid.v1.ids.PasswordOperationId operation_id = 1; */
232
- if (message.operationId)
233
- PasswordOperationId.internalBinaryWrite(message.operationId, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
234
- /* bytes owner_domain = 2; */
235
- if (message.ownerDomain.length)
236
- writer.tag(2, WireType.LengthDelimited).bytes(message.ownerDomain);
237
- /* repeated sid.v1.authn.PasswordHistoryDomain domains = 3; */
238
- for (let i = 0; i < message.domains.length; i++)
239
- PasswordHistoryDomain.internalBinaryWrite(message.domains[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join();
240
- /* uint32 policy_version = 4; */
241
- if (message.policyVersion !== 0)
242
- writer.tag(4, WireType.Varint).uint32(message.policyVersion);
243
- let u = options.writeUnknownFields;
244
- if (u !== false)
245
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
246
- return writer;
247
- }
248
- }
249
- /**
250
- * @generated MessageType for protobuf message sid.v1.authn.PasswordHistoryContext
251
- */
252
- export const PasswordHistoryContext = new PasswordHistoryContext$Type();
253
- // @generated message type with reflection information, may provide speed optimized methods
254
- class PasswordHistoryDomain$Type extends MessageType<PasswordHistoryDomain> {
255
- constructor() {
256
- super("sid.v1.authn.PasswordHistoryDomain", [
257
- { no: 1, name: "comparison_domain", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
258
- { no: 2, name: "evaluator_public_key", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }
259
- ]);
260
- }
261
- create(value?: PartialMessage<PasswordHistoryDomain>): PasswordHistoryDomain {
262
- const message = globalThis.Object.create((this.messagePrototype!));
263
- message.comparisonDomain = new Uint8Array(0);
264
- message.evaluatorPublicKey = new Uint8Array(0);
265
- if (value !== undefined)
266
- reflectionMergePartial<PasswordHistoryDomain>(this, message, value);
267
- return message;
268
- }
269
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PasswordHistoryDomain): PasswordHistoryDomain {
270
- let message = target ?? this.create(), end = reader.pos + length;
271
- while (reader.pos < end) {
272
- let [fieldNo, wireType] = reader.tag();
273
- switch (fieldNo) {
274
- case /* bytes comparison_domain */ 1:
275
- message.comparisonDomain = reader.bytes();
276
- break;
277
- case /* bytes evaluator_public_key */ 2:
278
- message.evaluatorPublicKey = reader.bytes();
279
- break;
280
- default:
281
- let u = options.readUnknownField;
282
- if (u === "throw")
283
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
284
- let d = reader.skip(wireType);
285
- if (u !== false)
286
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
287
- }
288
- }
289
- return message;
290
- }
291
- internalBinaryWrite(message: PasswordHistoryDomain, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
292
- /* bytes comparison_domain = 1; */
293
- if (message.comparisonDomain.length)
294
- writer.tag(1, WireType.LengthDelimited).bytes(message.comparisonDomain);
295
- /* bytes evaluator_public_key = 2; */
296
- if (message.evaluatorPublicKey.length)
297
- writer.tag(2, WireType.LengthDelimited).bytes(message.evaluatorPublicKey);
298
- let u = options.writeUnknownFields;
299
- if (u !== false)
300
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
301
- return writer;
302
- }
303
- }
304
- /**
305
- * @generated MessageType for protobuf message sid.v1.authn.PasswordHistoryDomain
306
- */
307
- export const PasswordHistoryDomain = new PasswordHistoryDomain$Type();
308
- // @generated message type with reflection information, may provide speed optimized methods
309
- class EvaluatePasswordHistoryRequest$Type extends MessageType<EvaluatePasswordHistoryRequest> {
310
- constructor() {
311
- super("sid.v1.authn.EvaluatePasswordHistoryRequest", [
312
- { no: 1, name: "operation_id", kind: "message", T: () => PasswordOperationId },
313
- { no: 2, name: "blinded_input", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }
314
- ]);
315
- }
316
- create(value?: PartialMessage<EvaluatePasswordHistoryRequest>): EvaluatePasswordHistoryRequest {
317
- const message = globalThis.Object.create((this.messagePrototype!));
318
- message.blindedInput = new Uint8Array(0);
319
- if (value !== undefined)
320
- reflectionMergePartial<EvaluatePasswordHistoryRequest>(this, message, value);
321
- return message;
322
- }
323
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EvaluatePasswordHistoryRequest): EvaluatePasswordHistoryRequest {
324
- let message = target ?? this.create(), end = reader.pos + length;
325
- while (reader.pos < end) {
326
- let [fieldNo, wireType] = reader.tag();
327
- switch (fieldNo) {
328
- case /* sid.v1.ids.PasswordOperationId operation_id */ 1:
329
- message.operationId = PasswordOperationId.internalBinaryRead(reader, reader.uint32(), options, message.operationId);
330
- break;
331
- case /* bytes blinded_input */ 2:
332
- message.blindedInput = reader.bytes();
333
- break;
334
- default:
335
- let u = options.readUnknownField;
336
- if (u === "throw")
337
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
338
- let d = reader.skip(wireType);
339
- if (u !== false)
340
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
341
- }
342
- }
343
- return message;
344
- }
345
- internalBinaryWrite(message: EvaluatePasswordHistoryRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
346
- /* sid.v1.ids.PasswordOperationId operation_id = 1; */
347
- if (message.operationId)
348
- PasswordOperationId.internalBinaryWrite(message.operationId, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
349
- /* bytes blinded_input = 2; */
350
- if (message.blindedInput.length)
351
- writer.tag(2, WireType.LengthDelimited).bytes(message.blindedInput);
352
- let u = options.writeUnknownFields;
353
- if (u !== false)
354
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
355
- return writer;
356
- }
357
- }
358
- /**
359
- * @generated MessageType for protobuf message sid.v1.authn.EvaluatePasswordHistoryRequest
360
- */
361
- export const EvaluatePasswordHistoryRequest = new EvaluatePasswordHistoryRequest$Type();
362
- // @generated message type with reflection information, may provide speed optimized methods
363
- class EvaluatePasswordHistoryResponse$Type extends MessageType<EvaluatePasswordHistoryResponse> {
364
- constructor() {
365
- super("sid.v1.authn.EvaluatePasswordHistoryResponse", [
366
- { no: 1, name: "evaluations", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => PasswordHistoryEvaluation }
367
- ]);
368
- }
369
- create(value?: PartialMessage<EvaluatePasswordHistoryResponse>): EvaluatePasswordHistoryResponse {
370
- const message = globalThis.Object.create((this.messagePrototype!));
371
- message.evaluations = [];
372
- if (value !== undefined)
373
- reflectionMergePartial<EvaluatePasswordHistoryResponse>(this, message, value);
374
- return message;
375
- }
376
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EvaluatePasswordHistoryResponse): EvaluatePasswordHistoryResponse {
377
- let message = target ?? this.create(), end = reader.pos + length;
378
- while (reader.pos < end) {
379
- let [fieldNo, wireType] = reader.tag();
380
- switch (fieldNo) {
381
- case /* repeated sid.v1.authn.PasswordHistoryEvaluation evaluations */ 1:
382
- message.evaluations.push(PasswordHistoryEvaluation.internalBinaryRead(reader, reader.uint32(), options));
383
- break;
384
- default:
385
- let u = options.readUnknownField;
386
- if (u === "throw")
387
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
388
- let d = reader.skip(wireType);
389
- if (u !== false)
390
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
391
- }
392
- }
393
- return message;
394
- }
395
- internalBinaryWrite(message: EvaluatePasswordHistoryResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
396
- /* repeated sid.v1.authn.PasswordHistoryEvaluation evaluations = 1; */
397
- for (let i = 0; i < message.evaluations.length; i++)
398
- PasswordHistoryEvaluation.internalBinaryWrite(message.evaluations[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
399
- let u = options.writeUnknownFields;
400
- if (u !== false)
401
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
402
- return writer;
403
- }
404
- }
405
- /**
406
- * @generated MessageType for protobuf message sid.v1.authn.EvaluatePasswordHistoryResponse
407
- */
408
- export const EvaluatePasswordHistoryResponse = new EvaluatePasswordHistoryResponse$Type();
409
- // @generated message type with reflection information, may provide speed optimized methods
410
- class PasswordHistoryEvaluation$Type extends MessageType<PasswordHistoryEvaluation> {
411
- constructor() {
412
- super("sid.v1.authn.PasswordHistoryEvaluation", [
413
- { no: 1, name: "evaluated_element", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
414
- { no: 2, name: "proof", kind: "message", T: () => PasswordHistoryEvaluationProof }
415
- ]);
416
- }
417
- create(value?: PartialMessage<PasswordHistoryEvaluation>): PasswordHistoryEvaluation {
418
- const message = globalThis.Object.create((this.messagePrototype!));
419
- message.evaluatedElement = new Uint8Array(0);
420
- if (value !== undefined)
421
- reflectionMergePartial<PasswordHistoryEvaluation>(this, message, value);
422
- return message;
423
- }
424
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PasswordHistoryEvaluation): PasswordHistoryEvaluation {
425
- let message = target ?? this.create(), end = reader.pos + length;
426
- while (reader.pos < end) {
427
- let [fieldNo, wireType] = reader.tag();
428
- switch (fieldNo) {
429
- case /* bytes evaluated_element */ 1:
430
- message.evaluatedElement = reader.bytes();
431
- break;
432
- case /* sid.v1.authn.PasswordHistoryEvaluationProof proof */ 2:
433
- message.proof = PasswordHistoryEvaluationProof.internalBinaryRead(reader, reader.uint32(), options, message.proof);
434
- break;
435
- default:
436
- let u = options.readUnknownField;
437
- if (u === "throw")
438
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
439
- let d = reader.skip(wireType);
440
- if (u !== false)
441
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
442
- }
443
- }
444
- return message;
445
- }
446
- internalBinaryWrite(message: PasswordHistoryEvaluation, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
447
- /* bytes evaluated_element = 1; */
448
- if (message.evaluatedElement.length)
449
- writer.tag(1, WireType.LengthDelimited).bytes(message.evaluatedElement);
450
- /* sid.v1.authn.PasswordHistoryEvaluationProof proof = 2; */
451
- if (message.proof)
452
- PasswordHistoryEvaluationProof.internalBinaryWrite(message.proof, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
453
- let u = options.writeUnknownFields;
454
- if (u !== false)
455
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
456
- return writer;
457
- }
458
- }
459
- /**
460
- * @generated MessageType for protobuf message sid.v1.authn.PasswordHistoryEvaluation
461
- */
462
- export const PasswordHistoryEvaluation = new PasswordHistoryEvaluation$Type();
463
- // @generated message type with reflection information, may provide speed optimized methods
464
- class PasswordHistoryEvaluationProof$Type extends MessageType<PasswordHistoryEvaluationProof> {
465
- constructor() {
466
- super("sid.v1.authn.PasswordHistoryEvaluationProof", [
467
- { no: 1, name: "challenge", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
468
- { no: 2, name: "response", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }
469
- ]);
470
- }
471
- create(value?: PartialMessage<PasswordHistoryEvaluationProof>): PasswordHistoryEvaluationProof {
472
- const message = globalThis.Object.create((this.messagePrototype!));
473
- message.challenge = new Uint8Array(0);
474
- message.response = new Uint8Array(0);
475
- if (value !== undefined)
476
- reflectionMergePartial<PasswordHistoryEvaluationProof>(this, message, value);
477
- return message;
478
- }
479
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PasswordHistoryEvaluationProof): PasswordHistoryEvaluationProof {
480
- let message = target ?? this.create(), end = reader.pos + length;
481
- while (reader.pos < end) {
482
- let [fieldNo, wireType] = reader.tag();
483
- switch (fieldNo) {
484
- case /* bytes challenge */ 1:
485
- message.challenge = reader.bytes();
486
- break;
487
- case /* bytes response */ 2:
488
- message.response = reader.bytes();
489
- break;
490
- default:
491
- let u = options.readUnknownField;
492
- if (u === "throw")
493
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
494
- let d = reader.skip(wireType);
495
- if (u !== false)
496
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
497
- }
498
- }
499
- return message;
500
- }
501
- internalBinaryWrite(message: PasswordHistoryEvaluationProof, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
502
- /* bytes challenge = 1; */
503
- if (message.challenge.length)
504
- writer.tag(1, WireType.LengthDelimited).bytes(message.challenge);
505
- /* bytes response = 2; */
506
- if (message.response.length)
507
- writer.tag(2, WireType.LengthDelimited).bytes(message.response);
508
- let u = options.writeUnknownFields;
509
- if (u !== false)
510
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
511
- return writer;
512
- }
513
- }
514
- /**
515
- * @generated MessageType for protobuf message sid.v1.authn.PasswordHistoryEvaluationProof
516
- */
517
- export const PasswordHistoryEvaluationProof = new PasswordHistoryEvaluationProof$Type();
518
- // @generated message type with reflection information, may provide speed optimized methods
519
- class PasswordRegistrationProof$Type extends MessageType<PasswordRegistrationProof> {
520
- constructor() {
521
- super("sid.v1.authn.PasswordRegistrationProof", [
522
- { no: 1, name: "zkpp_proof", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
523
- { no: 2, name: "instances", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ }
524
- ]);
525
- }
526
- create(value?: PartialMessage<PasswordRegistrationProof>): PasswordRegistrationProof {
527
- const message = globalThis.Object.create((this.messagePrototype!));
528
- message.zkppProof = new Uint8Array(0);
529
- message.instances = [];
530
- if (value !== undefined)
531
- reflectionMergePartial<PasswordRegistrationProof>(this, message, value);
532
- return message;
533
- }
534
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PasswordRegistrationProof): PasswordRegistrationProof {
535
- let message = target ?? this.create(), end = reader.pos + length;
536
- while (reader.pos < end) {
537
- let [fieldNo, wireType] = reader.tag();
538
- switch (fieldNo) {
539
- case /* bytes zkpp_proof */ 1:
540
- message.zkppProof = reader.bytes();
541
- break;
542
- case /* repeated bytes instances */ 2:
543
- message.instances.push(reader.bytes());
544
- break;
545
- default:
546
- let u = options.readUnknownField;
547
- if (u === "throw")
548
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
549
- let d = reader.skip(wireType);
550
- if (u !== false)
551
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
552
- }
553
- }
554
- return message;
555
- }
556
- internalBinaryWrite(message: PasswordRegistrationProof, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
557
- /* bytes zkpp_proof = 1; */
558
- if (message.zkppProof.length)
559
- writer.tag(1, WireType.LengthDelimited).bytes(message.zkppProof);
560
- /* repeated bytes instances = 2; */
561
- for (let i = 0; i < message.instances.length; i++)
562
- writer.tag(2, WireType.LengthDelimited).bytes(message.instances[i]);
563
- let u = options.writeUnknownFields;
564
- if (u !== false)
565
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
566
- return writer;
567
- }
568
- }
569
- /**
570
- * @generated MessageType for protobuf message sid.v1.authn.PasswordRegistrationProof
571
- */
572
- export const PasswordRegistrationProof = new PasswordRegistrationProof$Type();
573
- /**
574
- * @generated ServiceType for protobuf service sid.v1.authn.PasswordHistoryEvaluatorService
575
- */
576
- export const PasswordHistoryEvaluatorService = new ServiceType("sid.v1.authn.PasswordHistoryEvaluatorService", [
577
- { name: "EvaluatePasswordHistory", idempotency: "IDEMPOTENT", options: { "google.api.http": { post: "/v1/auth/password-history/evaluate", body: "*" } }, I: EvaluatePasswordHistoryRequest, O: EvaluatePasswordHistoryResponse }
578
- ]);