@selfauth/conformance 0.0.0-stage → 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.
Files changed (58) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +16 -2
  3. package/cases/admin.json +326 -0
  4. package/cases/audit-and-errors.json +233 -0
  5. package/cases/csrf.json +413 -0
  6. package/cases/email-verification.json +567 -0
  7. package/cases/identity.json +546 -0
  8. package/cases/login.json +446 -0
  9. package/cases/logout.json +213 -0
  10. package/cases/password-change.json +270 -0
  11. package/cases/password-reset.json +698 -0
  12. package/cases/rate-limits.json +667 -0
  13. package/cases/rbac.json +575 -0
  14. package/cases/registration.json +782 -0
  15. package/cases/resources.json +373 -0
  16. package/cases/sessions.json +308 -0
  17. package/dist/compliance.d.ts +118 -0
  18. package/dist/compliance.d.ts.map +1 -0
  19. package/dist/compliance.js +201 -0
  20. package/dist/compliance.js.map +1 -0
  21. package/dist/coverage.d.ts +26 -0
  22. package/dist/coverage.d.ts.map +1 -0
  23. package/dist/coverage.js +105 -0
  24. package/dist/coverage.js.map +1 -0
  25. package/dist/index.d.ts +9 -0
  26. package/dist/index.d.ts.map +1 -0
  27. package/dist/index.js +9 -0
  28. package/dist/index.js.map +1 -0
  29. package/dist/load.d.ts +12 -0
  30. package/dist/load.d.ts.map +1 -0
  31. package/dist/load.js +26 -0
  32. package/dist/load.js.map +1 -0
  33. package/dist/render.d.ts +19 -0
  34. package/dist/render.d.ts.map +1 -0
  35. package/dist/render.js +20 -0
  36. package/dist/render.js.map +1 -0
  37. package/dist/report.d.ts +3 -0
  38. package/dist/report.d.ts.map +1 -0
  39. package/dist/report.js +31 -0
  40. package/dist/report.js.map +1 -0
  41. package/dist/runner/assertions.d.ts +11 -0
  42. package/dist/runner/assertions.d.ts.map +1 -0
  43. package/dist/runner/assertions.js +253 -0
  44. package/dist/runner/assertions.js.map +1 -0
  45. package/dist/runner/driver.d.ts +58 -0
  46. package/dist/runner/driver.d.ts.map +1 -0
  47. package/dist/runner/driver.js +2 -0
  48. package/dist/runner/driver.js.map +1 -0
  49. package/dist/runner/run.d.ts +17 -0
  50. package/dist/runner/run.d.ts.map +1 -0
  51. package/dist/runner/run.js +390 -0
  52. package/dist/runner/run.js.map +1 -0
  53. package/dist/schema.d.ts +168 -0
  54. package/dist/schema.d.ts.map +1 -0
  55. package/dist/schema.js +121 -0
  56. package/dist/schema.js.map +1 -0
  57. package/package.json +53 -3
  58. package/verification.json +165 -0
