Repository navigation
Expand file tree
/
Copy pathopenapi.yaml
More file actions
2158 lines (2158 loc) · 78.2 KB
/
Copy pathopenapi.yaml
File metadata and controls
2158 lines (2158 loc) · 78.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.1.0
info:
title: OpenProof Identity API
version: 1.1.0-rc5
description: >-
Machine-readable contract for OpenProof consumer accounts, authentication,
OAuth/OIDC, identity evidence, administration and SCIM provisioning. Browser
ceremonies retain the Set-Cookie values between their documented steps.
servers:
- url: https://identity.example.com
security: []
tags:
- name: Health
- name: Operations
- name: Account
- name: Authentication
- name: Passkeys
- name: Federation
- name: OAuth
- name: Evidence
- name: Administration
- name: SCIM
paths:
/health/live:
get:
tags: [Health]
operationId: liveness
responses:
"200":
description: Process is live.
content:
application/json:
schema: {$ref: "#/components/schemas/Health"}
/health/ready:
get:
tags: [Health]
operationId: readiness
responses:
"200":
description: Service and PostgreSQL are ready.
content:
application/json:
schema: {$ref: "#/components/schemas/Health"}
"503": {$ref: "#/components/responses/Unavailable"}
/metrics:
get:
tags: [Operations]
operationId: scrapeMetrics
security: [{metricsBearer: []}]
description: >-
Private Prometheus exposition endpoint. Deployments must keep it off the
public identity edge and use the dedicated metrics bearer credential.
responses:
"200":
description: Prometheus text exposition with bounded, low-cardinality series.
content:
text/plain:
schema: {type: string}
"401": {$ref: "#/components/responses/Error"}
head:
tags: [Operations]
operationId: probeMetricsAuthentication
security: [{metricsBearer: []}]
responses:
"200": {description: Metrics authentication succeeded; no body is returned.}
"401": {$ref: "#/components/responses/Error"}
/account/signup:
post:
tags: [Account]
operationId: signup
requestBody:
required: true
content:
application/json:
schema:
type: object
additionalProperties: false
required: [email, password]
properties:
email: {type: string, format: email, maxLength: 320}
password: {type: string, format: password, maxLength: 1024}
display_name: {type: string, maxLength: 256}
responses:
"201":
description: Pending account created.
content:
application/json:
schema:
type: object
required: [identity_id, verification_required]
properties:
identity_id: {type: string}
verification_required: {type: boolean, const: true}
"400": {$ref: "#/components/responses/Error"}
"409": {$ref: "#/components/responses/Error"}
"429": {$ref: "#/components/responses/Error"}
/account/email/verify:
post:
tags: [Account]
operationId: verifySignupEmail
requestBody: {$ref: "#/components/requestBodies/VerificationProof"}
responses:
"200":
description: Email verified and account activated.
content:
application/json:
schema:
type: object
required: [verified, session_id, assurance]
properties:
verified: {type: boolean, const: true}
session_id: {type: string}
assurance: {type: string, enum: [ial1]}
"400": {$ref: "#/components/responses/Error"}
/account/email/resend:
post:
tags: [Account]
operationId: resendSignupEmail
requestBody:
required: true
content:
application/json:
schema:
type: object
additionalProperties: false
required: [email]
properties:
email: {type: string, format: email, maxLength: 320}
responses:
"202": {description: Accepted without revealing account existence.}
/account/email/change:
post:
tags: [Account]
operationId: beginEmailChange
description: Starts verified email addition or replacement for the authenticated identity.
security: [{sessionCookie: []}, {bearerAuth: []}]
requestBody:
required: true
content:
application/json:
schema: {$ref: "#/components/schemas/EmailInput"}
responses:
"202": {description: Verification delivery accepted.}
"401": {$ref: "#/components/responses/Error"}
/account/email/change/verify:
post:
tags: [Account]
operationId: completeEmailChange
security: [{sessionCookie: []}, {bearerAuth: []}]
requestBody:
required: true
content:
application/json:
schema:
type: object
additionalProperties: false
required: [verification_id, secret]
properties:
verification_id: {type: string, maxLength: 200}
secret: {type: string, maxLength: 512}
password:
type: string
format: password
maxLength: 1024
description: Optional. When the identity has no local sign-in method, verifies the email and enables email/password sign-in in the same ceremony.
responses:
"200":
description: Email verified/updated; returns the updated profile.
content:
application/json:
schema: {$ref: "#/components/schemas/Profile"}
"400": {$ref: "#/components/responses/Error"}
"401": {$ref: "#/components/responses/Error"}
/account/phone:
post:
tags: [Account]
operationId: beginPhoneVerification
security: [{sessionCookie: []}, {bearerAuth: []}]
requestBody:
required: true
content:
application/json:
schema:
type: object
additionalProperties: false
required: [phone_number]
properties:
phone_number: {type: string, maxLength: 32, example: "+989121234567"}
responses:
"202": {description: Verification delivery accepted.}
"401": {$ref: "#/components/responses/Error"}
/account/phone/verify:
post:
tags: [Account]
operationId: completePhoneVerification
security: [{sessionCookie: []}, {bearerAuth: []}]
requestBody: {$ref: "#/components/requestBodies/VerificationProof"}
responses:
"200":
description: Phone verified; returns the updated profile.
content:
application/json:
schema: {$ref: "#/components/schemas/Profile"}
"400": {$ref: "#/components/responses/Error"}
"401": {$ref: "#/components/responses/Error"}
/account/password/forgot:
post:
tags: [Account]
operationId: beginPasswordReset
requestBody:
required: true
content:
application/json:
schema:
type: object
additionalProperties: false
required: [email]
properties:
email: {type: string, format: email, maxLength: 320}
responses:
"202": {description: Accepted without revealing account existence.}
/account/password/reset:
post:
tags: [Account]
operationId: completePasswordReset
requestBody:
required: true
content:
application/json:
schema: {$ref: "#/components/schemas/PasswordReset"}
responses:
"200":
description: Password replaced and existing sessions revoked.
"400": {$ref: "#/components/responses/Error"}
/account/totp:
get:
tags: [Account]
operationId: getTotpStatus
summary: Report whether local TOTP is available and enabled for the current identity.
security: [{sessionCookie: []}, {bearerAuth: []}]
responses:
"200":
description: Current TOTP state and session assurance.
content:
application/json:
schema:
type: object
additionalProperties: false
required: [available, enabled, assurance]
properties:
available: {type: boolean}
enabled: {type: boolean}
assurance: {type: string, enum: [ial0, ial1, ial2, ial3, ial4]}
"401": {$ref: "#/components/responses/Error"}
/account/totp/start:
post:
tags: [Account]
operationId: beginTotpEnrollment
summary: Begin or replace local TOTP enrollment after password reauthentication.
description: Replacing an existing TOTP authenticator additionally requires the current session to satisfy IAL2.
security: [{sessionCookie: []}, {bearerAuth: []}]
requestBody:
required: true
content:
application/json:
schema:
type: object
additionalProperties: false
required: [password]
properties:
password: {type: string, format: password, maxLength: 1024}
responses:
"201":
description: Short-lived enrollment material. The Base32 secret is returned only for this pending enrollment.
content:
application/json:
schema:
type: object
additionalProperties: false
required: [enrollment_id, secret_base32, expires_at_ms, replacing]
properties:
enrollment_id: {type: string, maxLength: 200}
secret_base32: {type: string}
expires_at_ms: {type: integer, format: int64}
replacing: {type: boolean}
"400": {$ref: "#/components/responses/Error"}
"401": {$ref: "#/components/responses/Error"}
"403": {$ref: "#/components/responses/Error"}
"412": {$ref: "#/components/responses/Error"}
/account/totp/complete:
post:
tags: [Account]
operationId: completeTotpEnrollment
summary: Verify the authenticator code and atomically install the pending TOTP seed.
security: [{sessionCookie: []}, {bearerAuth: []}]
requestBody:
required: true
content:
application/json:
schema:
type: object
additionalProperties: false
required: [enrollment_id, code]
properties:
enrollment_id: {type: string, maxLength: 200}
code: {type: string, pattern: "^[0-9]{6}$", maxLength: 8}
responses:
"200":
description: TOTP authenticator enabled.
content:
application/json:
schema:
type: object
additionalProperties: false
required: [enabled]
properties:
enabled: {type: boolean, const: true}
"400": {$ref: "#/components/responses/Error"}
"401": {$ref: "#/components/responses/Error"}
"403": {$ref: "#/components/responses/Error"}
"412": {$ref: "#/components/responses/Error"}
/account/totp/disable:
post:
tags: [Account]
operationId: disableTotp
summary: Disable local TOTP after strong-session and password reauthentication.
description: Requires IAL2. Outstanding recovery codes and pending TOTP enrollments are invalidated before the authenticator is removed.
security: [{sessionCookie: []}, {bearerAuth: []}]
requestBody:
required: true
content:
application/json:
schema:
type: object
additionalProperties: false
required: [password]
properties:
password: {type: string, format: password, maxLength: 1024}
responses:
"200":
description: TOTP disabled and recovery codes revoked.
content:
application/json:
schema:
type: object
additionalProperties: false
required: [enabled, recovery_codes_revoked]
properties:
enabled: {type: boolean, const: false}
recovery_codes_revoked: {type: boolean, const: true}
"400": {$ref: "#/components/responses/Error"}
"401": {$ref: "#/components/responses/Error"}
"403": {$ref: "#/components/responses/Error"}
"412": {$ref: "#/components/responses/Error"}
/account/profile:
get:
tags: [Account]
operationId: getProfile
security: [{sessionCookie: []}, {bearerAuth: []}]
responses:
"200":
description: Current profile.
content:
application/json:
schema: {$ref: "#/components/schemas/Profile"}
"401": {$ref: "#/components/responses/Error"}
patch:
tags: [Account]
operationId: updateProfile
security: [{sessionCookie: []}, {bearerAuth: []}]
requestBody:
required: true
content:
application/json:
schema:
type: object
additionalProperties: false
properties:
display_name: {type: [string, "null"], maxLength: 256, description: Null or an empty string clears the field.}
preferred_username: {type: [string, "null"], maxLength: 128, description: Null or an empty string clears the field.}
locale: {type: [string, "null"], maxLength: 64, description: Null or an empty string clears the field.}
picture: {type: [string, "null"], format: uri, maxLength: 2048, description: Null or an empty string clears the field.}
responses:
"200":
description: Updated profile.
content:
application/json:
schema: {$ref: "#/components/schemas/Profile"}
put:
tags: [Account]
operationId: replaceProfileFields
description: Uses the same partial-update semantics as PATCH for compatibility.
security: [{sessionCookie: []}, {bearerAuth: []}]
requestBody:
required: true
content:
application/json:
schema: {$ref: "#/components/schemas/ProfileUpdate"}
responses:
"200":
description: Updated profile.
content:
application/json:
schema: {$ref: "#/components/schemas/Profile"}
"401": {$ref: "#/components/responses/Error"}
/account/sessions:
get:
tags: [Account]
operationId: listSessions
summary: List active first-party sessions for the current identity.
security: [{sessionCookie: []}]
responses:
"200":
description: Active sessions, including whether each is the current session.
content:
application/json:
schema:
type: object
required: [sessions]
properties:
sessions:
type: array
items: {$ref: "#/components/schemas/AccountSession"}
"401": {$ref: "#/components/responses/Error"}
/account/sessions/revoke:
post:
tags: [Account]
operationId: revokeSession
summary: Revoke one other active session owned by the current identity.
security: [{sessionCookie: []}]
requestBody:
required: true
content:
application/json:
schema:
type: object
additionalProperties: false
required: [session_id]
properties:
session_id: {type: string, minLength: 1, maxLength: 200}
responses:
"200":
description: Session revoked.
content:
application/json:
schema:
type: object
required: [revoked]
properties:
revoked: {type: boolean}
"400": {$ref: "#/components/responses/Error"}
"401": {$ref: "#/components/responses/Error"}
"404": {$ref: "#/components/responses/Error"}
"412": {$ref: "#/components/responses/Error"}
/account/connections:
get:
tags: [Account, Federation]
operationId: listAccountConnections
description: >-
Lists authentication-capable external accounts attached to the current
canonical OpenProof identity. Provider subjects are returned only to the
authenticated account owner.
security: [{sessionCookie: []}, {bearerAuth: []}]
responses:
"200":
description: Connected sign-in methods.
content:
application/json:
schema:
type: object
additionalProperties: false
required: [connections]
properties:
connections:
type: array
items: {$ref: "#/components/schemas/AccountConnection"}
"401": {$ref: "#/components/responses/Error"}
/account/connections/complete:
get:
tags: [Account, Federation]
operationId: completeAccountConnectionCompatibility
description: >-
Legacy empty completion endpoint retained for compatibility. User-facing
completion UX belongs to the relying frontend, not the authentication API.
security: []
responses:
"204": {description: Connection completion acknowledged with no response body.}
/account/connections/start:
get:
tags: [Account, Federation]
operationId: beginFederatedAccountConnection
description: >-
Starts a redirect-based proof for an already authenticated identity. The
target identity and ceremony purpose are stored server-side; a normal
login callback cannot be substituted for this connection ceremony.
security: [{sessionCookie: []}]
parameters:
- {name: provider, in: query, required: true, schema: {type: string, maxLength: 128}}
- {name: return_to, in: query, required: false, description: Local absolute path only., schema: {type: string, default: /}}
responses:
"302":
description: Redirect to the upstream provider and set bound connection-ceremony cookies.
headers:
Location: {schema: {type: string, format: uri}}
Set-Cookie: {schema: {type: string}}
"401": {$ref: "#/components/responses/Error"}
/account/connections/handoff:
post:
tags: [Account, Federation]
operationId: issueNativeConnectionHandoff
description: >-
Creates a two-minute, one-time browser handoff for an authenticated
native client. The canonical identity, redirect provider and local
return path are bound in server-side transaction state; no session or
bearer token is placed in the browser URL.
security: [{sessionCookie: []}, {bearerAuth: []}]
requestBody:
required: true
content:
application/json:
schema:
type: object
additionalProperties: false
required: [provider, return_to]
properties:
provider: {type: string, maxLength: 128}
return_to: {type: string, maxLength: 2048, description: Local absolute path only.}
responses:
"201":
description: One-time browser handoff issued.
content:
application/json:
schema:
type: object
additionalProperties: false
required: [handoff_url, expires_at]
properties:
handoff_url: {type: string, description: Local URL containing only the one-time ticket.}
expires_at: {type: string, format: date-time}
"400": {$ref: "#/components/responses/Error"}
"401": {$ref: "#/components/responses/Error"}
"404": {$ref: "#/components/responses/Error"}
get:
tags: [Account, Federation]
operationId: redeemNativeConnectionHandoff
description: >-
Atomically consumes the one-time native handoff, starts the bound
redirect-provider connection ceremony and redirects to that provider.
parameters:
- {name: ticket, in: query, required: true, schema: {type: string, maxLength: 256}}
responses:
"302":
description: Handoff consumed and browser redirected to the bound upstream provider.
headers:
Location: {schema: {type: string, format: uri}}
Set-Cookie: {schema: {type: string}}
"400": {$ref: "#/components/responses/Error"}
"401": {$ref: "#/components/responses/Error"}
/account/connections/disconnect:
post:
tags: [Account, Federation]
operationId: disconnectAccountConnection
description: >-
Disconnects an authentication provider from the current canonical
identity. The last available sign-in method cannot be removed.
security: [{sessionCookie: []}, {bearerAuth: []}]
requestBody:
required: true
content:
application/json:
schema: {$ref: "#/components/schemas/AccountConnection"}
responses:
"200":
description: Connection removed.
content:
application/json:
schema:
type: object
additionalProperties: false
required: [disconnected]
properties:
disconnected: {type: boolean, const: true}
"400": {$ref: "#/components/responses/Error"}
"401": {$ref: "#/components/responses/Error"}
"412": {$ref: "#/components/responses/Error"}
/account/connections/web3/handoff:
post:
tags: [Account, Federation]
operationId: issueWeb3AccountConnectionHandoff
description: >-
Issues a short-lived one-time wallet publisher ticket for connecting an
EVM wallet from a separate mobile wallet browser. The authenticated
browser session remains in the originating browser; no session credential
is placed in the deep link.
security: [{sessionCookie: []}, {bearerAuth: []}]
requestBody:
required: true
content:
application/json:
schema:
type: object
additionalProperties: false
required: [provider]
properties:
provider: {type: string, const: ethereum-wallet}
responses:
"201":
description: One-time wallet connection handoff issued.
content:
application/json:
schema:
type: object
additionalProperties: false
required: [handoff_ticket, expires_at]
properties:
handoff_ticket: {type: string, maxLength: 256}
expires_at: {type: string, format: date-time}
"400": {$ref: "#/components/responses/Error"}
"401": {$ref: "#/components/responses/Error"}
"404": {$ref: "#/components/responses/Error"}
/account/connections/web3/start:
post:
tags: [Account, Federation]
operationId: beginWeb3AccountConnection
description: Starts a cookie-bound wallet or Farcaster proof for the current identity.
security: [{sessionCookie: []}, {bearerAuth: []}]
requestBody:
required: true
content:
application/json:
schema: {$ref: "#/components/schemas/Web3Start"}
responses:
"200":
description: Bound Web3 connection challenge; no new login session is issued.
headers:
Set-Cookie: {schema: {type: string}}
content:
application/json:
schema: {$ref: "#/components/schemas/Web3Challenge"}
"400": {$ref: "#/components/responses/Error"}
"401": {$ref: "#/components/responses/Error"}
/account/connections/web3/complete:
post:
tags: [Account, Federation]
operationId: completeWeb3AccountConnection
description: >-
Verifies the exact Web3 message from the connection start and attaches
the external subject to the existing identity without issuing a session.
security: [{sessionCookie: []}, {bearerAuth: []}]
requestBody:
required: true
content:
application/json:
schema: {$ref: "#/components/schemas/Web3Completion"}
responses:
"200":
description: External account connected.
content:
application/json:
schema:
type: object
additionalProperties: false
required: [connected, provider, subject]
properties:
connected: {type: boolean, const: true}
provider: {type: string}
subject: {type: string}
"400": {$ref: "#/components/responses/Error"}
"401": {$ref: "#/components/responses/Error"}
"409": {$ref: "#/components/responses/Error"}
/account/passkeys/options:
post:
tags: [Passkeys]
operationId: beginPasskeyRegistration
security: [{sessionCookie: []}, {bearerAuth: []}]
responses:
"200":
description: WebAuthn PublicKeyCredentialCreationOptions and a ceremony cookie.
headers:
Set-Cookie: {schema: {type: string}}
content:
application/json:
schema: {$ref: "#/components/schemas/WebAuthnOptions"}
"401": {$ref: "#/components/responses/Error"}
/account/passkeys:
get:
tags: [Passkeys]
operationId: listPasskeys
security: [{sessionCookie: []}, {bearerAuth: []}]
responses:
"200": {description: Passkeys registered to the current identity.}
"401": {$ref: "#/components/responses/Error"}
post:
tags: [Passkeys]
operationId: completePasskeyRegistration
description: Preserve the registration ceremony cookie from the options call.
security:
- {sessionCookie: [], passkeyRegistrationCookie: []}
- {bearerAuth: [], passkeyRegistrationCookie: []}
requestBody:
required: true
content:
application/json:
schema: {$ref: "#/components/schemas/WebAuthnRegistration"}
responses:
"201": {description: Passkey registered.}
"400": {$ref: "#/components/responses/Error"}
/account/passkeys/{credential_id}:
parameters:
- {name: credential_id, in: path, required: true, schema: {type: string, maxLength: 4096}}
delete:
tags: [Passkeys]
operationId: removePasskey
security: [{sessionCookie: []}, {bearerAuth: []}]
responses:
"200": {description: Passkey removed.}
"401": {$ref: "#/components/responses/Error"}
"404": {$ref: "#/components/responses/Error"}
"412":
description: >-
The final passkey credential cannot be removed while passkey sign-in
is still connected. Disconnect the passkey account connection first;
that operation itself requires another sign-in method to remain.
content:
application/json:
schema: {$ref: "#/components/schemas/Error"}
/auth/login:
post:
tags: [Authentication]
operationId: beginLocalLogin
requestBody:
required: true
content:
application/json:
schema:
type: object
additionalProperties: false
required: [subject]
properties:
subject: {type: string, maxLength: 320}
responses:
"202":
description: Pre-authentication transaction started; retain Set-Cookie fields.
headers:
Set-Cookie: {schema: {type: string}}
content:
application/json:
schema:
type: object
required: [transaction_id, challenge_id, expires_at_ms]
properties:
transaction_id: {type: string}
challenge_id: {type: string}
expires_at_ms: {type: integer, format: int64}
/auth/mfa/verify:
post:
tags: [Authentication]
operationId: completeLocalLogin
security: [{preauthCookies: []}]
requestBody:
required: true
content:
application/json:
schema:
type: object
additionalProperties: false
required: [transaction_id, challenge_id, password]
properties:
transaction_id: {type: string}
challenge_id: {type: string}
password: {type: string, format: password}
totp:
type: string
pattern: "^[0-9]{6,8}$"
description: TOTP second factor; mutually exclusive with recovery_code.
recovery_code:
type: string
minLength: 1
maxLength: 128
description: One-time recovery code used instead of TOTP; mutually exclusive with totp.
not:
required: [totp, recovery_code]
responses:
"200":
description: Session issued in a secure cookie.
"401": {$ref: "#/components/responses/Error"}
/auth/session/rotate:
post:
tags: [Authentication]
operationId: rotateSession
security: [{sessionCookie: []}, {bearerAuth: []}]
responses:
"200": {description: Session atomically rotated.}
/auth/logout:
post:
tags: [Authentication]
operationId: logout
security: [{sessionCookie: []}, {bearerAuth: []}]
responses:
"204": {description: Current session revoked or cookie cleared.}
/auth/logout-all:
post:
tags: [Authentication]
operationId: logoutAll
security: [{sessionCookie: []}, {bearerAuth: []}]
responses:
"204": {description: All identity sessions revoked.}
/auth/recovery-codes:
post:
tags: [Authentication]
operationId: generateRecoveryCodes
description: Requires an IAL2 session and an enabled local TOTP authenticator. The ten returned codes are shown once.
security: [{sessionCookie: []}, {bearerAuth: []}]
responses:
"201":
description: New recovery-code batch; replaces the previous batch.
content:
application/json:
schema:
type: object
required: [codes]
properties:
codes:
type: array
minItems: 10
maxItems: 10
items: {type: string}
"401": {$ref: "#/components/responses/Error"}
"403": {$ref: "#/components/responses/Error"}
"412": {$ref: "#/components/responses/Error"}
/auth/providers:
get:
tags: [Federation]
operationId: listFederatedProviders
responses:
"200":
description: Enabled redirect-based and challenge-response identity providers.
content:
application/json:
schema:
type: object
required: [providers, challenge_providers]
properties:
providers:
type: array
description: Redirect-based providers usable with /auth/federated/start.
items: {type: string}
challenge_providers:
type: array
description: Challenge-response providers exposed by this deployment.
items: {type: string}
/auth/federated/start:
get:
tags: [Federation]
operationId: beginFederatedLogin
parameters:
- {name: provider, in: query, required: true, schema: {type: string, maxLength: 128}}
- {name: return_to, in: query, required: false, description: Local absolute path only., schema: {type: string, default: /}}
responses:
"302":
description: Redirect to the upstream provider and set bound ceremony cookies.
headers:
Location: {schema: {type: string, format: uri}}
Set-Cookie: {schema: {type: string}}
/auth/federated/callback:
get:
tags: [Federation]
operationId: completeOidcFederatedLogin
description: OAuth/OIDC provider callback. Parameters are supplied by the upstream provider.
responses:
"302": {description: OpenProof session established and redirected to the saved local return target.}
"401": {$ref: "#/components/responses/Error"}
post:
tags: [Federation]
operationId: completeFormPostFederatedLogin
description: Apple form_post or SAML callback; preserve all ceremony cookies.
requestBody:
required: true
content:
application/x-www-form-urlencoded:
schema:
type: object
additionalProperties: true
responses:
"302": {description: OpenProof session established and redirected to the saved local return target.}
"401": {$ref: "#/components/responses/Error"}
/auth/passkey/options:
post:
tags: [Passkeys]
operationId: beginPasskeyLogin
responses:
"200":
description: WebAuthn PublicKeyCredentialRequestOptions and bound ceremony cookies.
headers:
Set-Cookie: {schema: {type: string}}
content:
application/json:
schema: {$ref: "#/components/schemas/WebAuthnOptions"}
/auth/passkey/verify:
post:
tags: [Passkeys]
operationId: completePasskeyLogin
description: Preserve every cookie returned by /auth/passkey/options.
requestBody:
required: true
content:
application/json:
schema: {$ref: "#/components/schemas/WebAuthnAssertion"}
responses:
"200": {description: IAL2 OpenProof session issued in a secure cookie.}
"401": {$ref: "#/components/responses/Error"}
/auth/web3/handoff:
post:
tags: [Federation]
operationId: issueWeb3AuthenticationHandoff
description: >-
Issues separated publisher and redeemer tickets for mobile EVM wallet
login. Only the publisher ticket may leave the originating browser; the
redeemer ticket is the credential that can mint the browser session after
a verified wallet result has been published.
requestBody:
required: true
content:
application/json:
schema:
type: object
additionalProperties: false
required: [provider]
properties:
provider: {type: string, const: ethereum-wallet}
responses:
"201":
description: Short-lived mobile wallet login handoff issued.
content:
application/json:
schema:
type: object
additionalProperties: false
required: [publisher_ticket, redeem_ticket, expires_at]
properties:
publisher_ticket: {type: string, maxLength: 256}
redeem_ticket: {type: string, maxLength: 256}
expires_at: {type: string, format: date-time}
"400": {$ref: "#/components/responses/Error"}
"404": {$ref: "#/components/responses/Error"}
/auth/web3/handoff/redeem:
post:
tags: [Federation]
operationId: redeemWeb3AuthenticationHandoff
description: >-
Polls and atomically redeems a completed mobile-wallet authentication.
Before the wallet publishes a result this endpoint returns 202 without
issuing a session; successful redemption is single-use.
requestBody:
required: true
content:
application/json:
schema:
type: object
additionalProperties: false
required: [redeem_ticket]
properties:
redeem_ticket: {type: string, maxLength: 256}
responses:
"200":
description: Verified handoff redeemed and OpenProof session issued.
headers:
Set-Cookie: {schema: {type: string}}
"202": {description: Wallet result is not available yet.}
"400": {$ref: "#/components/responses/Error"}
"401": {$ref: "#/components/responses/Error"}
/auth/web3/start:
post:
tags: [Federation]
operationId: beginWeb3Login
requestBody:
required: true
content:
application/json:
schema: {$ref: "#/components/schemas/Web3Start"}
responses:
"200":
description: >-
Bound ceremony configuration. Ethereum and direct Farcaster starts
include `message`; relay/AuthKit Farcaster starts return nonce,
domain, URI, chain and resource-prefix fields instead.
headers:
Set-Cookie: {schema: {type: string}}
content:
application/json:
schema: {$ref: "#/components/schemas/Web3Challenge"}
"400": {$ref: "#/components/responses/Error"}
/auth/web3/complete:
post:
tags: [Federation]
operationId: completeWeb3Login
requestBody:
required: true
content:
application/json: