@structured-id/ui-core 1.2.0 → 1.3.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 (101) hide show
  1. package/README.md +9 -5
  2. package/dist/browser-vp/index.d.cts +0 -11
  3. package/dist/browser-vp/index.d.ts +0 -11
  4. package/dist/index.cjs +13721 -9514
  5. package/dist/index.d.cts +4362 -2375
  6. package/dist/index.d.ts +4362 -2375
  7. package/dist/index.js +13937 -9730
  8. package/package.json +3 -3
  9. package/src/browser-vp/crypto.ts +0 -1
  10. package/src/browser-vp/index.ts +0 -2
  11. package/src/browser-vp/prf.ts +0 -2
  12. package/src/browser-vp/storage.ts +0 -2
  13. package/src/browser-vp/types.ts +0 -2
  14. package/src/browser-vp/vp.ts +0 -2
  15. package/src/composables/index.ts +6 -1
  16. package/src/composables/useAccountTransport.test.ts +121 -0
  17. package/src/composables/useAccountTransport.ts +69 -0
  18. package/src/composables/useBffAuth.ts +44 -34
  19. package/src/generated/google/api/httpbody.ts +159 -0
  20. package/src/generated/google/protobuf/any.ts +326 -0
  21. package/src/generated/google/rpc/error_details.ts +1386 -0
  22. package/src/generated/google/rpc/status.ts +127 -0
  23. package/src/generated/sid/v1/account/account.ts +1 -1
  24. package/src/generated/sid/v1/admin/admin.client.ts +15 -12
  25. package/src/generated/sid/v1/admin/admin.ts +24 -89
  26. package/src/generated/sid/v1/admin/enrollment.client.ts +24 -12
  27. package/src/generated/sid/v1/admin/enrollment.ts +65 -3
  28. package/src/generated/sid/v1/admin/events.client.ts +8 -8
  29. package/src/generated/sid/v1/admin/flow.ts +1 -1
  30. package/src/generated/sid/v1/admin/keys.ts +1 -1
  31. package/src/generated/sid/v1/admin/notifications.client.ts +12 -6
  32. package/src/generated/sid/v1/admin/notifications.ts +11 -70
  33. package/src/generated/sid/v1/admin/operations.ts +20 -35
  34. package/src/generated/sid/v1/admin/organizations.client.ts +2 -2
  35. package/src/generated/sid/v1/admin/organizations.ts +15 -32
  36. package/src/generated/sid/v1/admin/provisioning.client.ts +232 -0
  37. package/src/generated/sid/v1/admin/provisioning.ts +1383 -0
  38. package/src/generated/sid/v1/admin/scopes.ts +1 -1
  39. package/src/generated/sid/v1/admin/security.client.ts +22 -24
  40. package/src/generated/sid/v1/admin/security.ts +13 -22
  41. package/src/generated/sid/v1/admin/settings.client.ts +29 -18
  42. package/src/generated/sid/v1/admin/settings.ts +2 -82
  43. package/src/generated/sid/v1/attestation/attestation.client.ts +6 -6
  44. package/src/generated/sid/v1/attestation/attestation.ts +8 -8
  45. package/src/generated/sid/v1/authn/auth.client.ts +101 -58
  46. package/src/generated/sid/v1/authn/auth.ts +842 -414
  47. package/src/generated/sid/v1/authn/flows.ts +0 -12
  48. package/src/generated/sid/v1/authn/issuer.client.ts +489 -0
  49. package/src/generated/sid/v1/authn/issuer.ts +1600 -0
  50. package/src/generated/sid/v1/authn/password_history.client.ts +57 -0
  51. package/src/generated/sid/v1/authn/password_history.ts +578 -0
  52. package/src/generated/sid/v1/authn/system_integration.client.ts +73 -0
  53. package/src/generated/sid/v1/authn/system_integration.ts +218 -0
  54. package/src/generated/sid/v1/authz/authz.ts +1498 -317
  55. package/src/generated/sid/v1/authz/forward_auth.client.ts +97 -0
  56. package/src/generated/sid/v1/authz/forward_auth.ts +79 -0
  57. package/src/generated/sid/v1/authz/governance.client.ts +2 -2
  58. package/src/generated/sid/v1/authz/governance.ts +61 -4
  59. package/src/generated/sid/v1/common/errors.ts +532 -6
  60. package/src/generated/sid/v1/events/event_stream.client.ts +2 -2
  61. package/src/generated/sid/v1/events/event_stream.ts +2 -1
  62. package/src/generated/sid/v1/identity/identity.ts +98 -58
  63. package/src/generated/sid/v1/ids/ids.ts +395 -0
  64. package/src/generated/sid/v1/machine/machine_user.ts +0 -36
  65. package/src/generated/sid/v1/machine/pat.client.ts +2 -19
  66. package/src/generated/sid/v1/machine/pat.ts +1 -186
  67. package/src/generated/sid/v1/projects/projects.client.ts +137 -19
  68. package/src/generated/sid/v1/projects/projects.ts +2105 -405
  69. package/src/generated/sid/v1/scim/scim.client.ts +248 -2
  70. package/src/generated/sid/v1/scim/scim.ts +153 -14
  71. package/src/generated/sid/v1/test/test.ts +1 -1
  72. package/src/i18n/index.ts +0 -11
  73. package/src/index.ts +36 -2
  74. package/src/package-exports.test.ts +18 -0
  75. package/src/profile/components/SidLoginForm.vue +5 -2
  76. package/src/profile/components/SidRegistrationForm.test.ts +58 -1
  77. package/src/profile/components/SidRegistrationForm.vue +110 -12
  78. package/src/profile/components/index.ts +4 -0
  79. package/src/profile/composables/index.ts +2 -1
  80. package/src/profile/composables/useAccountApi.ts +20 -7
  81. package/src/profile/composables/useAuth.test.ts +453 -0
  82. package/src/profile/composables/useAuth.ts +414 -0
  83. package/src/profile/composables/useAuthApi.opaque.test.ts +18 -0
  84. package/src/profile/composables/useAuthApi.ts +188 -20
  85. package/src/profile/composables/useEnrollmentApi.test.ts +33 -0
  86. package/src/profile/composables/useEnrollmentApi.ts +26 -0
  87. package/src/profile/composables/useIdentityApi.ts +17 -7
  88. package/src/profile/composables/useLoginSuccess.test.ts +97 -3
  89. package/src/profile/composables/useLoginSuccess.ts +80 -22
  90. package/src/profile/composables/useSecurityLevel.test.ts +10 -3
  91. package/src/profile/composables/useSecurityLevel.ts +12 -3
  92. package/src/quasar/SidPrincipalInput.vue +4 -7
  93. package/src/utils/normalizePrincipal.test.ts +19 -5
  94. package/src/utils/normalizePrincipal.ts +7 -9
  95. package/src/utils/rpcRefusal.test.ts +151 -0
  96. package/src/utils/rpcRefusal.ts +252 -0
  97. package/src/utils/validators.test.ts +9 -0
  98. package/src/utils/validators.ts +14 -2
  99. package/src/composables/useAuth.ts +0 -40
  100. package/src/profile/composables/useOpaqueAuth.test.ts +0 -290
  101. package/src/profile/composables/useOpaqueAuth.ts +0 -191
@@ -1,6 +1,9 @@
1
1
  // @generated by protobuf-ts 2.11.1 with parameter client_generic,generate_dependencies
2
2
  // @generated from protobuf file "sid/v1/scim/scim.proto" (package "sid.v1.scim", syntax proto3)
3
3
  // tslint:disable
4
+ import { ScimProtocolService } from "./scim";
5
+ import type { HttpBody } from "../../../google/api/httpbody";
6
+ import type { ScimHttpRequest } from "./scim";
4
7
  import type { RpcTransport } from "@protobuf-ts/runtime-rpc";
5
8
  import type { ServiceInfo } from "@protobuf-ts/runtime-rpc";
6
9
  import { ScimService } from "./scim";
@@ -31,7 +34,9 @@ import type { UnaryCall } from "@protobuf-ts/runtime-rpc";
31
34
  import type { RpcOptions } from "@protobuf-ts/runtime-rpc";
32
35
  /**
33
36
  * ScimService implements SCIM 2.0 inbound provisioning (HR → SID).
34
- * Creates/updates/deactivates corporate profiles and groups.
37
+ * Creates/updates/deactivates corporate profiles and groups. Typed gRPC
38
+ * only: SCIM clients speak HTTP through ScimProtocolService, which reads and
39
+ * writes the RFC 7643/7644 JSON and calls these same operations.
35
40
  *
36
41
  * ── Users (RFC 7644 §3.3–§3.6) ──
37
42
  *
@@ -129,7 +134,9 @@ export interface IScimServiceClient {
129
134
  }
130
135
  /**
131
136
  * ScimService implements SCIM 2.0 inbound provisioning (HR → SID).
132
- * Creates/updates/deactivates corporate profiles and groups.
137
+ * Creates/updates/deactivates corporate profiles and groups. Typed gRPC
138
+ * only: SCIM clients speak HTTP through ScimProtocolService, which reads and
139
+ * writes the RFC 7643/7644 JSON and calls these same operations.
133
140
  *
134
141
  * ── Users (RFC 7644 §3.3–§3.6) ──
135
142
  *
@@ -272,3 +279,242 @@ export class ScimServiceClient implements IScimServiceClient, ServiceInfo {
272
279
  return stackIntercept<ScimGetSchemasRequest, ScimSchemasResponse>("unary", this._transport, method, opt, input);
273
280
  }
274
281
  }
282
+ /**
283
+ * The SCIM 2.0 HTTP endpoint (RFC 7644) for independent SCIM clients. Each
284
+ * RPC reads the request in its RFC 7643/7644 JSON (`application/scim+json`,
285
+ * also `application/json`, RFC 7644 §3.1) and answers with the RFC's JSON,
286
+ * status and headers: 201 and `Location` for a created resource (§3.3), 204
287
+ * for a deletion (§3.6), the §3.12 error body for a refusal. The operations
288
+ * are those of ScimService, with the same authentication and authorization.
289
+ *
290
+ * @generated from protobuf service sid.v1.scim.ScimProtocolService
291
+ */
292
+ export interface IScimProtocolServiceClient {
293
+ /**
294
+ * Create a user (RFC 7644 §3.3).
295
+ *
296
+ * @generated from protobuf rpc: CreateUser
297
+ */
298
+ createUser(input: ScimHttpRequest, options?: RpcOptions): UnaryCall<ScimHttpRequest, HttpBody>;
299
+ /**
300
+ * Read a user (RFC 7644 §3.4.1).
301
+ *
302
+ * @generated from protobuf rpc: GetUser
303
+ */
304
+ getUser(input: ScimHttpRequest, options?: RpcOptions): UnaryCall<ScimHttpRequest, HttpBody>;
305
+ /**
306
+ * Query users (RFC 7644 §3.4.2).
307
+ *
308
+ * @generated from protobuf rpc: ListUsers
309
+ */
310
+ listUsers(input: ScimHttpRequest, options?: RpcOptions): UnaryCall<ScimHttpRequest, HttpBody>;
311
+ /**
312
+ * Replace a user (RFC 7644 §3.5.1).
313
+ *
314
+ * @generated from protobuf rpc: ReplaceUser
315
+ */
316
+ replaceUser(input: ScimHttpRequest, options?: RpcOptions): UnaryCall<ScimHttpRequest, HttpBody>;
317
+ /**
318
+ * Modify a user (RFC 7644 §3.5.2).
319
+ *
320
+ * @generated from protobuf rpc: PatchUser
321
+ */
322
+ patchUser(input: ScimHttpRequest, options?: RpcOptions): UnaryCall<ScimHttpRequest, HttpBody>;
323
+ /**
324
+ * Delete a user (RFC 7644 §3.6).
325
+ *
326
+ * @generated from protobuf rpc: DeleteUser
327
+ */
328
+ deleteUser(input: ScimHttpRequest, options?: RpcOptions): UnaryCall<ScimHttpRequest, HttpBody>;
329
+ /**
330
+ * Create a group (RFC 7644 §3.3).
331
+ *
332
+ * @generated from protobuf rpc: CreateGroup
333
+ */
334
+ createGroup(input: ScimHttpRequest, options?: RpcOptions): UnaryCall<ScimHttpRequest, HttpBody>;
335
+ /**
336
+ * Read a group (RFC 7644 §3.4.1).
337
+ *
338
+ * @generated from protobuf rpc: GetGroup
339
+ */
340
+ getGroup(input: ScimHttpRequest, options?: RpcOptions): UnaryCall<ScimHttpRequest, HttpBody>;
341
+ /**
342
+ * Query groups (RFC 7644 §3.4.2).
343
+ *
344
+ * @generated from protobuf rpc: ListGroups
345
+ */
346
+ listGroups(input: ScimHttpRequest, options?: RpcOptions): UnaryCall<ScimHttpRequest, HttpBody>;
347
+ /**
348
+ * Modify a group (RFC 7644 §3.5.2).
349
+ *
350
+ * @generated from protobuf rpc: PatchGroup
351
+ */
352
+ patchGroup(input: ScimHttpRequest, options?: RpcOptions): UnaryCall<ScimHttpRequest, HttpBody>;
353
+ /**
354
+ * Delete a group (RFC 7644 §3.6).
355
+ *
356
+ * @generated from protobuf rpc: DeleteGroup
357
+ */
358
+ deleteGroup(input: ScimHttpRequest, options?: RpcOptions): UnaryCall<ScimHttpRequest, HttpBody>;
359
+ /**
360
+ * The service provider configuration (RFC 7644 §4, RFC 7643 §5).
361
+ *
362
+ * @generated from protobuf rpc: GetServiceProviderConfig
363
+ */
364
+ getServiceProviderConfig(input: ScimHttpRequest, options?: RpcOptions): UnaryCall<ScimHttpRequest, HttpBody>;
365
+ /**
366
+ * The resource types (RFC 7644 §4, RFC 7643 §6).
367
+ *
368
+ * @generated from protobuf rpc: GetResourceTypes
369
+ */
370
+ getResourceTypes(input: ScimHttpRequest, options?: RpcOptions): UnaryCall<ScimHttpRequest, HttpBody>;
371
+ /**
372
+ * The schemas (RFC 7644 §4, RFC 7643 §7).
373
+ *
374
+ * @generated from protobuf rpc: GetSchemas
375
+ */
376
+ getSchemas(input: ScimHttpRequest, options?: RpcOptions): UnaryCall<ScimHttpRequest, HttpBody>;
377
+ }
378
+ /**
379
+ * The SCIM 2.0 HTTP endpoint (RFC 7644) for independent SCIM clients. Each
380
+ * RPC reads the request in its RFC 7643/7644 JSON (`application/scim+json`,
381
+ * also `application/json`, RFC 7644 §3.1) and answers with the RFC's JSON,
382
+ * status and headers: 201 and `Location` for a created resource (§3.3), 204
383
+ * for a deletion (§3.6), the §3.12 error body for a refusal. The operations
384
+ * are those of ScimService, with the same authentication and authorization.
385
+ *
386
+ * @generated from protobuf service sid.v1.scim.ScimProtocolService
387
+ */
388
+ export class ScimProtocolServiceClient implements IScimProtocolServiceClient, ServiceInfo {
389
+ typeName = ScimProtocolService.typeName;
390
+ methods = ScimProtocolService.methods;
391
+ options = ScimProtocolService.options;
392
+ constructor(private readonly _transport: RpcTransport) {
393
+ }
394
+ /**
395
+ * Create a user (RFC 7644 §3.3).
396
+ *
397
+ * @generated from protobuf rpc: CreateUser
398
+ */
399
+ createUser(input: ScimHttpRequest, options?: RpcOptions): UnaryCall<ScimHttpRequest, HttpBody> {
400
+ const method = this.methods[0], opt = this._transport.mergeOptions(options);
401
+ return stackIntercept<ScimHttpRequest, HttpBody>("unary", this._transport, method, opt, input);
402
+ }
403
+ /**
404
+ * Read a user (RFC 7644 §3.4.1).
405
+ *
406
+ * @generated from protobuf rpc: GetUser
407
+ */
408
+ getUser(input: ScimHttpRequest, options?: RpcOptions): UnaryCall<ScimHttpRequest, HttpBody> {
409
+ const method = this.methods[1], opt = this._transport.mergeOptions(options);
410
+ return stackIntercept<ScimHttpRequest, HttpBody>("unary", this._transport, method, opt, input);
411
+ }
412
+ /**
413
+ * Query users (RFC 7644 §3.4.2).
414
+ *
415
+ * @generated from protobuf rpc: ListUsers
416
+ */
417
+ listUsers(input: ScimHttpRequest, options?: RpcOptions): UnaryCall<ScimHttpRequest, HttpBody> {
418
+ const method = this.methods[2], opt = this._transport.mergeOptions(options);
419
+ return stackIntercept<ScimHttpRequest, HttpBody>("unary", this._transport, method, opt, input);
420
+ }
421
+ /**
422
+ * Replace a user (RFC 7644 §3.5.1).
423
+ *
424
+ * @generated from protobuf rpc: ReplaceUser
425
+ */
426
+ replaceUser(input: ScimHttpRequest, options?: RpcOptions): UnaryCall<ScimHttpRequest, HttpBody> {
427
+ const method = this.methods[3], opt = this._transport.mergeOptions(options);
428
+ return stackIntercept<ScimHttpRequest, HttpBody>("unary", this._transport, method, opt, input);
429
+ }
430
+ /**
431
+ * Modify a user (RFC 7644 §3.5.2).
432
+ *
433
+ * @generated from protobuf rpc: PatchUser
434
+ */
435
+ patchUser(input: ScimHttpRequest, options?: RpcOptions): UnaryCall<ScimHttpRequest, HttpBody> {
436
+ const method = this.methods[4], opt = this._transport.mergeOptions(options);
437
+ return stackIntercept<ScimHttpRequest, HttpBody>("unary", this._transport, method, opt, input);
438
+ }
439
+ /**
440
+ * Delete a user (RFC 7644 §3.6).
441
+ *
442
+ * @generated from protobuf rpc: DeleteUser
443
+ */
444
+ deleteUser(input: ScimHttpRequest, options?: RpcOptions): UnaryCall<ScimHttpRequest, HttpBody> {
445
+ const method = this.methods[5], opt = this._transport.mergeOptions(options);
446
+ return stackIntercept<ScimHttpRequest, HttpBody>("unary", this._transport, method, opt, input);
447
+ }
448
+ /**
449
+ * Create a group (RFC 7644 §3.3).
450
+ *
451
+ * @generated from protobuf rpc: CreateGroup
452
+ */
453
+ createGroup(input: ScimHttpRequest, options?: RpcOptions): UnaryCall<ScimHttpRequest, HttpBody> {
454
+ const method = this.methods[6], opt = this._transport.mergeOptions(options);
455
+ return stackIntercept<ScimHttpRequest, HttpBody>("unary", this._transport, method, opt, input);
456
+ }
457
+ /**
458
+ * Read a group (RFC 7644 §3.4.1).
459
+ *
460
+ * @generated from protobuf rpc: GetGroup
461
+ */
462
+ getGroup(input: ScimHttpRequest, options?: RpcOptions): UnaryCall<ScimHttpRequest, HttpBody> {
463
+ const method = this.methods[7], opt = this._transport.mergeOptions(options);
464
+ return stackIntercept<ScimHttpRequest, HttpBody>("unary", this._transport, method, opt, input);
465
+ }
466
+ /**
467
+ * Query groups (RFC 7644 §3.4.2).
468
+ *
469
+ * @generated from protobuf rpc: ListGroups
470
+ */
471
+ listGroups(input: ScimHttpRequest, options?: RpcOptions): UnaryCall<ScimHttpRequest, HttpBody> {
472
+ const method = this.methods[8], opt = this._transport.mergeOptions(options);
473
+ return stackIntercept<ScimHttpRequest, HttpBody>("unary", this._transport, method, opt, input);
474
+ }
475
+ /**
476
+ * Modify a group (RFC 7644 §3.5.2).
477
+ *
478
+ * @generated from protobuf rpc: PatchGroup
479
+ */
480
+ patchGroup(input: ScimHttpRequest, options?: RpcOptions): UnaryCall<ScimHttpRequest, HttpBody> {
481
+ const method = this.methods[9], opt = this._transport.mergeOptions(options);
482
+ return stackIntercept<ScimHttpRequest, HttpBody>("unary", this._transport, method, opt, input);
483
+ }
484
+ /**
485
+ * Delete a group (RFC 7644 §3.6).
486
+ *
487
+ * @generated from protobuf rpc: DeleteGroup
488
+ */
489
+ deleteGroup(input: ScimHttpRequest, options?: RpcOptions): UnaryCall<ScimHttpRequest, HttpBody> {
490
+ const method = this.methods[10], opt = this._transport.mergeOptions(options);
491
+ return stackIntercept<ScimHttpRequest, HttpBody>("unary", this._transport, method, opt, input);
492
+ }
493
+ /**
494
+ * The service provider configuration (RFC 7644 §4, RFC 7643 §5).
495
+ *
496
+ * @generated from protobuf rpc: GetServiceProviderConfig
497
+ */
498
+ getServiceProviderConfig(input: ScimHttpRequest, options?: RpcOptions): UnaryCall<ScimHttpRequest, HttpBody> {
499
+ const method = this.methods[11], opt = this._transport.mergeOptions(options);
500
+ return stackIntercept<ScimHttpRequest, HttpBody>("unary", this._transport, method, opt, input);
501
+ }
502
+ /**
503
+ * The resource types (RFC 7644 §4, RFC 7643 §6).
504
+ *
505
+ * @generated from protobuf rpc: GetResourceTypes
506
+ */
507
+ getResourceTypes(input: ScimHttpRequest, options?: RpcOptions): UnaryCall<ScimHttpRequest, HttpBody> {
508
+ const method = this.methods[12], opt = this._transport.mergeOptions(options);
509
+ return stackIntercept<ScimHttpRequest, HttpBody>("unary", this._transport, method, opt, input);
510
+ }
511
+ /**
512
+ * The schemas (RFC 7644 §4, RFC 7643 §7).
513
+ *
514
+ * @generated from protobuf rpc: GetSchemas
515
+ */
516
+ getSchemas(input: ScimHttpRequest, options?: RpcOptions): UnaryCall<ScimHttpRequest, HttpBody> {
517
+ const method = this.methods[13], opt = this._transport.mergeOptions(options);
518
+ return stackIntercept<ScimHttpRequest, HttpBody>("unary", this._transport, method, opt, input);
519
+ }
520
+ }
@@ -13,6 +13,49 @@ import type { PartialMessage } from "@protobuf-ts/runtime";
13
13
  import { reflectionMergePartial } from "@protobuf-ts/runtime";
14
14
  import { MessageType } from "@protobuf-ts/runtime";
15
15
  import { Timestamp } from "../../../google/protobuf/timestamp";
16
+ import { HttpBody } from "../../../google/api/httpbody";
17
+ /**
18
+ * A request to the SCIM HTTP endpoint: what its path, query and body carry.
19
+ *
20
+ * @generated from protobuf message sid.v1.scim.ScimHttpRequest
21
+ */
22
+ export interface ScimHttpRequest {
23
+ /**
24
+ * The resource identifier from the path (`/Users/{id}`, `/Groups/{id}`);
25
+ * empty for an endpoint without one.
26
+ *
27
+ * @generated from protobuf field: string id = 1
28
+ */
29
+ id: string;
30
+ /**
31
+ * The request body as the client sent it, with its `Content-Type`; absent
32
+ * for a request without one (GET, DELETE).
33
+ *
34
+ * @generated from protobuf field: google.api.HttpBody body = 2
35
+ */
36
+ body?: HttpBody;
37
+ /**
38
+ * The `filter` query parameter of a query (RFC 7644 §3.4.2.2).
39
+ *
40
+ * @generated from protobuf field: string filter = 3
41
+ */
42
+ filter: string;
43
+ /**
44
+ * The `startIndex` query parameter: the 1-based index of the first result
45
+ * (RFC 7644 §3.4.2.4); 0 when absent, read as 1.
46
+ *
47
+ * @generated from protobuf field: int32 start_index = 4
48
+ */
49
+ startIndex: number;
50
+ /**
51
+ * The `count` query parameter: the most results wanted (RFC 7644
52
+ * §3.4.2.4); absent means the service provider's default, and 0 asks for
53
+ * `totalResults` alone.
54
+ *
55
+ * @generated from protobuf field: optional int32 count = 5
56
+ */
57
+ count?: number;
58
+ }
16
59
  // ── User Messages ──