@@ -0,0 +1,782 @@
1
+ {
2
+ "cases": [
3
+ {
4
+ "id": "CT-REG-001",
5
+ "title": "Registration in required mode creates a pending user, emails a token, and creates no session",
6
+ "category": "registration",
7
+ "level": "core",
8
+ "requirements": ["AUTHN-REG-004", "AUTHN-REG-008", "IDENT-STATE-001"],
9
+ "given": [],
10
+ "steps": [
11
+ {
12
+ "op": "register",
13
+ "input": {
14
+ "email": "alice@example.test",
15
+ "password": "correct horse battery staple"
16
+ },
17
+ "expect": {
18
+ "outcome": "success",
19
+ "sessionCreated": false,
20
+ "assert": {
21
+ "body": {
22
+ "status": "accepted"
23
+ }
24
+ }
25
+ }
26
+ },
27
+ {
28
+ "op": "readLastEmail",
29
+ "input": {
30
+ "to": "alice@example.test"
31
+ },
32
+ "expect": {
33
+ "outcome": "success",
34
+ "assert": {
35
+ "kind": "verification",
36
+ "hasToken": true
37
+ }
38
+ }
39
+ },
40
+ {
41
+ "op": "inspectStorage",
42
+ "input": {
43
+ "entity": "user",
44
+ "where": {
45
+ "emailNormalized": "alice@example.test"
46
+ }
47
+ },
48
+ "expect": {
49
+ "outcome": "success",
50
+ "assert": {
51
+ "count": 1,
52
+ "first.state": "pending",
53
+ "first.emailVerifiedAt": null
54
+ }
55
+ }
56
+ },
57
+ {
58
+ "op": "inspectEvents",
59
+ "input": {
60
+ "type": "user.registered"
61
+ },
62
+ "expect": {
63
+ "outcome": "success",
64
+ "assert": {
65
+ "count": 1
66
+ }
67
+ }
68
+ }
69
+ ]
70
+ },
71
+ {
72
+ "id": "CT-REG-002",
73
+ "title": "Registering an existing email in required mode is indistinguishable and leaves the account untouched",
74
+ "category": "registration",
75
+ "level": "core",
76
+ "requirements": ["AUTHN-REG-005", "SEC-ENUM-001"],
77
+ "given": [
78
+ {
79
+ "user": "alice",
80
+ "email": "alice@example.test",
81
+ "password": "correct horse battery staple",
82
+ "state": "active"
83
+ }
84
+ ],
85
+ "steps": [
86
+ {
87
+ "op": "register",
88
+ "input": {
89
+ "email": "new@example.test",
90
+ "password": "correct horse battery staple"
91
+ },
92
+ "expect": {
93
+ "outcome": "success"
94
+ },
95
+ "save": "fresh"
96
+ },
97
+ {
98
+ "op": "register",
99
+ "input": {
100
+ "email": "alice@example.test",
101
+ "password": "some other password"
102
+ },
103
+ "expect": {
104
+ "outcome": "success",
105
+ "indistinguishableFrom": "fresh",
106
+ "sessionCreated": false
107
+ }
108
+ },
109
+ {
110
+ "op": "login",
111
+ "note": "original password still works",
112
+ "input": {
113
+ "email": "alice@example.test",
114
+ "password": "correct horse battery staple"
115
+ },
116
+ "expect": {
117
+ "outcome": "success",
118
+ "sessionCreated": true
119
+ }
120
+ },
121
+ {
122
+ "op": "readLastEmail",
123
+ "note": "the owner MAY get a notice, never a token that changes the account",
124
+ "input": {
125
+ "to": "alice@example.test"
126
+ },
127
+ "expect": {
128
+ "outcome": "success",
129
+ "assert": {
130
+ "kindNot": "verification"
131
+ }
132
+ }
133
+ }
134
+ ]
135
+ },
136
+ {
137
+ "id": "CT-REG-003",
138
+ "title": "Client-supplied state, roles, verification flag and ID are ignored at registration",
139
+ "category": "registration",
140
+ "level": "core",
141
+ "requirements": ["AUTHN-REG-002", "AUTHZ-RBAC-003", "AUTHZ-ADMIN-005"],
142
+ "given": [],
143
+ "steps": [
144
+ {
145
+ "op": "register",
146
+ "input": {
147
+ "email": "mallory@example.test",
148
+ "password": "correct horse battery staple",
149
+ "id": "00000000-0000-0000-0000-000000000001",
150
+ "state": "active",
151
+ "roles": ["admin"],
152
+ "permissions": ["auth.roles.assign"],
153
+ "emailVerified": true
154
+ },
155
+ "expect": {
156
+ "outcome": "success",
157
+ "sessionCreated": false
158
+ }
159
+ },
160
+ {
161
+ "op": "inspectStorage",
162
+ "input": {
163
+ "entity": "user",
164
+ "where": {
165
+ "emailNormalized": "mallory@example.test"
166
+ }
167
+ },
168
+ "expect": {
169
+ "outcome": "success",
170
+ "assert": {
171
+ "count": 1,
172
+ "first.state": "pending",
173
+ "first.emailVerifiedAt": null,
174
+ "first.idNot": "00000000-0000-0000-0000-000000000001",
175
+ "first.roles": ["user"]
176
+ }
177
+ }
178
+ }
179
+ ]
180
+ },
181
+ {
182
+ "id": "CT-REG-004",
183
+ "title": "Malformed email addresses are rejected before any record is created",
184
+ "category": "registration",
185
+ "level": "core",
186
+ "requirements": ["AUTHN-REG-001", "IDENT-EMAIL-004"],
187
+ "given": [],
188
+ "steps": [
189
+ {
190
+ "op": "register",
191
+ "input": {
192
+ "email": "no-at-sign.example.test",
193
+ "password": "correct horse battery staple"
194
+ },
195
+ "expect": {
196
+ "outcome": "error",
197
+ "code": "VALIDATION_FAILED"
198
+ }
199
+ },
200
+ {
201
+ "op": "register",
202
+ "input": {
203
+ "email": "@example.test",
204
+ "password": "correct horse battery staple"
205
+ },
206
+ "expect": {
207
+ "outcome": "error",
208
+ "code": "VALIDATION_FAILED"
209
+ }
210
+ },
211
+ {
212
+ "op": "register",
213
+ "input": {
214
+ "email": "alice@",
215
+ "password": "correct horse battery staple"
216
+ },
217
+ "expect": {
218
+ "outcome": "error",
219
+ "code": "VALIDATION_FAILED"
220
+ }
221
+ },
222
+ {
223
+ "op": "register",
224
+ "input": {
225
+ "email": "al ice@example.test",
226
+ "password": "correct horse battery staple"
227
+ },
228
+ "expect": {
229
+ "outcome": "error",
230
+ "code": "VALIDATION_FAILED"
231
+ }
232
+ },
233
+ {
234
+ "op": "register",
235
+ "input": {
236
+ "email": "a@example.test\u0000",
237
+ "password": "correct horse battery staple"
238
+ },
239
+ "expect": {
240
+ "outcome": "error",
241
+ "code": "VALIDATION_FAILED"
242
+ }
243
+ },
244
+ {
245
+ "op": "register",
246
+ "note": "255 characters",
247
+ "input": {
248
+ "email": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx@example.test",
249
+ "password": "correct horse battery staple"
250
+ },
251
+ "expect": {
252
+ "outcome": "error",
253
+ "code": "VALIDATION_FAILED"
254
+ }
255
+ },
256
+ {
257
+ "op": "inspectStorage",
258
+ "input": {
259
+ "entity": "user"
260
+ },
261
+ "expect": {
262
+ "outcome": "success",
263
+ "assert": {
264
+ "count": 0
265
+ }
266
+ }
267
+ }
268
+ ]
269
+ },
270
+ {
271
+ "id": "CT-REG-005",
272
+ "title": "Passwords outside the policy are rejected at registration",
273
+ "category": "registration",
274
+ "level": "core",
275
+ "requirements": ["AUTHN-REG-001", "SEC-PWPOLICY-001", "SEC-PWPOLICY-002"],
276
+ "given": [],
277
+ "steps": [
278
+ {
279
+ "op": "register",
280
+ "input": {
281
+ "email": "alice@example.test",
282
+ "password": "elevenchars"
283
+ },
284
+ "expect": {
285
+ "outcome": "error",
286
+ "code": "PASSWORD_POLICY_VIOLATION"
287
+ }
288
+ },
289
+ {
290
+ "op": "register",
291
+ "input": {
292
+ "email": "alice@example.test",
293
+ "password": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
294
+ },
295
+ "expect": {
296
+ "outcome": "error",
297
+ "code": "PASSWORD_POLICY_VIOLATION"
298
+ }
299
+ },
300
+ {
301
+ "op": "register",
302
+ "note": "exactly 12 characters including a space",
303
+ "input": {
304
+ "email": "alice@example.test",
305
+ "password": "twelve chars"
306
+ },
307
+ "expect": {
308
+ "outcome": "success"
309
+ }
310
+ }
311
+ ]
312
+ },
313
+ {
314
+ "id": "CT-REG-006",
315
+ "title": "Concurrent registrations of the same normalized email create one account",
316
+ "category": "registration",
317
+ "level": "core",
318
+ "requirements": ["AUTHN-REG-007", "IDENT-EMAIL-003", "DATA-MODEL-001"],
319
+ "given": [],
320
+ "steps": [
321
+ {
322
+ "op": "concurrent",
323
+ "input": {
324
+ "steps": [
325
+ {
326
+ "op": "register",
327
+ "as": "c1",
328
+ "input": {
329
+ "email": "race@example.test",
330
+ "password": "correct horse battery staple"
331
+ }
332
+ },
333
+ {
334
+ "op": "register",
335
+ "as": "c2",
336
+ "input": {
337
+ "email": "RACE@example.test",
338
+ "password": "correct horse battery staple"
339
+ }
340
+ },
341
+ {
342
+ "op": "register",
343
+ "as": "c3",
344
+ "input": {
345
+ "email": " race@Example.Test ",
346
+ "password": "correct horse battery staple"
347
+ }
348
+ }
349
+ ]
350
+ }
351
+ },
352
+ {
353
+ "op": "inspectStorage",
354
+ "input": {
355
+ "entity": "user",
356
+ "where": {
357
+ "emailNormalized": "race@example.test"
358
+ }
359
+ },
360
+ "expect": {
361
+ "outcome": "success",
362
+ "assert": {
363
+ "count": 1
364
+ }
365
+ }
366
+ }
367
+ ]
368
+ },
369
+ {
370
+ "id": "CT-REG-007",
371
+ "title": "'optional' verification mode activates accounts but never reveals existing emails or auto-logs in",
372
+ "category": "registration",
373
+ "level": "core",
374
+ "requirements": ["AUTHN-REG-009", "AUTHN-REG-005", "SEC-ENUM-001"],
375
+ "config": {
376
+ "authentication": {
377
+ "emailVerification": {
378
+ "mode": "optional"
379
+ }
380
+ }
381
+ },
382
+ "given": [
383
+ {
384
+ "user": "alice",
385
+ "email": "alice@example.test",
386
+ "password": "correct horse battery staple",
387
+ "state": "active"
388
+ }
389
+ ],
390
+ "steps": [
391
+ {
392
+ "op": "register",
393
+ "input": {
394
+ "email": "carol@example.test",
395
+ "password": "correct horse battery staple"
396
+ },
397
+ "expect": {
398
+ "outcome": "success",
399
+ "sessionCreated": false,
400
+ "assert": {
401
+ "body": {
402
+ "status": "accepted"
403
+ }
404
+ }
405
+ },
406
+ "save": "fresh"
407
+ },
408
+ {
409
+ "op": "inspectStorage",
410
+ "input": {
411
+ "entity": "user",
412
+ "where": {
413
+ "emailNormalized": "carol@example.test"
414
+ }
415
+ },
416
+ "expect": {
417
+ "outcome": "success",
418
+ "assert": {
419
+ "first.state": "active"
420
+ }
421
+ }
422
+ },
423
+ {
424
+ "op": "readLastEmail",
425
+ "input": {
426
+ "to": "carol@example.test"
427
+ },
428
+ "expect": {
429
+ "outcome": "success",
430
+ "assert": {
431
+ "kind": "verification"
432
+ }
433
+ }
434
+ },
435
+ {
436
+ "op": "getCurrentUser",
437
+ "note": "registration did not log the user in",
438
+ "expect": {
439
+ "outcome": "error",
440
+ "code": "UNAUTHENTICATED"
441
+ }
442
+ },
443
+ {
444
+ "op": "register",
445
+ "input": {
446
+ "email": "alice@example.test",
447
+ "password": "some other password"
448
+ },
449
+ "expect": {
450
+ "outcome": "success",
451
+ "sessionCreated": false,
452
+ "indistinguishableFrom": "fresh"
453
+ }
454
+ },
455
+ {
456
+ "op": "login",
457
+ "input": {
458
+ "email": "alice@example.test",
459
+ "password": "correct horse battery staple"
460
+ },
461
+ "note": "existing account unchanged",
462
+ "expect": {
463
+ "outcome": "success",
464
+ "sessionCreated": true
465
+ }
466
+ },
467
+ {
468
+ "op": "login",
469
+ "as": "carol",
470
+ "input": {
471
+ "email": "carol@example.test",
472
+ "password": "correct horse battery staple"
473
+ },
474
+ "expect": {
475
+ "outcome": "success",
476
+ "sessionCreated": true
477
+ }
478
+ }
479
+ ]
480
+ },
481
+ {
482
+ "id": "CT-REG-008",
483
+ "title": "'off' verification mode activates accounts but never reveals existing emails or auto-logs in",
484
+ "category": "registration",
485
+ "level": "core",
486
+ "requirements": ["AUTHN-REG-009", "AUTHN-REG-005", "SEC-ENUM-001"],
487
+ "config": {
488
+ "authentication": {
489
+ "emailVerification": {
490
+ "mode": "off"
491
+ }
492
+ }
493
+ },
494
+ "given": [
495
+ {
496
+ "user": "alice",
497
+ "email": "alice@example.test",
498
+ "password": "correct horse battery staple",
499
+ "state": "active"
500
+ }
501
+ ],
502
+ "steps": [
503
+ {
504
+ "op": "register",
505
+ "input": {
506
+ "email": "carol@example.test",
507
+ "password": "correct horse battery staple"
508
+ },
509
+ "expect": {
510
+ "outcome": "success",
511
+ "sessionCreated": false,
512
+ "assert": {
513
+ "body": {
514
+ "status": "accepted"
515
+ }
516
+ }
517
+ },
518
+ "save": "fresh"
519
+ },
520
+ {
521
+ "op": "inspectStorage",
522
+ "input": {
523
+ "entity": "user",
524
+ "where": {
525
+ "emailNormalized": "carol@example.test"
526
+ }
527
+ },
528
+ "expect": {
529
+ "outcome": "success",
530
+ "assert": {
531
+ "first.state": "active"
532
+ }
533
+ }
534
+ },
535
+ {
536
+ "op": "readLastEmail",
537
+ "input": {
538
+ "to": "carol@example.test"
539
+ },
540
+ "expect": {
541
+ "outcome": "success",
542
+ "assert": {
543
+ "none": true
544
+ }
545
+ },
546
+ "note": "no verification email in off mode"
547
+ },
548
+ {
549
+ "op": "getCurrentUser",
550
+ "note": "registration did not log the user in",
551
+ "expect": {
552
+ "outcome": "error",
553
+ "code": "UNAUTHENTICATED"
554
+ }
555
+ },
556
+ {
557
+ "op": "register",
558
+ "input": {
559
+ "email": "alice@example.test",
560
+ "password": "some other password"
561
+ },
562
+ "expect": {
563
+ "outcome": "success",
564
+ "sessionCreated": false,
565
+ "indistinguishableFrom": "fresh"
566
+ }
567
+ },
568
+ {
569
+ "op": "login",
570
+ "input": {
571
+ "email": "alice@example.test",
572
+ "password": "correct horse battery staple"
573
+ },
574
+ "note": "existing account unchanged",
575
+ "expect": {
576
+ "outcome": "success",
577
+ "sessionCreated": true
578
+ }
579
+ },
580
+ {
581
+ "op": "login",
582
+ "as": "carol",
583
+ "input": {
584
+ "email": "carol@example.test",
585
+ "password": "correct horse battery staple"
586
+ },
587
+ "expect": {
588
+ "outcome": "success",
589
+ "sessionCreated": true
590
+ }
591
+ }
592
+ ]
593
+ },
594
+ {
595
+ "id": "CT-REG-009",
596
+ "title": "With revealExistingEmail, a registered email fails with EMAIL_TAKEN and the account is untouched",
597
+ "category": "registration",
598
+ "level": "core",
599
+ "requirements": ["AUTHN-REG-011", "SEC-ENUM-004"],
600
+ "config": {
601
+ "authentication": {
602
+ "registration": {
603
+ "revealExistingEmail": true
604
+ }
605
+ }
606
+ },
607
+ "given": [
608
+ {
609
+ "user": "alice",
610
+ "email": "alice@example.test",
611
+ "password": "correct horse battery staple",
612
+ "state": "active"
613
+ }
614
+ ],
615
+ "steps": [
616
+ {
617
+ "op": "register",
618
+ "input": {
619
+ "email": "carol@example.test",
620
+ "password": "correct horse battery staple"
621
+ },
622
+ "expect": {
623
+ "outcome": "success",
624
+ "sessionCreated": false,
625
+ "assert": {
626
+ "body": {
627
+ "status": "accepted"
628
+ }
629
+ }
630
+ }
631
+ },
632
+ {
633
+ "op": "register",
634
+ "input": {
635
+ "email": "ALICE@example.test",
636
+ "password": "some other password"
637
+ },
638
+ "expect": {
639
+ "outcome": "error",
640
+ "code": "EMAIL_TAKEN",
641
+ "sessionCreated": false
642
+ }
643
+ },
644
+ {
645
+ "op": "login",
646
+ "input": {
647
+ "email": "alice@example.test",
648
+ "password": "correct horse battery staple"
649
+ },
650
+ "note": "existing account unchanged",
651
+ "expect": {
652
+ "outcome": "success"
653
+ }
654
+ },
655
+ {
656
+ "op": "register",
657
+ "as": "prober",
658
+ "input": {
659
+ "email": "alice@example.test",
660
+ "password": "correct horse battery staple"
661
+ },
662
+ "expect": {
663
+ "outcome": "error",
664
+ "code": "EMAIL_TAKEN"
665
+ }
666
+ },
667
+ {
668
+ "op": "register",
669
+ "as": "prober",
670
+ "input": {
671
+ "email": "alice@example.test",
672
+ "password": "correct horse battery staple"
673
+ },
674
+ "expect": {
675
+ "outcome": "error",
676
+ "code": "EMAIL_TAKEN"
677
+ }
678
+ },
679
+ {
680
+ "op": "register",
681
+ "as": "prober",
682
+ "input": {
683
+ "email": "alice@example.test",
684
+ "password": "correct horse battery staple"
685
+ },
686
+ "note": "still rate limited per email (default 3 per window)",
687
+ "expect": {
688
+ "outcome": "error",
689
+ "code": "RATE_LIMITED"
690
+ }
691
+ },
692
+ {
693
+ "op": "requestPasswordReset",
694
+ "input": {
695
+ "email": "alice@example.test"
696
+ },
697
+ "save": "known",
698
+ "expect": {
699
+ "outcome": "success"
700
+ },
701
+ "note": "reset stays non-enumerating (AUTHN-REG-013)"
702
+ },
703
+ {
704
+ "op": "requestPasswordReset",
705
+ "input": {
706
+ "email": "nobody@example.test"
707
+ },
708
+ "expect": {
709
+ "outcome": "success",
710
+ "indistinguishableFrom": "known"
711
+ }
712
+ }
713
+ ]
714
+ },
715
+ {
716
+ "id": "CT-REG-010",
717
+ "title": "With signInAfterRegistration, new users get a fresh, secure session",
718
+ "category": "registration",
719
+ "level": "core",
720
+ "requirements": ["AUTHN-REG-012"],
721
+ "config": {
722
+ "authentication": {
723
+ "emailVerification": {
724
+ "mode": "optional"
725
+ },
726
+ "registration": {
727
+ "revealExistingEmail": true,
728
+ "signInAfterRegistration": true
729
+ }
730
+ }
731
+ },
732
+ "given": [
733
+ {
734
+ "user": "alice",
735
+ "email": "alice@example.test",
736
+ "password": "correct horse battery staple",
737
+ "state": "active"
738
+ }
739
+ ],
740
+ "steps": [
741
+ {
742
+ "op": "register",
743
+ "input": {
744
+ "email": "carol@example.test",
745
+ "password": "correct horse battery staple"
746
+ },
747
+ "expect": {
748
+ "outcome": "success",
749
+ "sessionCreated": true,
750
+ "assert": {
751
+ "body.user.email": "carol@example.test",
752
+ "cookie.httpOnly": true,
753
+ "cookie.secure": true
754
+ }
755
+ }
756
+ },
757
+ {
758
+ "op": "getCurrentUser",
759
+ "expect": {
760
+ "outcome": "success",
761
+ "assert": {
762
+ "body.user.state": "active"
763
+ }
764
+ }
765
+ },
766
+ {
767
+ "op": "register",
768
+ "as": "other",
769
+ "input": {
770
+ "email": "alice@example.test",
771
+ "password": "correct horse battery staple"
772
+ },
773
+ "expect": {
774
+ "outcome": "error",
775
+ "code": "EMAIL_TAKEN",
776
+ "sessionCreated": false
777
+ }
778
+ }
779
+ ]
780
+ }
781
+ ]
782
+ }