17
60
 
18
61
  /**
@@ -755,6 +798,83 @@ export interface ScimSchemaAttribute {
755
798
  subAttributes: ScimSchemaAttribute[];
756
799
  }
757
800
  // @generated message type with reflection information, may provide speed optimized methods
801
+ class ScimHttpRequest$Type extends MessageType<ScimHttpRequest> {
802
+ constructor() {
803
+ super("sid.v1.scim.ScimHttpRequest", [
804
+ { no: 1, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
805
+ { no: 2, name: "body", kind: "message", T: () => HttpBody },
806
+ { no: 3, name: "filter", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
807
+ { no: 4, name: "start_index", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
808
+ { no: 5, name: "count", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }
809
+ ]);
810
+ }
811
+ create(value?: PartialMessage<ScimHttpRequest>): ScimHttpRequest {
812
+ const message = globalThis.Object.create((this.messagePrototype!));
813
+ message.id = "";
814
+ message.filter = "";
815
+ message.startIndex = 0;
816
+ if (value !== undefined)
817
+ reflectionMergePartial<ScimHttpRequest>(this, message, value);
818
+ return message;
819
+ }
820
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ScimHttpRequest): ScimHttpRequest {
821
+ let message = target ?? this.create(), end = reader.pos + length;
822
+ while (reader.pos < end) {
823
+ let [fieldNo, wireType] = reader.tag();
824
+ switch (fieldNo) {
825
+ case /* string id */ 1:
826
+ message.id = reader.string();
827
+ break;
828
+ case /* google.api.HttpBody body */ 2:
829
+ message.body = HttpBody.internalBinaryRead(reader, reader.uint32(), options, message.body);
830
+ break;
831
+ case /* string filter */ 3:
832
+ message.filter = reader.string();
833
+ break;
834
+ case /* int32 start_index */ 4:
835
+ message.startIndex = reader.int32();
836
+ break;
837
+ case /* optional int32 count */ 5:
838
+ message.count = reader.int32();
839
+ break;
840
+ default:
841
+ let u = options.readUnknownField;
842
+ if (u === "throw")
843
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
844
+ let d = reader.skip(wireType);
845
+ if (u !== false)
846
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
847
+ }
848
+ }
849
+ return message;
850
+ }
851
+ internalBinaryWrite(message: ScimHttpRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
852
+ /* string id = 1; */
853
+ if (message.id !== "")
854
+ writer.tag(1, WireType.LengthDelimited).string(message.id);
855
+ /* google.api.HttpBody body = 2; */
856
+ if (message.body)
857
+ HttpBody.internalBinaryWrite(message.body, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
858
+ /* string filter = 3; */
859
+ if (message.filter !== "")
860
+ writer.tag(3, WireType.LengthDelimited).string(message.filter);
861
+ /* int32 start_index = 4; */
862
+ if (message.startIndex !== 0)
863
+ writer.tag(4, WireType.Varint).int32(message.startIndex);
864
+ /* optional int32 count = 5; */
865
+ if (message.count !== undefined)
866
+ writer.tag(5, WireType.Varint).int32(message.count);
867
+ let u = options.writeUnknownFields;
868
+ if (u !== false)
869
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
870
+ return writer;
871
+ }
872
+ }
873
+ /**
874
+ * @generated MessageType for protobuf message sid.v1.scim.ScimHttpRequest
875
+ */
876
+ export const ScimHttpRequest = new ScimHttpRequest$Type();
877
+ // @generated message type with reflection information, may provide speed optimized methods
758
878
  class ScimUser$Type extends MessageType<ScimUser> {
759
879
  constructor() {
760
880
  super("sid.v1.scim.ScimUser", [
@@ -3026,18 +3146,37 @@ export const ScimSchemaAttribute = new ScimSchemaAttribute$Type();
3026
3146
  * @generated ServiceType for protobuf service sid.v1.scim.ScimService
3027
3147
  */
3028
3148
  export const ScimService = new ServiceType("sid.v1.scim.ScimService", [
3029
- { name: "CreateUser", options: { "google.api.http": { post: "/scim/v2/Users", body: "*" } }, I: ScimCreateUserRequest, O: ScimUser },
3030
- { name: "GetUser", idempotency: "NO_SIDE_EFFECTS", options: { "google.api.http": { get: "/scim/v2/Users/{id}" } }, I: ScimGetUserRequest, O: ScimUser },
3031
- { name: "ListUsers", idempotency: "NO_SIDE_EFFECTS", options: { "google.api.http": { get: "/scim/v2/Users" } }, I: ScimListUsersRequest, O: ScimListUsersResponse },
3032
- { name: "ReplaceUser", options: { "google.api.http": { put: "/scim/v2/Users/{id}", body: "*" } }, I: ScimReplaceUserRequest, O: ScimUser },
3033
- { name: "PatchUser", options: { "google.api.http": { patch: "/scim/v2/Users/{id}", body: "*" } }, I: ScimPatchUserRequest, O: ScimUser },
3034
- { name: "DeleteUser", idempotency: "IDEMPOTENT", options: { "google.api.http": { delete: "/scim/v2/Users/{id}" } }, I: ScimDeleteUserRequest, O: Empty },
3035
- { name: "CreateGroup", options: { "google.api.http": { post: "/scim/v2/Groups", body: "*" } }, I: ScimCreateGroupRequest, O: ScimGroup },
3036
- { name: "GetGroup", idempotency: "NO_SIDE_EFFECTS", options: { "google.api.http": { get: "/scim/v2/Groups/{id}" } }, I: ScimGetGroupRequest, O: ScimGroup },
3037
- { name: "ListGroups", idempotency: "NO_SIDE_EFFECTS", options: { "google.api.http": { get: "/scim/v2/Groups" } }, I: ScimListGroupsRequest, O: ScimListGroupsResponse },
3038
- { name: "PatchGroup", options: { "google.api.http": { patch: "/scim/v2/Groups/{id}", body: "*" } }, I: ScimPatchGroupRequest, O: ScimGroup },
3039
- { name: "DeleteGroup", idempotency: "IDEMPOTENT", options: { "google.api.http": { delete: "/scim/v2/Groups/{id}" } }, I: ScimDeleteGroupRequest, O: Empty },
3040
- { name: "GetServiceProviderConfig", idempotency: "NO_SIDE_EFFECTS", options: { "google.api.http": { get: "/scim/v2/ServiceProviderConfig" } }, I: ScimGetServiceProviderConfigRequest, O: ScimServiceProviderConfig },
3041
- { name: "GetResourceTypes", idempotency: "NO_SIDE_EFFECTS", options: { "google.api.http": { get: "/scim/v2/ResourceTypes" } }, I: ScimGetResourceTypesRequest, O: ScimResourceTypesResponse },
3042
- { name: "GetSchemas", idempotency: "NO_SIDE_EFFECTS", options: { "google.api.http": { get: "/scim/v2/Schemas" } }, I: ScimGetSchemasRequest, O: ScimSchemasResponse }
3149
+ { name: "CreateUser", options: {}, I: ScimCreateUserRequest, O: ScimUser },
3150
+ { name: "GetUser", idempotency: "NO_SIDE_EFFECTS", options: {}, I: ScimGetUserRequest, O: ScimUser },
3151
+ { name: "ListUsers", idempotency: "NO_SIDE_EFFECTS", options: {}, I: ScimListUsersRequest, O: ScimListUsersResponse },
3152
+ { name: "ReplaceUser", options: {}, I: ScimReplaceUserRequest, O: ScimUser },
3153
+ { name: "PatchUser", options: {}, I: ScimPatchUserRequest, O: ScimUser },
3154
+ { name: "DeleteUser", idempotency: "IDEMPOTENT", options: {}, I: ScimDeleteUserRequest, O: Empty },
3155
+ { name: "CreateGroup", options: {}, I: ScimCreateGroupRequest, O: ScimGroup },
3156
+ { name: "GetGroup", idempotency: "NO_SIDE_EFFECTS", options: {}, I: ScimGetGroupRequest, O: ScimGroup },
3157
+ { name: "ListGroups", idempotency: "NO_SIDE_EFFECTS", options: {}, I: ScimListGroupsRequest, O: ScimListGroupsResponse },
3158
+ { name: "PatchGroup", options: {}, I: ScimPatchGroupRequest, O: ScimGroup },
3159
+ { name: "DeleteGroup", idempotency: "IDEMPOTENT", options: {}, I: ScimDeleteGroupRequest, O: Empty },
3160
+ { name: "GetServiceProviderConfig", idempotency: "NO_SIDE_EFFECTS", options: {}, I: ScimGetServiceProviderConfigRequest, O: ScimServiceProviderConfig },
3161
+ { name: "GetResourceTypes", idempotency: "NO_SIDE_EFFECTS", options: {}, I: ScimGetResourceTypesRequest, O: ScimResourceTypesResponse },
3162
+ { name: "GetSchemas", idempotency: "NO_SIDE_EFFECTS", options: {}, I: ScimGetSchemasRequest, O: ScimSchemasResponse }
3163
+ ]);
3164
+ /**
3165
+ * @generated ServiceType for protobuf service sid.v1.scim.ScimProtocolService
3166
+ */
3167
+ export const ScimProtocolService = new ServiceType("sid.v1.scim.ScimProtocolService", [
3168
+ { name: "CreateUser", options: { "google.api.http": { post: "/scim/v2/Users", body: "body" } }, I: ScimHttpRequest, O: HttpBody },
3169
+ { name: "GetUser", idempotency: "NO_SIDE_EFFECTS", options: { "google.api.http": { get: "/scim/v2/Users/{id}" } }, I: ScimHttpRequest, O: HttpBody },
3170
+ { name: "ListUsers", idempotency: "NO_SIDE_EFFECTS", options: { "google.api.http": { get: "/scim/v2/Users" } }, I: ScimHttpRequest, O: HttpBody },
3171
+ { name: "ReplaceUser", options: { "google.api.http": { put: "/scim/v2/Users/{id}", body: "body" } }, I: ScimHttpRequest, O: HttpBody },
3172
+ { name: "PatchUser", options: { "google.api.http": { patch: "/scim/v2/Users/{id}", body: "body" } }, I: ScimHttpRequest, O: HttpBody },
3173
+ { name: "DeleteUser", idempotency: "IDEMPOTENT", options: { "google.api.http": { delete: "/scim/v2/Users/{id}" } }, I: ScimHttpRequest, O: HttpBody },
3174
+ { name: "CreateGroup", options: { "google.api.http": { post: "/scim/v2/Groups", body: "body" } }, I: ScimHttpRequest, O: HttpBody },
3175
+ { name: "GetGroup", idempotency: "NO_SIDE_EFFECTS", options: { "google.api.http": { get: "/scim/v2/Groups/{id}" } }, I: ScimHttpRequest, O: HttpBody },
3176
+ { name: "ListGroups", idempotency: "NO_SIDE_EFFECTS", options: { "google.api.http": { get: "/scim/v2/Groups" } }, I: ScimHttpRequest, O: HttpBody },
3177
+ { name: "PatchGroup", options: { "google.api.http": { patch: "/scim/v2/Groups/{id}", body: "body" } }, I: ScimHttpRequest, O: HttpBody },
3178
+ { name: "DeleteGroup", idempotency: "IDEMPOTENT", options: { "google.api.http": { delete: "/scim/v2/Groups/{id}" } }, I: ScimHttpRequest, O: HttpBody },
3179
+ { name: "GetServiceProviderConfig", idempotency: "NO_SIDE_EFFECTS", options: { "google.api.http": { get: "/scim/v2/ServiceProviderConfig" } }, I: ScimHttpRequest, O: HttpBody },
3180
+ { name: "GetResourceTypes", idempotency: "NO_SIDE_EFFECTS", options: { "google.api.http": { get: "/scim/v2/ResourceTypes" } }, I: ScimHttpRequest, O: HttpBody },
3181
+ { name: "GetSchemas", idempotency: "NO_SIDE_EFFECTS", options: { "google.api.http": { get: "/scim/v2/Schemas" } }, I: ScimHttpRequest, O: HttpBody }
3043
3182
  ]);
@@ -16,7 +16,7 @@ import { MessageType } from "@protobuf-ts/runtime";
16
16
  */
17
17
  export interface PerfTestRequest {
18
18
  /**
19
- * Cipher suite identifier: "ristretto255", "p256", "p384", "p521", "proprietary".
19
+ * Cipher suite identifier: "ristretto255", "p256", "p384", "p521".
20
20
  *
21
21
  * @generated from protobuf field: string suite = 1
22
22
  */
package/src/i18n/index.ts CHANGED
@@ -19,17 +19,6 @@ export const AUTH_KEYS = {
19
19
  LOGOUT_SUBMIT: "auth.logout.submit",
20
20
  } as const;
21
21
 
22
- export const ERROR_KEYS = {
23
- INVALID_CREDENTIALS: "errors.auth.invalid_credentials",
24
- ACCOUNT_LOCKED: "errors.auth.account_locked",
25
- SESSION_EXPIRED: "errors.auth.session_expired",
26
- MFA_REQUIRED: "errors.auth.mfa_required",
27
- PERMISSION_DENIED: "errors.rbac.permission_denied",
28
- NOT_FOUND: "errors.general.not_found",
29
- INTERNAL_ERROR: "errors.general.internal_error",
30
- RATE_LIMITED: "errors.general.rate_limited",
31
- } as const;
32
-
33
22
  export const COMMON_KEYS = {
34
23
  SAVE: "common.buttons.save",
35
24
  CANCEL: "common.buttons.cancel",
package/src/index.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  // Composables
2
- export { useAuth } from "./composables/useAuth";
3
2
  export {
4
3
  useGrpc,
5
4
  initGrpc,
@@ -16,8 +15,15 @@ export {
16
15
  checkBffSession,
17
16
  startBffLogin,
18
17
  bffLogout,
18
+ bffCsrfToken,
19
19
  type BffUserInfo,
20
20
  } from "./composables/useBffAuth";
21
+ export {
22
+ initAccountApi,
23
+ getAccountTransport,
24
+ closeAccountTransport,
25
+ type AccountApiConfig,
26
+ } from "./composables/useAccountTransport";
21
27
 
22
28
  // Stores
23
29
  export { useAuthStore } from "./stores/auth";
@@ -48,17 +54,28 @@ export {
48
54
  type NormalizedPrincipal,
49
55
  } from "./utils/normalizePrincipal";
50
56
 
57
+ export {
58
+ rpcRefusal,
59
+ rpcReason,
60
+ refusalMessage,
61
+ REFUSAL_TEXTS,
62
+ SID_ERROR_DOMAIN,
63
+ type RpcRefusal,
64
+ } from "./utils/rpcRefusal";
65
+
51
66
  // Types
52
67
  export type { AuthState, SessionInfo, GrpcConfig } from "./types";
53
68
 
54
69
  // i18n key constants
55
- export { AUTH_KEYS, ERROR_KEYS, COMMON_KEYS } from "./i18n";
70
+ export { AUTH_KEYS, COMMON_KEYS } from "./i18n";
56
71
 
57
72
  // Generated proto clients and types
58
73
  export { AuthServiceClient } from "./generated/sid/v1/authn/auth.client";
59
74
  export { IdentityServiceClient } from "./generated/sid/v1/identity/identity.client";
60
75
  export { AccountServiceClient } from "./generated/sid/v1/account/account.client";
61
76
  export { UpstreamServiceClient } from "./generated/sid/v1/federation/upstream.client";
77
+ export { EnrollmentServiceClient } from "./generated/sid/v1/admin/enrollment.client";
78
+ export type { InstanceStatus } from "./generated/sid/v1/admin/enrollment";
62
79
 
63
80
  // Re-export commonly used proto types
64
81
  export type {
@@ -103,9 +120,26 @@ export type {
103
120
  VerifyMagicLinkResponse,
104
121
  RequestPasswordResetResponse,
105
122
  VerifyPasswordResetResponse,
123
+ ExecutePasswordResetResponse,
106
124
  CompletePasswordResetResponse,
125
+ OpaqueZkppRegistrationStartResponse,
126
+ OpaqueZkppRegistrationFinishResponse,
127
+ PasswordChangeChallengeResponse,
128
+ PasswordChangeExecuteResponse,
129
+ PasswordChangeFinishResponse,
107
130
  } from "./generated/sid/v1/authn/auth";
108
131
 
132
+ // Password operations: the history evaluator and the proof the finish carries
133
+ export { PasswordHistoryEvaluatorServiceClient } from "./generated/sid/v1/authn/password_history.client";
134
+ export type {
135
+ PasswordHistoryContext,
136
+ PasswordHistoryDomain,
137
+ PasswordHistoryEvaluation,
138
+ PasswordHistoryEvaluationProof,
139
+ PasswordRegistrationProof,
140
+ } from "./generated/sid/v1/authn/password_history";
141
+ export type { PasswordOperationId } from "./generated/sid/v1/ids/ids";
142
+
109
143
  export type {
110
144
  Profile,
111
145
  Session,
@@ -0,0 +1,18 @@
1
+ import { describe, it, expect } from "vitest";
2
+ import pkg from "../package.json";
3
+
4
+ /**
5
+ * The root entry and the source subpaths (`./profile`, `./components`,
6
+ * `./quasar`) must load the same module graph for an ES module consumer.
7
+ * The subpaths are shipped as sources and import the root through
8
+ * `src/index.ts`; if the root resolved to the built `dist` instead, the app
9
+ * would hold two copies of the module state: the transports `initGrpc` and
10
+ * `initAccountApi` set, the BFF configuration `initBff` sets, and the
11
+ * profile composables would read the copy nobody initialized.
12
+ */
13
+ describe("package exports", () => {
14
+ it("resolves the root to the sources the subpaths import", () => {
15
+ expect(pkg.exports["."].import).toBe("./src/index.ts");
16
+ expect(pkg.exports["./profile"].import).toBe("./src/profile/index.ts");
17
+ });
18
+ });
@@ -38,6 +38,7 @@
38
38
  v-model="identifier"
39
39
  :disable="loading"
40
40
  :label="identifierLabel"
41
+ data-test="principal"
41
42
  @update:principal-type="principalType = $event"
42
43
  />
43
44
 
@@ -48,6 +49,7 @@
48
49
  outlined
49
50
  :disable="loading"
50
51
  :rules="[(v: string) => !!v || passwordRequiredText]"
52
+ data-test="password"
51
53
  >
52
54
  <template v-slot:prepend>
53
55
  <q-icon name="sym_o_lock" />
@@ -70,6 +72,7 @@
70
72
  class="full-width"
71
73
  :loading="loading"
72
74
  :disable="!identifier || !password"
75
+ data-test="submit"
73
76
  />
74
77
  </q-form>
75
78
 
@@ -115,7 +118,7 @@
115
118
  import { ref } from "vue";
116
119
  import { SidPrincipalInput } from "../../quasar";
117
120
  import type { PrincipalType } from "../../quasar";
118
- import { normalizePrincipal } from "../../index";
121
+ import { normalizePrincipal, refusalMessage } from "../../index";
119
122
 
120
123
  void SidPrincipalInput;
121
124
 
@@ -220,7 +223,7 @@ async function onSubmit() {
220
223
  emit("success", result);
221
224
  } catch (e) {
222
225
  const err = e instanceof Error ? e : new Error("Login failed");
223
- error.value = err.message;
226
+ error.value = refusalMessage(e, "Login failed");
224
227
  emit("error", err);
225
228
  } finally {
226
229
  loading.value = false;