@panneau/protocol 5.0.0-alpha.14 → 5.0.0-alpha.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/conformance/index.d.ts.map +1 -1
- package/dist/conformance/index.js +113 -2
- package/dist/conformance/index.js.map +1 -1
- package/dist/constants.d.ts +40 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +44 -1
- package/dist/constants.js.map +1 -1
- package/dist/index.js +3 -3
- package/dist/mock/auth.d.ts +71 -0
- package/dist/mock/auth.d.ts.map +1 -0
- package/dist/mock/auth.js +346 -0
- package/dist/mock/auth.js.map +1 -0
- package/dist/mock/index.d.ts +8 -0
- package/dist/mock/index.d.ts.map +1 -1
- package/dist/mock/index.js +16 -1
- package/dist/mock/index.js.map +1 -1
- package/dist/openapi.d.ts.map +1 -1
- package/dist/openapi.js +227 -30
- package/dist/openapi.js.map +1 -1
- package/dist/runtime/index.js +2 -2
- package/dist/schemas/api.d.ts +35 -0
- package/dist/schemas/api.d.ts.map +1 -1
- package/dist/schemas/api.js +24 -1
- package/dist/schemas/api.js.map +1 -1
- package/dist/schemas/boot.d.ts +1 -0
- package/dist/schemas/boot.d.ts.map +1 -1
- package/dist/schemas/definition.d.ts +2 -0
- package/dist/schemas/definition.d.ts.map +1 -1
- package/dist/schemas/definition.js +6 -5
- package/dist/schemas/definition.js.map +1 -1
- package/dist/schemas/index.d.ts +31 -0
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +8 -2
- package/dist/schemas/index.js.map +1 -1
- package/package.json +1 -1
- package/schema/boot.schema.json +3 -0
- package/schema/definition.schema.json +3 -0
- package/schema/openapi.json +1213 -94
package/schema/openapi.json
CHANGED
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
34
|
"403": {
|
|
35
|
-
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`.",
|
|
35
|
+
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`. With `auth.emailVerification`, a user whose email address isn't verified gets a problem of type `urn:panneau:problem:email-unverified` on every operation but those of the auth. A user who must have two-factor authentication and hasn't set it up gets a problem of type `urn:panneau:problem:two-factor-required` on every operation but those of the auth and of `/account/two-factor`.",
|
|
36
36
|
"content": {
|
|
37
37
|
"application/problem+json": {
|
|
38
38
|
"schema": {
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
}
|
|
101
101
|
},
|
|
102
102
|
"403": {
|
|
103
|
-
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`.",
|
|
103
|
+
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`. With `auth.emailVerification`, a user whose email address isn't verified gets a problem of type `urn:panneau:problem:email-unverified` on every operation but those of the auth. A user who must have two-factor authentication and hasn't set it up gets a problem of type `urn:panneau:problem:two-factor-required` on every operation but those of the auth and of `/account/two-factor`.",
|
|
104
104
|
"content": {
|
|
105
105
|
"application/problem+json": {
|
|
106
106
|
"schema": {
|
|
@@ -231,7 +231,7 @@
|
|
|
231
231
|
}
|
|
232
232
|
},
|
|
233
233
|
"403": {
|
|
234
|
-
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`.",
|
|
234
|
+
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`. With `auth.emailVerification`, a user whose email address isn't verified gets a problem of type `urn:panneau:problem:email-unverified` on every operation but those of the auth. A user who must have two-factor authentication and hasn't set it up gets a problem of type `urn:panneau:problem:two-factor-required` on every operation but those of the auth and of `/account/two-factor`.",
|
|
235
235
|
"content": {
|
|
236
236
|
"application/problem+json": {
|
|
237
237
|
"schema": {
|
|
@@ -305,7 +305,7 @@
|
|
|
305
305
|
}
|
|
306
306
|
},
|
|
307
307
|
"403": {
|
|
308
|
-
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`.",
|
|
308
|
+
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`. With `auth.emailVerification`, a user whose email address isn't verified gets a problem of type `urn:panneau:problem:email-unverified` on every operation but those of the auth. A user who must have two-factor authentication and hasn't set it up gets a problem of type `urn:panneau:problem:two-factor-required` on every operation but those of the auth and of `/account/two-factor`.",
|
|
309
309
|
"content": {
|
|
310
310
|
"application/problem+json": {
|
|
311
311
|
"schema": {
|
|
@@ -403,7 +403,7 @@
|
|
|
403
403
|
}
|
|
404
404
|
},
|
|
405
405
|
"403": {
|
|
406
|
-
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`.",
|
|
406
|
+
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`. With `auth.emailVerification`, a user whose email address isn't verified gets a problem of type `urn:panneau:problem:email-unverified` on every operation but those of the auth. A user who must have two-factor authentication and hasn't set it up gets a problem of type `urn:panneau:problem:two-factor-required` on every operation but those of the auth and of `/account/two-factor`.",
|
|
407
407
|
"content": {
|
|
408
408
|
"application/problem+json": {
|
|
409
409
|
"schema": {
|
|
@@ -479,7 +479,7 @@
|
|
|
479
479
|
}
|
|
480
480
|
},
|
|
481
481
|
"403": {
|
|
482
|
-
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`.",
|
|
482
|
+
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`. With `auth.emailVerification`, a user whose email address isn't verified gets a problem of type `urn:panneau:problem:email-unverified` on every operation but those of the auth. A user who must have two-factor authentication and hasn't set it up gets a problem of type `urn:panneau:problem:two-factor-required` on every operation but those of the auth and of `/account/two-factor`.",
|
|
483
483
|
"content": {
|
|
484
484
|
"application/problem+json": {
|
|
485
485
|
"schema": {
|
|
@@ -547,7 +547,7 @@
|
|
|
547
547
|
}
|
|
548
548
|
},
|
|
549
549
|
"403": {
|
|
550
|
-
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`.",
|
|
550
|
+
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`. With `auth.emailVerification`, a user whose email address isn't verified gets a problem of type `urn:panneau:problem:email-unverified` on every operation but those of the auth. A user who must have two-factor authentication and hasn't set it up gets a problem of type `urn:panneau:problem:two-factor-required` on every operation but those of the auth and of `/account/two-factor`.",
|
|
551
551
|
"content": {
|
|
552
552
|
"application/problem+json": {
|
|
553
553
|
"schema": {
|
|
@@ -636,7 +636,7 @@
|
|
|
636
636
|
}
|
|
637
637
|
},
|
|
638
638
|
"403": {
|
|
639
|
-
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`.",
|
|
639
|
+
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`. With `auth.emailVerification`, a user whose email address isn't verified gets a problem of type `urn:panneau:problem:email-unverified` on every operation but those of the auth. A user who must have two-factor authentication and hasn't set it up gets a problem of type `urn:panneau:problem:two-factor-required` on every operation but those of the auth and of `/account/two-factor`.",
|
|
640
640
|
"content": {
|
|
641
641
|
"application/problem+json": {
|
|
642
642
|
"schema": {
|
|
@@ -727,7 +727,7 @@
|
|
|
727
727
|
}
|
|
728
728
|
},
|
|
729
729
|
"403": {
|
|
730
|
-
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`.",
|
|
730
|
+
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`. With `auth.emailVerification`, a user whose email address isn't verified gets a problem of type `urn:panneau:problem:email-unverified` on every operation but those of the auth. A user who must have two-factor authentication and hasn't set it up gets a problem of type `urn:panneau:problem:two-factor-required` on every operation but those of the auth and of `/account/two-factor`.",
|
|
731
731
|
"content": {
|
|
732
732
|
"application/problem+json": {
|
|
733
733
|
"schema": {
|
|
@@ -842,7 +842,7 @@
|
|
|
842
842
|
}
|
|
843
843
|
},
|
|
844
844
|
"403": {
|
|
845
|
-
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`.",
|
|
845
|
+
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`. With `auth.emailVerification`, a user whose email address isn't verified gets a problem of type `urn:panneau:problem:email-unverified` on every operation but those of the auth. A user who must have two-factor authentication and hasn't set it up gets a problem of type `urn:panneau:problem:two-factor-required` on every operation but those of the auth and of `/account/two-factor`.",
|
|
846
846
|
"content": {
|
|
847
847
|
"application/problem+json": {
|
|
848
848
|
"schema": {
|
|
@@ -943,7 +943,7 @@
|
|
|
943
943
|
}
|
|
944
944
|
},
|
|
945
945
|
"403": {
|
|
946
|
-
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`.",
|
|
946
|
+
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`. With `auth.emailVerification`, a user whose email address isn't verified gets a problem of type `urn:panneau:problem:email-unverified` on every operation but those of the auth. A user who must have two-factor authentication and hasn't set it up gets a problem of type `urn:panneau:problem:two-factor-required` on every operation but those of the auth and of `/account/two-factor`.",
|
|
947
947
|
"content": {
|
|
948
948
|
"application/problem+json": {
|
|
949
949
|
"schema": {
|
|
@@ -1012,7 +1012,7 @@
|
|
|
1012
1012
|
}
|
|
1013
1013
|
},
|
|
1014
1014
|
"403": {
|
|
1015
|
-
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`.",
|
|
1015
|
+
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`. With `auth.emailVerification`, a user whose email address isn't verified gets a problem of type `urn:panneau:problem:email-unverified` on every operation but those of the auth. A user who must have two-factor authentication and hasn't set it up gets a problem of type `urn:panneau:problem:two-factor-required` on every operation but those of the auth and of `/account/two-factor`.",
|
|
1016
1016
|
"content": {
|
|
1017
1017
|
"application/problem+json": {
|
|
1018
1018
|
"schema": {
|
|
@@ -1068,7 +1068,7 @@
|
|
|
1068
1068
|
}
|
|
1069
1069
|
},
|
|
1070
1070
|
"403": {
|
|
1071
|
-
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`.",
|
|
1071
|
+
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`. With `auth.emailVerification`, a user whose email address isn't verified gets a problem of type `urn:panneau:problem:email-unverified` on every operation but those of the auth. A user who must have two-factor authentication and hasn't set it up gets a problem of type `urn:panneau:problem:two-factor-required` on every operation but those of the auth and of `/account/two-factor`.",
|
|
1072
1072
|
"content": {
|
|
1073
1073
|
"application/problem+json": {
|
|
1074
1074
|
"schema": {
|
|
@@ -1106,7 +1106,7 @@
|
|
|
1106
1106
|
}
|
|
1107
1107
|
},
|
|
1108
1108
|
"403": {
|
|
1109
|
-
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`.",
|
|
1109
|
+
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`. With `auth.emailVerification`, a user whose email address isn't verified gets a problem of type `urn:panneau:problem:email-unverified` on every operation but those of the auth. A user who must have two-factor authentication and hasn't set it up gets a problem of type `urn:panneau:problem:two-factor-required` on every operation but those of the auth and of `/account/two-factor`.",
|
|
1110
1110
|
"content": {
|
|
1111
1111
|
"application/problem+json": {
|
|
1112
1112
|
"schema": {
|
|
@@ -1174,7 +1174,7 @@
|
|
|
1174
1174
|
}
|
|
1175
1175
|
},
|
|
1176
1176
|
"403": {
|
|
1177
|
-
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`.",
|
|
1177
|
+
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`. With `auth.emailVerification`, a user whose email address isn't verified gets a problem of type `urn:panneau:problem:email-unverified` on every operation but those of the auth. A user who must have two-factor authentication and hasn't set it up gets a problem of type `urn:panneau:problem:two-factor-required` on every operation but those of the auth and of `/account/two-factor`.",
|
|
1178
1178
|
"content": {
|
|
1179
1179
|
"application/problem+json": {
|
|
1180
1180
|
"schema": {
|
|
@@ -1267,7 +1267,7 @@
|
|
|
1267
1267
|
}
|
|
1268
1268
|
},
|
|
1269
1269
|
"403": {
|
|
1270
|
-
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`.",
|
|
1270
|
+
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`. With `auth.emailVerification`, a user whose email address isn't verified gets a problem of type `urn:panneau:problem:email-unverified` on every operation but those of the auth. A user who must have two-factor authentication and hasn't set it up gets a problem of type `urn:panneau:problem:two-factor-required` on every operation but those of the auth and of `/account/two-factor`.",
|
|
1271
1271
|
"content": {
|
|
1272
1272
|
"application/problem+json": {
|
|
1273
1273
|
"schema": {
|
|
@@ -1324,7 +1324,7 @@
|
|
|
1324
1324
|
}
|
|
1325
1325
|
},
|
|
1326
1326
|
"403": {
|
|
1327
|
-
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`.",
|
|
1327
|
+
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`. With `auth.emailVerification`, a user whose email address isn't verified gets a problem of type `urn:panneau:problem:email-unverified` on every operation but those of the auth. A user who must have two-factor authentication and hasn't set it up gets a problem of type `urn:panneau:problem:two-factor-required` on every operation but those of the auth and of `/account/two-factor`.",
|
|
1328
1328
|
"content": {
|
|
1329
1329
|
"application/problem+json": {
|
|
1330
1330
|
"schema": {
|
|
@@ -1404,19 +1404,13 @@
|
|
|
1404
1404
|
"content": {
|
|
1405
1405
|
"application/json": {
|
|
1406
1406
|
"schema": {
|
|
1407
|
-
"
|
|
1408
|
-
"properties": {
|
|
1409
|
-
"twoFactor": {
|
|
1410
|
-
"type": "boolean",
|
|
1411
|
-
"const": true
|
|
1412
|
-
}
|
|
1413
|
-
}
|
|
1407
|
+
"$ref": "#/components/schemas/TwoFactorChallenge"
|
|
1414
1408
|
}
|
|
1415
1409
|
}
|
|
1416
1410
|
}
|
|
1417
1411
|
},
|
|
1418
1412
|
"403": {
|
|
1419
|
-
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`.",
|
|
1413
|
+
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`. With `auth.emailVerification`, a user whose email address isn't verified gets a problem of type `urn:panneau:problem:email-unverified` on every operation but those of the auth. A user who must have two-factor authentication and hasn't set it up gets a problem of type `urn:panneau:problem:two-factor-required` on every operation but those of the auth and of `/account/two-factor`.",
|
|
1420
1414
|
"content": {
|
|
1421
1415
|
"application/problem+json": {
|
|
1422
1416
|
"schema": {
|
|
@@ -1434,6 +1428,16 @@
|
|
|
1434
1428
|
}
|
|
1435
1429
|
}
|
|
1436
1430
|
}
|
|
1431
|
+
},
|
|
1432
|
+
"429": {
|
|
1433
|
+
"description": "Too many requests: `Retry-After` gives the seconds to wait.",
|
|
1434
|
+
"content": {
|
|
1435
|
+
"application/problem+json": {
|
|
1436
|
+
"schema": {
|
|
1437
|
+
"$ref": "#/components/schemas/Problem"
|
|
1438
|
+
}
|
|
1439
|
+
}
|
|
1440
|
+
}
|
|
1437
1441
|
}
|
|
1438
1442
|
}
|
|
1439
1443
|
},
|
|
@@ -1452,7 +1456,7 @@
|
|
|
1452
1456
|
"description": "Logged out."
|
|
1453
1457
|
},
|
|
1454
1458
|
"403": {
|
|
1455
|
-
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`.",
|
|
1459
|
+
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`. With `auth.emailVerification`, a user whose email address isn't verified gets a problem of type `urn:panneau:problem:email-unverified` on every operation but those of the auth. A user who must have two-factor authentication and hasn't set it up gets a problem of type `urn:panneau:problem:two-factor-required` on every operation but those of the auth and of `/account/two-factor`.",
|
|
1456
1460
|
"content": {
|
|
1457
1461
|
"application/problem+json": {
|
|
1458
1462
|
"schema": {
|
|
@@ -1486,12 +1490,13 @@
|
|
|
1486
1490
|
],
|
|
1487
1491
|
"get": {
|
|
1488
1492
|
"operationId": "redirectToProvider",
|
|
1493
|
+
"summary": "Starts the login with an OAuth provider of `auth.providers`. The callback is the backend's: it goes to `next`, or to the base path of the app with `authError` when it fails.",
|
|
1489
1494
|
"parameters": [
|
|
1490
1495
|
{
|
|
1491
1496
|
"name": "next",
|
|
1492
1497
|
"in": "query",
|
|
1493
1498
|
"required": false,
|
|
1494
|
-
"description": "
|
|
1499
|
+
"description": "Where to go after the login: a local path under the base path of the app. Another one is ignored.",
|
|
1495
1500
|
"schema": {
|
|
1496
1501
|
"type": "string"
|
|
1497
1502
|
}
|
|
@@ -1502,7 +1507,52 @@
|
|
|
1502
1507
|
"description": "Redirect to the provider."
|
|
1503
1508
|
},
|
|
1504
1509
|
"403": {
|
|
1505
|
-
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`.",
|
|
1510
|
+
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`. With `auth.emailVerification`, a user whose email address isn't verified gets a problem of type `urn:panneau:problem:email-unverified` on every operation but those of the auth. A user who must have two-factor authentication and hasn't set it up gets a problem of type `urn:panneau:problem:two-factor-required` on every operation but those of the auth and of `/account/two-factor`.",
|
|
1511
|
+
"content": {
|
|
1512
|
+
"application/problem+json": {
|
|
1513
|
+
"schema": {
|
|
1514
|
+
"$ref": "#/components/schemas/Problem"
|
|
1515
|
+
}
|
|
1516
|
+
}
|
|
1517
|
+
}
|
|
1518
|
+
},
|
|
1519
|
+
"404": {
|
|
1520
|
+
"description": "Not found.",
|
|
1521
|
+
"content": {
|
|
1522
|
+
"application/problem+json": {
|
|
1523
|
+
"schema": {
|
|
1524
|
+
"$ref": "#/components/schemas/Problem"
|
|
1525
|
+
}
|
|
1526
|
+
}
|
|
1527
|
+
}
|
|
1528
|
+
}
|
|
1529
|
+
}
|
|
1530
|
+
}
|
|
1531
|
+
},
|
|
1532
|
+
"/auth/providers/{provider}/callback": {
|
|
1533
|
+
"parameters": [
|
|
1534
|
+
{
|
|
1535
|
+
"name": "provider",
|
|
1536
|
+
"in": "path",
|
|
1537
|
+
"required": true,
|
|
1538
|
+
"description": "Provider id.",
|
|
1539
|
+
"schema": {
|
|
1540
|
+
"type": "string"
|
|
1541
|
+
}
|
|
1542
|
+
},
|
|
1543
|
+
{
|
|
1544
|
+
"$ref": "#/components/parameters/Context"
|
|
1545
|
+
}
|
|
1546
|
+
],
|
|
1547
|
+
"get": {
|
|
1548
|
+
"operationId": "providerCallback",
|
|
1549
|
+
"summary": "Optional: the callback of the provider, when the backend has it here. Its URL is the backend's, registered with the provider; the app never calls it.",
|
|
1550
|
+
"responses": {
|
|
1551
|
+
"302": {
|
|
1552
|
+
"description": "To `next`, or to the base path of the app with `authError` when the login failed."
|
|
1553
|
+
},
|
|
1554
|
+
"403": {
|
|
1555
|
+
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`. With `auth.emailVerification`, a user whose email address isn't verified gets a problem of type `urn:panneau:problem:email-unverified` on every operation but those of the auth. A user who must have two-factor authentication and hasn't set it up gets a problem of type `urn:panneau:problem:two-factor-required` on every operation but those of the auth and of `/account/two-factor`.",
|
|
1506
1556
|
"content": {
|
|
1507
1557
|
"application/problem+json": {
|
|
1508
1558
|
"schema": {
|
|
@@ -1527,6 +1577,7 @@
|
|
|
1527
1577
|
"/auth/password/forgot": {
|
|
1528
1578
|
"post": {
|
|
1529
1579
|
"operationId": "forgotPassword",
|
|
1580
|
+
"summary": "With `auth.passwordReset`: emails a link to the page of the app at `{basePath}/auth/reset-password?token=…&email=…`.",
|
|
1530
1581
|
"requestBody": {
|
|
1531
1582
|
"required": true,
|
|
1532
1583
|
"content": {
|
|
@@ -1547,10 +1598,10 @@
|
|
|
1547
1598
|
},
|
|
1548
1599
|
"responses": {
|
|
1549
1600
|
"204": {
|
|
1550
|
-
"description": "A reset link was sent, if the account
|
|
1601
|
+
"description": "A reset link was sent, if the address has an account. The answer is the same when it hasn't, or when a link was sent recently."
|
|
1551
1602
|
},
|
|
1552
1603
|
"403": {
|
|
1553
|
-
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`.",
|
|
1604
|
+
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`. With `auth.emailVerification`, a user whose email address isn't verified gets a problem of type `urn:panneau:problem:email-unverified` on every operation but those of the auth. A user who must have two-factor authentication and hasn't set it up gets a problem of type `urn:panneau:problem:two-factor-required` on every operation but those of the auth and of `/account/two-factor`.",
|
|
1554
1605
|
"content": {
|
|
1555
1606
|
"application/problem+json": {
|
|
1556
1607
|
"schema": {
|
|
@@ -1568,6 +1619,16 @@
|
|
|
1568
1619
|
}
|
|
1569
1620
|
}
|
|
1570
1621
|
}
|
|
1622
|
+
},
|
|
1623
|
+
"429": {
|
|
1624
|
+
"description": "Too many requests: `Retry-After` gives the seconds to wait.",
|
|
1625
|
+
"content": {
|
|
1626
|
+
"application/problem+json": {
|
|
1627
|
+
"schema": {
|
|
1628
|
+
"$ref": "#/components/schemas/Problem"
|
|
1629
|
+
}
|
|
1630
|
+
}
|
|
1631
|
+
}
|
|
1571
1632
|
}
|
|
1572
1633
|
}
|
|
1573
1634
|
},
|
|
@@ -1580,6 +1641,7 @@
|
|
|
1580
1641
|
"/auth/password/reset": {
|
|
1581
1642
|
"post": {
|
|
1582
1643
|
"operationId": "resetPassword",
|
|
1644
|
+
"summary": "With `auth.passwordReset`: sets a new password, with the token and the email of the link. It does not log in.",
|
|
1583
1645
|
"requestBody": {
|
|
1584
1646
|
"required": true,
|
|
1585
1647
|
"content": {
|
|
@@ -1611,7 +1673,7 @@
|
|
|
1611
1673
|
"description": "The password was reset."
|
|
1612
1674
|
},
|
|
1613
1675
|
"403": {
|
|
1614
|
-
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`.",
|
|
1676
|
+
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`. With `auth.emailVerification`, a user whose email address isn't verified gets a problem of type `urn:panneau:problem:email-unverified` on every operation but those of the auth. A user who must have two-factor authentication and hasn't set it up gets a problem of type `urn:panneau:problem:two-factor-required` on every operation but those of the auth and of `/account/two-factor`.",
|
|
1615
1677
|
"content": {
|
|
1616
1678
|
"application/problem+json": {
|
|
1617
1679
|
"schema": {
|
|
@@ -1629,6 +1691,16 @@
|
|
|
1629
1691
|
}
|
|
1630
1692
|
}
|
|
1631
1693
|
}
|
|
1694
|
+
},
|
|
1695
|
+
"429": {
|
|
1696
|
+
"description": "Too many requests: `Retry-After` gives the seconds to wait.",
|
|
1697
|
+
"content": {
|
|
1698
|
+
"application/problem+json": {
|
|
1699
|
+
"schema": {
|
|
1700
|
+
"$ref": "#/components/schemas/Problem"
|
|
1701
|
+
}
|
|
1702
|
+
}
|
|
1703
|
+
}
|
|
1632
1704
|
}
|
|
1633
1705
|
}
|
|
1634
1706
|
},
|
|
@@ -1638,20 +1710,67 @@
|
|
|
1638
1710
|
}
|
|
1639
1711
|
]
|
|
1640
1712
|
},
|
|
1641
|
-
"/auth/
|
|
1713
|
+
"/auth/email/verification": {
|
|
1642
1714
|
"post": {
|
|
1643
|
-
"operationId": "
|
|
1715
|
+
"operationId": "sendEmailVerification",
|
|
1716
|
+
"summary": "With `auth.emailVerification`: emails the current user a link to the page of the app at `{basePath}/auth/verify-email?token=…`.",
|
|
1717
|
+
"responses": {
|
|
1718
|
+
"204": {
|
|
1719
|
+
"description": "A link was sent, or the address is already verified."
|
|
1720
|
+
},
|
|
1721
|
+
"401": {
|
|
1722
|
+
"description": "Not authenticated.",
|
|
1723
|
+
"content": {
|
|
1724
|
+
"application/problem+json": {
|
|
1725
|
+
"schema": {
|
|
1726
|
+
"$ref": "#/components/schemas/Problem"
|
|
1727
|
+
}
|
|
1728
|
+
}
|
|
1729
|
+
}
|
|
1730
|
+
},
|
|
1731
|
+
"403": {
|
|
1732
|
+
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`. With `auth.emailVerification`, a user whose email address isn't verified gets a problem of type `urn:panneau:problem:email-unverified` on every operation but those of the auth. A user who must have two-factor authentication and hasn't set it up gets a problem of type `urn:panneau:problem:two-factor-required` on every operation but those of the auth and of `/account/two-factor`.",
|
|
1733
|
+
"content": {
|
|
1734
|
+
"application/problem+json": {
|
|
1735
|
+
"schema": {
|
|
1736
|
+
"$ref": "#/components/schemas/Problem"
|
|
1737
|
+
}
|
|
1738
|
+
}
|
|
1739
|
+
}
|
|
1740
|
+
},
|
|
1741
|
+
"429": {
|
|
1742
|
+
"description": "Too many requests: `Retry-After` gives the seconds to wait.",
|
|
1743
|
+
"content": {
|
|
1744
|
+
"application/problem+json": {
|
|
1745
|
+
"schema": {
|
|
1746
|
+
"$ref": "#/components/schemas/Problem"
|
|
1747
|
+
}
|
|
1748
|
+
}
|
|
1749
|
+
}
|
|
1750
|
+
}
|
|
1751
|
+
}
|
|
1752
|
+
},
|
|
1753
|
+
"parameters": [
|
|
1754
|
+
{
|
|
1755
|
+
"$ref": "#/components/parameters/Context"
|
|
1756
|
+
}
|
|
1757
|
+
]
|
|
1758
|
+
},
|
|
1759
|
+
"/auth/email/verify": {
|
|
1760
|
+
"post": {
|
|
1761
|
+
"operationId": "verifyEmail",
|
|
1762
|
+
"summary": "With `auth.emailVerification`: verifies the address of the token of a link. The user does not need to be logged in.",
|
|
1644
1763
|
"requestBody": {
|
|
1645
1764
|
"required": true,
|
|
1646
1765
|
"content": {
|
|
1647
1766
|
"application/json": {
|
|
1648
1767
|
"schema": {
|
|
1649
1768
|
"type": "object",
|
|
1769
|
+
"required": [
|
|
1770
|
+
"token"
|
|
1771
|
+
],
|
|
1650
1772
|
"properties": {
|
|
1651
|
-
"
|
|
1652
|
-
"type": "string"
|
|
1653
|
-
},
|
|
1654
|
-
"recoveryCode": {
|
|
1773
|
+
"token": {
|
|
1655
1774
|
"type": "string"
|
|
1656
1775
|
}
|
|
1657
1776
|
}
|
|
@@ -1659,19 +1778,794 @@
|
|
|
1659
1778
|
}
|
|
1660
1779
|
}
|
|
1661
1780
|
},
|
|
1781
|
+
"responses": {
|
|
1782
|
+
"204": {
|
|
1783
|
+
"description": "The address is verified."
|
|
1784
|
+
},
|
|
1785
|
+
"403": {
|
|
1786
|
+
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`. With `auth.emailVerification`, a user whose email address isn't verified gets a problem of type `urn:panneau:problem:email-unverified` on every operation but those of the auth. A user who must have two-factor authentication and hasn't set it up gets a problem of type `urn:panneau:problem:two-factor-required` on every operation but those of the auth and of `/account/two-factor`.",
|
|
1787
|
+
"content": {
|
|
1788
|
+
"application/problem+json": {
|
|
1789
|
+
"schema": {
|
|
1790
|
+
"$ref": "#/components/schemas/Problem"
|
|
1791
|
+
}
|
|
1792
|
+
}
|
|
1793
|
+
}
|
|
1794
|
+
},
|
|
1795
|
+
"422": {
|
|
1796
|
+
"description": "Invalid values: messages are in `errors`, keyed by dot path.",
|
|
1797
|
+
"content": {
|
|
1798
|
+
"application/problem+json": {
|
|
1799
|
+
"schema": {
|
|
1800
|
+
"$ref": "#/components/schemas/Problem"
|
|
1801
|
+
}
|
|
1802
|
+
}
|
|
1803
|
+
}
|
|
1804
|
+
},
|
|
1805
|
+
"429": {
|
|
1806
|
+
"description": "Too many requests: `Retry-After` gives the seconds to wait.",
|
|
1807
|
+
"content": {
|
|
1808
|
+
"application/problem+json": {
|
|
1809
|
+
"schema": {
|
|
1810
|
+
"$ref": "#/components/schemas/Problem"
|
|
1811
|
+
}
|
|
1812
|
+
}
|
|
1813
|
+
}
|
|
1814
|
+
}
|
|
1815
|
+
}
|
|
1816
|
+
},
|
|
1817
|
+
"parameters": [
|
|
1818
|
+
{
|
|
1819
|
+
"$ref": "#/components/parameters/Context"
|
|
1820
|
+
}
|
|
1821
|
+
]
|
|
1822
|
+
},
|
|
1823
|
+
"/auth/two-factor/challenge": {
|
|
1824
|
+
"post": {
|
|
1825
|
+
"operationId": "twoFactorChallenge",
|
|
1826
|
+
"summary": "Ends a login that answered `202`, with a code of the authenticator app or a recovery code. A login that is no longer pending is a `422`.",
|
|
1827
|
+
"requestBody": {
|
|
1828
|
+
"required": true,
|
|
1829
|
+
"content": {
|
|
1830
|
+
"application/json": {
|
|
1831
|
+
"schema": {
|
|
1832
|
+
"oneOf": [
|
|
1833
|
+
{
|
|
1834
|
+
"type": "object",
|
|
1835
|
+
"required": [
|
|
1836
|
+
"code"
|
|
1837
|
+
],
|
|
1838
|
+
"properties": {
|
|
1839
|
+
"code": {
|
|
1840
|
+
"type": "string"
|
|
1841
|
+
}
|
|
1842
|
+
}
|
|
1843
|
+
},
|
|
1844
|
+
{
|
|
1845
|
+
"type": "object",
|
|
1846
|
+
"required": [
|
|
1847
|
+
"recoveryCode"
|
|
1848
|
+
],
|
|
1849
|
+
"properties": {
|
|
1850
|
+
"recoveryCode": {
|
|
1851
|
+
"type": "string"
|
|
1852
|
+
}
|
|
1853
|
+
}
|
|
1854
|
+
}
|
|
1855
|
+
]
|
|
1856
|
+
}
|
|
1857
|
+
}
|
|
1858
|
+
}
|
|
1859
|
+
},
|
|
1860
|
+
"responses": {
|
|
1861
|
+
"200": {
|
|
1862
|
+
"description": "Logged in.",
|
|
1863
|
+
"content": {
|
|
1864
|
+
"application/json": {
|
|
1865
|
+
"schema": {
|
|
1866
|
+
"$ref": "#/components/schemas/Session"
|
|
1867
|
+
}
|
|
1868
|
+
}
|
|
1869
|
+
}
|
|
1870
|
+
},
|
|
1871
|
+
"403": {
|
|
1872
|
+
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`. With `auth.emailVerification`, a user whose email address isn't verified gets a problem of type `urn:panneau:problem:email-unverified` on every operation but those of the auth. A user who must have two-factor authentication and hasn't set it up gets a problem of type `urn:panneau:problem:two-factor-required` on every operation but those of the auth and of `/account/two-factor`.",
|
|
1873
|
+
"content": {
|
|
1874
|
+
"application/problem+json": {
|
|
1875
|
+
"schema": {
|
|
1876
|
+
"$ref": "#/components/schemas/Problem"
|
|
1877
|
+
}
|
|
1878
|
+
}
|
|
1879
|
+
}
|
|
1880
|
+
},
|
|
1881
|
+
"422": {
|
|
1882
|
+
"description": "Invalid values: messages are in `errors`, keyed by dot path.",
|
|
1883
|
+
"content": {
|
|
1884
|
+
"application/problem+json": {
|
|
1885
|
+
"schema": {
|
|
1886
|
+
"$ref": "#/components/schemas/Problem"
|
|
1887
|
+
}
|
|
1888
|
+
}
|
|
1889
|
+
}
|
|
1890
|
+
},
|
|
1891
|
+
"429": {
|
|
1892
|
+
"description": "Too many requests: `Retry-After` gives the seconds to wait.",
|
|
1893
|
+
"content": {
|
|
1894
|
+
"application/problem+json": {
|
|
1895
|
+
"schema": {
|
|
1896
|
+
"$ref": "#/components/schemas/Problem"
|
|
1897
|
+
}
|
|
1898
|
+
}
|
|
1899
|
+
}
|
|
1900
|
+
}
|
|
1901
|
+
}
|
|
1902
|
+
},
|
|
1903
|
+
"parameters": [
|
|
1904
|
+
{
|
|
1905
|
+
"$ref": "#/components/parameters/Context"
|
|
1906
|
+
}
|
|
1907
|
+
]
|
|
1908
|
+
},
|
|
1909
|
+
"/auth/password/confirm": {
|
|
1910
|
+
"post": {
|
|
1911
|
+
"operationId": "confirmPassword",
|
|
1912
|
+
"summary": "Confirms the password of the current user, for the operations that answer `423`.",
|
|
1913
|
+
"requestBody": {
|
|
1914
|
+
"required": true,
|
|
1915
|
+
"content": {
|
|
1916
|
+
"application/json": {
|
|
1917
|
+
"schema": {
|
|
1918
|
+
"type": "object",
|
|
1919
|
+
"required": [
|
|
1920
|
+
"password"
|
|
1921
|
+
],
|
|
1922
|
+
"properties": {
|
|
1923
|
+
"password": {
|
|
1924
|
+
"type": "string"
|
|
1925
|
+
}
|
|
1926
|
+
}
|
|
1927
|
+
}
|
|
1928
|
+
}
|
|
1929
|
+
}
|
|
1930
|
+
},
|
|
1931
|
+
"responses": {
|
|
1932
|
+
"204": {
|
|
1933
|
+
"description": "The password is confirmed."
|
|
1934
|
+
},
|
|
1935
|
+
"401": {
|
|
1936
|
+
"description": "Not authenticated.",
|
|
1937
|
+
"content": {
|
|
1938
|
+
"application/problem+json": {
|
|
1939
|
+
"schema": {
|
|
1940
|
+
"$ref": "#/components/schemas/Problem"
|
|
1941
|
+
}
|
|
1942
|
+
}
|
|
1943
|
+
}
|
|
1944
|
+
},
|
|
1945
|
+
"403": {
|
|
1946
|
+
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`. With `auth.emailVerification`, a user whose email address isn't verified gets a problem of type `urn:panneau:problem:email-unverified` on every operation but those of the auth. A user who must have two-factor authentication and hasn't set it up gets a problem of type `urn:panneau:problem:two-factor-required` on every operation but those of the auth and of `/account/two-factor`.",
|
|
1947
|
+
"content": {
|
|
1948
|
+
"application/problem+json": {
|
|
1949
|
+
"schema": {
|
|
1950
|
+
"$ref": "#/components/schemas/Problem"
|
|
1951
|
+
}
|
|
1952
|
+
}
|
|
1953
|
+
}
|
|
1954
|
+
},
|
|
1955
|
+
"422": {
|
|
1956
|
+
"description": "Invalid values: messages are in `errors`, keyed by dot path.",
|
|
1957
|
+
"content": {
|
|
1958
|
+
"application/problem+json": {
|
|
1959
|
+
"schema": {
|
|
1960
|
+
"$ref": "#/components/schemas/Problem"
|
|
1961
|
+
}
|
|
1962
|
+
}
|
|
1963
|
+
}
|
|
1964
|
+
},
|
|
1965
|
+
"429": {
|
|
1966
|
+
"description": "Too many requests: `Retry-After` gives the seconds to wait.",
|
|
1967
|
+
"content": {
|
|
1968
|
+
"application/problem+json": {
|
|
1969
|
+
"schema": {
|
|
1970
|
+
"$ref": "#/components/schemas/Problem"
|
|
1971
|
+
}
|
|
1972
|
+
}
|
|
1973
|
+
}
|
|
1974
|
+
}
|
|
1975
|
+
}
|
|
1976
|
+
},
|
|
1977
|
+
"parameters": [
|
|
1978
|
+
{
|
|
1979
|
+
"$ref": "#/components/parameters/Context"
|
|
1980
|
+
}
|
|
1981
|
+
]
|
|
1982
|
+
},
|
|
1983
|
+
"/account/two-factor": {
|
|
1984
|
+
"get": {
|
|
1985
|
+
"operationId": "getTwoFactor",
|
|
1986
|
+
"summary": "With `auth.twoFactor`: the two-factor authentication of the user.",
|
|
1987
|
+
"responses": {
|
|
1988
|
+
"200": {
|
|
1989
|
+
"description": "Its status.",
|
|
1990
|
+
"content": {
|
|
1991
|
+
"application/json": {
|
|
1992
|
+
"schema": {
|
|
1993
|
+
"$ref": "#/components/schemas/TwoFactorStatus"
|
|
1994
|
+
}
|
|
1995
|
+
}
|
|
1996
|
+
}
|
|
1997
|
+
},
|
|
1998
|
+
"401": {
|
|
1999
|
+
"description": "Not authenticated.",
|
|
2000
|
+
"content": {
|
|
2001
|
+
"application/problem+json": {
|
|
2002
|
+
"schema": {
|
|
2003
|
+
"$ref": "#/components/schemas/Problem"
|
|
2004
|
+
}
|
|
2005
|
+
}
|
|
2006
|
+
}
|
|
2007
|
+
},
|
|
2008
|
+
"403": {
|
|
2009
|
+
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`. With `auth.emailVerification`, a user whose email address isn't verified gets a problem of type `urn:panneau:problem:email-unverified` on every operation but those of the auth. A user who must have two-factor authentication and hasn't set it up gets a problem of type `urn:panneau:problem:two-factor-required` on every operation but those of the auth and of `/account/two-factor`.",
|
|
2010
|
+
"content": {
|
|
2011
|
+
"application/problem+json": {
|
|
2012
|
+
"schema": {
|
|
2013
|
+
"$ref": "#/components/schemas/Problem"
|
|
2014
|
+
}
|
|
2015
|
+
}
|
|
2016
|
+
}
|
|
2017
|
+
}
|
|
2018
|
+
}
|
|
2019
|
+
},
|
|
2020
|
+
"post": {
|
|
2021
|
+
"operationId": "enableTwoFactor",
|
|
2022
|
+
"summary": "Starts setting it up: a new secret, `pending` until `POST /account/two-factor/confirm`.",
|
|
2023
|
+
"responses": {
|
|
2024
|
+
"200": {
|
|
2025
|
+
"description": "The secret to add to an authenticator app.",
|
|
2026
|
+
"content": {
|
|
2027
|
+
"application/json": {
|
|
2028
|
+
"schema": {
|
|
2029
|
+
"$ref": "#/components/schemas/TwoFactorSetup"
|
|
2030
|
+
}
|
|
2031
|
+
}
|
|
2032
|
+
}
|
|
2033
|
+
},
|
|
2034
|
+
"401": {
|
|
2035
|
+
"description": "Not authenticated.",
|
|
2036
|
+
"content": {
|
|
2037
|
+
"application/problem+json": {
|
|
2038
|
+
"schema": {
|
|
2039
|
+
"$ref": "#/components/schemas/Problem"
|
|
2040
|
+
}
|
|
2041
|
+
}
|
|
2042
|
+
}
|
|
2043
|
+
},
|
|
2044
|
+
"403": {
|
|
2045
|
+
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`. With `auth.emailVerification`, a user whose email address isn't verified gets a problem of type `urn:panneau:problem:email-unverified` on every operation but those of the auth. A user who must have two-factor authentication and hasn't set it up gets a problem of type `urn:panneau:problem:two-factor-required` on every operation but those of the auth and of `/account/two-factor`.",
|
|
2046
|
+
"content": {
|
|
2047
|
+
"application/problem+json": {
|
|
2048
|
+
"schema": {
|
|
2049
|
+
"$ref": "#/components/schemas/Problem"
|
|
2050
|
+
}
|
|
2051
|
+
}
|
|
2052
|
+
}
|
|
2053
|
+
},
|
|
2054
|
+
"409": {
|
|
2055
|
+
"description": "Conflict with a business rule.",
|
|
2056
|
+
"content": {
|
|
2057
|
+
"application/problem+json": {
|
|
2058
|
+
"schema": {
|
|
2059
|
+
"$ref": "#/components/schemas/Problem"
|
|
2060
|
+
}
|
|
2061
|
+
}
|
|
2062
|
+
}
|
|
2063
|
+
},
|
|
2064
|
+
"423": {
|
|
2065
|
+
"description": "The password must be confirmed first (`POST /auth/password/confirm`): a problem of type `urn:panneau:problem:password-confirmation`.",
|
|
2066
|
+
"content": {
|
|
2067
|
+
"application/problem+json": {
|
|
2068
|
+
"schema": {
|
|
2069
|
+
"$ref": "#/components/schemas/Problem"
|
|
2070
|
+
}
|
|
2071
|
+
}
|
|
2072
|
+
}
|
|
2073
|
+
}
|
|
2074
|
+
}
|
|
2075
|
+
},
|
|
2076
|
+
"delete": {
|
|
2077
|
+
"operationId": "disableTwoFactor",
|
|
2078
|
+
"summary": "Turns it off. A `409` when the backend requires it for the user.",
|
|
2079
|
+
"responses": {
|
|
2080
|
+
"204": {
|
|
2081
|
+
"description": "Turned off."
|
|
2082
|
+
},
|
|
2083
|
+
"401": {
|
|
2084
|
+
"description": "Not authenticated.",
|
|
2085
|
+
"content": {
|
|
2086
|
+
"application/problem+json": {
|
|
2087
|
+
"schema": {
|
|
2088
|
+
"$ref": "#/components/schemas/Problem"
|
|
2089
|
+
}
|
|
2090
|
+
}
|
|
2091
|
+
}
|
|
2092
|
+
},
|
|
2093
|
+
"403": {
|
|
2094
|
+
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`. With `auth.emailVerification`, a user whose email address isn't verified gets a problem of type `urn:panneau:problem:email-unverified` on every operation but those of the auth. A user who must have two-factor authentication and hasn't set it up gets a problem of type `urn:panneau:problem:two-factor-required` on every operation but those of the auth and of `/account/two-factor`.",
|
|
2095
|
+
"content": {
|
|
2096
|
+
"application/problem+json": {
|
|
2097
|
+
"schema": {
|
|
2098
|
+
"$ref": "#/components/schemas/Problem"
|
|
2099
|
+
}
|
|
2100
|
+
}
|
|
2101
|
+
}
|
|
2102
|
+
},
|
|
2103
|
+
"409": {
|
|
2104
|
+
"description": "Conflict with a business rule.",
|
|
2105
|
+
"content": {
|
|
2106
|
+
"application/problem+json": {
|
|
2107
|
+
"schema": {
|
|
2108
|
+
"$ref": "#/components/schemas/Problem"
|
|
2109
|
+
}
|
|
2110
|
+
}
|
|
2111
|
+
}
|
|
2112
|
+
},
|
|
2113
|
+
"423": {
|
|
2114
|
+
"description": "The password must be confirmed first (`POST /auth/password/confirm`): a problem of type `urn:panneau:problem:password-confirmation`.",
|
|
2115
|
+
"content": {
|
|
2116
|
+
"application/problem+json": {
|
|
2117
|
+
"schema": {
|
|
2118
|
+
"$ref": "#/components/schemas/Problem"
|
|
2119
|
+
}
|
|
2120
|
+
}
|
|
2121
|
+
}
|
|
2122
|
+
}
|
|
2123
|
+
}
|
|
2124
|
+
},
|
|
2125
|
+
"parameters": [
|
|
2126
|
+
{
|
|
2127
|
+
"$ref": "#/components/parameters/Context"
|
|
2128
|
+
}
|
|
2129
|
+
]
|
|
2130
|
+
},
|
|
2131
|
+
"/account/two-factor/confirm": {
|
|
2132
|
+
"post": {
|
|
2133
|
+
"operationId": "confirmTwoFactor",
|
|
2134
|
+
"requestBody": {
|
|
2135
|
+
"required": true,
|
|
2136
|
+
"content": {
|
|
2137
|
+
"application/json": {
|
|
2138
|
+
"schema": {
|
|
2139
|
+
"type": "object",
|
|
2140
|
+
"required": [
|
|
2141
|
+
"code"
|
|
2142
|
+
],
|
|
2143
|
+
"properties": {
|
|
2144
|
+
"code": {
|
|
2145
|
+
"type": "string"
|
|
2146
|
+
}
|
|
2147
|
+
}
|
|
2148
|
+
}
|
|
2149
|
+
}
|
|
2150
|
+
}
|
|
2151
|
+
},
|
|
2152
|
+
"responses": {
|
|
2153
|
+
"200": {
|
|
2154
|
+
"description": "Turned on, with its recovery codes.",
|
|
2155
|
+
"content": {
|
|
2156
|
+
"application/json": {
|
|
2157
|
+
"schema": {
|
|
2158
|
+
"$ref": "#/components/schemas/RecoveryCodes"
|
|
2159
|
+
}
|
|
2160
|
+
}
|
|
2161
|
+
}
|
|
2162
|
+
},
|
|
2163
|
+
"401": {
|
|
2164
|
+
"description": "Not authenticated.",
|
|
2165
|
+
"content": {
|
|
2166
|
+
"application/problem+json": {
|
|
2167
|
+
"schema": {
|
|
2168
|
+
"$ref": "#/components/schemas/Problem"
|
|
2169
|
+
}
|
|
2170
|
+
}
|
|
2171
|
+
}
|
|
2172
|
+
},
|
|
2173
|
+
"403": {
|
|
2174
|
+
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`. With `auth.emailVerification`, a user whose email address isn't verified gets a problem of type `urn:panneau:problem:email-unverified` on every operation but those of the auth. A user who must have two-factor authentication and hasn't set it up gets a problem of type `urn:panneau:problem:two-factor-required` on every operation but those of the auth and of `/account/two-factor`.",
|
|
2175
|
+
"content": {
|
|
2176
|
+
"application/problem+json": {
|
|
2177
|
+
"schema": {
|
|
2178
|
+
"$ref": "#/components/schemas/Problem"
|
|
2179
|
+
}
|
|
2180
|
+
}
|
|
2181
|
+
}
|
|
2182
|
+
},
|
|
2183
|
+
"409": {
|
|
2184
|
+
"description": "Conflict with a business rule.",
|
|
2185
|
+
"content": {
|
|
2186
|
+
"application/problem+json": {
|
|
2187
|
+
"schema": {
|
|
2188
|
+
"$ref": "#/components/schemas/Problem"
|
|
2189
|
+
}
|
|
2190
|
+
}
|
|
2191
|
+
}
|
|
2192
|
+
},
|
|
2193
|
+
"422": {
|
|
2194
|
+
"description": "Invalid values: messages are in `errors`, keyed by dot path.",
|
|
2195
|
+
"content": {
|
|
2196
|
+
"application/problem+json": {
|
|
2197
|
+
"schema": {
|
|
2198
|
+
"$ref": "#/components/schemas/Problem"
|
|
2199
|
+
}
|
|
2200
|
+
}
|
|
2201
|
+
}
|
|
2202
|
+
},
|
|
2203
|
+
"423": {
|
|
2204
|
+
"description": "The password must be confirmed first (`POST /auth/password/confirm`): a problem of type `urn:panneau:problem:password-confirmation`.",
|
|
2205
|
+
"content": {
|
|
2206
|
+
"application/problem+json": {
|
|
2207
|
+
"schema": {
|
|
2208
|
+
"$ref": "#/components/schemas/Problem"
|
|
2209
|
+
}
|
|
2210
|
+
}
|
|
2211
|
+
}
|
|
2212
|
+
}
|
|
2213
|
+
}
|
|
2214
|
+
},
|
|
2215
|
+
"parameters": [
|
|
2216
|
+
{
|
|
2217
|
+
"$ref": "#/components/parameters/Context"
|
|
2218
|
+
}
|
|
2219
|
+
]
|
|
2220
|
+
},
|
|
2221
|
+
"/account/two-factor/recovery-codes": {
|
|
2222
|
+
"post": {
|
|
2223
|
+
"operationId": "regenerateRecoveryCodes",
|
|
2224
|
+
"summary": "New recovery codes, in place of the old ones.",
|
|
2225
|
+
"responses": {
|
|
2226
|
+
"200": {
|
|
2227
|
+
"description": "The new codes.",
|
|
2228
|
+
"content": {
|
|
2229
|
+
"application/json": {
|
|
2230
|
+
"schema": {
|
|
2231
|
+
"$ref": "#/components/schemas/RecoveryCodes"
|
|
2232
|
+
}
|
|
2233
|
+
}
|
|
2234
|
+
}
|
|
2235
|
+
},
|
|
2236
|
+
"401": {
|
|
2237
|
+
"description": "Not authenticated.",
|
|
2238
|
+
"content": {
|
|
2239
|
+
"application/problem+json": {
|
|
2240
|
+
"schema": {
|
|
2241
|
+
"$ref": "#/components/schemas/Problem"
|
|
2242
|
+
}
|
|
2243
|
+
}
|
|
2244
|
+
}
|
|
2245
|
+
},
|
|
2246
|
+
"403": {
|
|
2247
|
+
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`. With `auth.emailVerification`, a user whose email address isn't verified gets a problem of type `urn:panneau:problem:email-unverified` on every operation but those of the auth. A user who must have two-factor authentication and hasn't set it up gets a problem of type `urn:panneau:problem:two-factor-required` on every operation but those of the auth and of `/account/two-factor`.",
|
|
2248
|
+
"content": {
|
|
2249
|
+
"application/problem+json": {
|
|
2250
|
+
"schema": {
|
|
2251
|
+
"$ref": "#/components/schemas/Problem"
|
|
2252
|
+
}
|
|
2253
|
+
}
|
|
2254
|
+
}
|
|
2255
|
+
},
|
|
2256
|
+
"409": {
|
|
2257
|
+
"description": "Conflict with a business rule.",
|
|
2258
|
+
"content": {
|
|
2259
|
+
"application/problem+json": {
|
|
2260
|
+
"schema": {
|
|
2261
|
+
"$ref": "#/components/schemas/Problem"
|
|
2262
|
+
}
|
|
2263
|
+
}
|
|
2264
|
+
}
|
|
2265
|
+
},
|
|
2266
|
+
"423": {
|
|
2267
|
+
"description": "The password must be confirmed first (`POST /auth/password/confirm`): a problem of type `urn:panneau:problem:password-confirmation`.",
|
|
2268
|
+
"content": {
|
|
2269
|
+
"application/problem+json": {
|
|
2270
|
+
"schema": {
|
|
2271
|
+
"$ref": "#/components/schemas/Problem"
|
|
2272
|
+
}
|
|
2273
|
+
}
|
|
2274
|
+
}
|
|
2275
|
+
}
|
|
2276
|
+
}
|
|
2277
|
+
},
|
|
2278
|
+
"parameters": [
|
|
2279
|
+
{
|
|
2280
|
+
"$ref": "#/components/parameters/Context"
|
|
2281
|
+
}
|
|
2282
|
+
]
|
|
2283
|
+
},
|
|
2284
|
+
"/auth/passkeys/options": {
|
|
2285
|
+
"post": {
|
|
2286
|
+
"operationId": "passkeyLoginOptions",
|
|
2287
|
+
"summary": "With `auth.passkeys`: the options of `navigator.credentials.get()`, for any passkey of the site.",
|
|
2288
|
+
"responses": {
|
|
2289
|
+
"200": {
|
|
2290
|
+
"description": "The options.",
|
|
2291
|
+
"content": {
|
|
2292
|
+
"application/json": {
|
|
2293
|
+
"schema": {
|
|
2294
|
+
"$ref": "#/components/schemas/WebAuthnOptions"
|
|
2295
|
+
}
|
|
2296
|
+
}
|
|
2297
|
+
}
|
|
2298
|
+
},
|
|
2299
|
+
"403": {
|
|
2300
|
+
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`. With `auth.emailVerification`, a user whose email address isn't verified gets a problem of type `urn:panneau:problem:email-unverified` on every operation but those of the auth. A user who must have two-factor authentication and hasn't set it up gets a problem of type `urn:panneau:problem:two-factor-required` on every operation but those of the auth and of `/account/two-factor`.",
|
|
2301
|
+
"content": {
|
|
2302
|
+
"application/problem+json": {
|
|
2303
|
+
"schema": {
|
|
2304
|
+
"$ref": "#/components/schemas/Problem"
|
|
2305
|
+
}
|
|
2306
|
+
}
|
|
2307
|
+
}
|
|
2308
|
+
},
|
|
2309
|
+
"429": {
|
|
2310
|
+
"description": "Too many requests: `Retry-After` gives the seconds to wait.",
|
|
2311
|
+
"content": {
|
|
2312
|
+
"application/problem+json": {
|
|
2313
|
+
"schema": {
|
|
2314
|
+
"$ref": "#/components/schemas/Problem"
|
|
2315
|
+
}
|
|
2316
|
+
}
|
|
2317
|
+
}
|
|
2318
|
+
}
|
|
2319
|
+
}
|
|
2320
|
+
},
|
|
2321
|
+
"parameters": [
|
|
2322
|
+
{
|
|
2323
|
+
"$ref": "#/components/parameters/Context"
|
|
2324
|
+
}
|
|
2325
|
+
]
|
|
2326
|
+
},
|
|
2327
|
+
"/auth/passkeys/login": {
|
|
2328
|
+
"post": {
|
|
2329
|
+
"operationId": "passkeyLogin",
|
|
2330
|
+
"summary": "Logs in with the credential of a passkey, in the JSON form of the WebAuthn spec. It does not ask for a second factor.",
|
|
2331
|
+
"requestBody": {
|
|
2332
|
+
"required": true,
|
|
2333
|
+
"content": {
|
|
2334
|
+
"application/json": {
|
|
2335
|
+
"schema": {
|
|
2336
|
+
"type": "object",
|
|
2337
|
+
"required": [
|
|
2338
|
+
"credential"
|
|
2339
|
+
],
|
|
2340
|
+
"properties": {
|
|
2341
|
+
"credential": {
|
|
2342
|
+
"type": "object",
|
|
2343
|
+
"additionalProperties": true
|
|
2344
|
+
},
|
|
2345
|
+
"remember": {
|
|
2346
|
+
"type": "boolean"
|
|
2347
|
+
}
|
|
2348
|
+
}
|
|
2349
|
+
}
|
|
2350
|
+
}
|
|
2351
|
+
}
|
|
2352
|
+
},
|
|
2353
|
+
"responses": {
|
|
2354
|
+
"200": {
|
|
2355
|
+
"description": "Logged in.",
|
|
2356
|
+
"content": {
|
|
2357
|
+
"application/json": {
|
|
2358
|
+
"schema": {
|
|
2359
|
+
"$ref": "#/components/schemas/Session"
|
|
2360
|
+
}
|
|
2361
|
+
}
|
|
2362
|
+
}
|
|
2363
|
+
},
|
|
2364
|
+
"403": {
|
|
2365
|
+
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`. With `auth.emailVerification`, a user whose email address isn't verified gets a problem of type `urn:panneau:problem:email-unverified` on every operation but those of the auth. A user who must have two-factor authentication and hasn't set it up gets a problem of type `urn:panneau:problem:two-factor-required` on every operation but those of the auth and of `/account/two-factor`.",
|
|
2366
|
+
"content": {
|
|
2367
|
+
"application/problem+json": {
|
|
2368
|
+
"schema": {
|
|
2369
|
+
"$ref": "#/components/schemas/Problem"
|
|
2370
|
+
}
|
|
2371
|
+
}
|
|
2372
|
+
}
|
|
2373
|
+
},
|
|
2374
|
+
"422": {
|
|
2375
|
+
"description": "Invalid values: messages are in `errors`, keyed by dot path.",
|
|
2376
|
+
"content": {
|
|
2377
|
+
"application/problem+json": {
|
|
2378
|
+
"schema": {
|
|
2379
|
+
"$ref": "#/components/schemas/Problem"
|
|
2380
|
+
}
|
|
2381
|
+
}
|
|
2382
|
+
}
|
|
2383
|
+
},
|
|
2384
|
+
"429": {
|
|
2385
|
+
"description": "Too many requests: `Retry-After` gives the seconds to wait.",
|
|
2386
|
+
"content": {
|
|
2387
|
+
"application/problem+json": {
|
|
2388
|
+
"schema": {
|
|
2389
|
+
"$ref": "#/components/schemas/Problem"
|
|
2390
|
+
}
|
|
2391
|
+
}
|
|
2392
|
+
}
|
|
2393
|
+
}
|
|
2394
|
+
}
|
|
2395
|
+
},
|
|
2396
|
+
"parameters": [
|
|
2397
|
+
{
|
|
2398
|
+
"$ref": "#/components/parameters/Context"
|
|
2399
|
+
}
|
|
2400
|
+
]
|
|
2401
|
+
},
|
|
2402
|
+
"/account/passkeys": {
|
|
2403
|
+
"get": {
|
|
2404
|
+
"operationId": "listPasskeys",
|
|
2405
|
+
"responses": {
|
|
2406
|
+
"200": {
|
|
2407
|
+
"description": "The passkeys of the current user.",
|
|
2408
|
+
"content": {
|
|
2409
|
+
"application/json": {
|
|
2410
|
+
"schema": {
|
|
2411
|
+
"type": "object",
|
|
2412
|
+
"required": [
|
|
2413
|
+
"data"
|
|
2414
|
+
],
|
|
2415
|
+
"properties": {
|
|
2416
|
+
"data": {
|
|
2417
|
+
"type": "array",
|
|
2418
|
+
"items": {
|
|
2419
|
+
"$ref": "#/components/schemas/Passkey"
|
|
2420
|
+
}
|
|
2421
|
+
}
|
|
2422
|
+
}
|
|
2423
|
+
}
|
|
2424
|
+
}
|
|
2425
|
+
}
|
|
2426
|
+
},
|
|
2427
|
+
"401": {
|
|
2428
|
+
"description": "Not authenticated.",
|
|
2429
|
+
"content": {
|
|
2430
|
+
"application/problem+json": {
|
|
2431
|
+
"schema": {
|
|
2432
|
+
"$ref": "#/components/schemas/Problem"
|
|
2433
|
+
}
|
|
2434
|
+
}
|
|
2435
|
+
}
|
|
2436
|
+
},
|
|
2437
|
+
"403": {
|
|
2438
|
+
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`. With `auth.emailVerification`, a user whose email address isn't verified gets a problem of type `urn:panneau:problem:email-unverified` on every operation but those of the auth. A user who must have two-factor authentication and hasn't set it up gets a problem of type `urn:panneau:problem:two-factor-required` on every operation but those of the auth and of `/account/two-factor`.",
|
|
2439
|
+
"content": {
|
|
2440
|
+
"application/problem+json": {
|
|
2441
|
+
"schema": {
|
|
2442
|
+
"$ref": "#/components/schemas/Problem"
|
|
2443
|
+
}
|
|
2444
|
+
}
|
|
2445
|
+
}
|
|
2446
|
+
}
|
|
2447
|
+
}
|
|
2448
|
+
},
|
|
2449
|
+
"post": {
|
|
2450
|
+
"operationId": "addPasskey",
|
|
2451
|
+
"summary": "Adds a passkey, with the credential of `navigator.credentials.create()` for the options of `POST /account/passkeys/options`.",
|
|
2452
|
+
"requestBody": {
|
|
2453
|
+
"required": true,
|
|
2454
|
+
"content": {
|
|
2455
|
+
"application/json": {
|
|
2456
|
+
"schema": {
|
|
2457
|
+
"type": "object",
|
|
2458
|
+
"required": [
|
|
2459
|
+
"name",
|
|
2460
|
+
"credential"
|
|
2461
|
+
],
|
|
2462
|
+
"properties": {
|
|
2463
|
+
"name": {
|
|
2464
|
+
"type": "string"
|
|
2465
|
+
},
|
|
2466
|
+
"credential": {
|
|
2467
|
+
"type": "object",
|
|
2468
|
+
"additionalProperties": true
|
|
2469
|
+
}
|
|
2470
|
+
}
|
|
2471
|
+
}
|
|
2472
|
+
}
|
|
2473
|
+
}
|
|
2474
|
+
},
|
|
2475
|
+
"responses": {
|
|
2476
|
+
"201": {
|
|
2477
|
+
"description": "The passkey.",
|
|
2478
|
+
"content": {
|
|
2479
|
+
"application/json": {
|
|
2480
|
+
"schema": {
|
|
2481
|
+
"type": "object",
|
|
2482
|
+
"required": [
|
|
2483
|
+
"data"
|
|
2484
|
+
],
|
|
2485
|
+
"properties": {
|
|
2486
|
+
"data": {
|
|
2487
|
+
"$ref": "#/components/schemas/Passkey"
|
|
2488
|
+
}
|
|
2489
|
+
}
|
|
2490
|
+
}
|
|
2491
|
+
}
|
|
2492
|
+
}
|
|
2493
|
+
},
|
|
2494
|
+
"401": {
|
|
2495
|
+
"description": "Not authenticated.",
|
|
2496
|
+
"content": {
|
|
2497
|
+
"application/problem+json": {
|
|
2498
|
+
"schema": {
|
|
2499
|
+
"$ref": "#/components/schemas/Problem"
|
|
2500
|
+
}
|
|
2501
|
+
}
|
|
2502
|
+
}
|
|
2503
|
+
},
|
|
2504
|
+
"403": {
|
|
2505
|
+
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`. With `auth.emailVerification`, a user whose email address isn't verified gets a problem of type `urn:panneau:problem:email-unverified` on every operation but those of the auth. A user who must have two-factor authentication and hasn't set it up gets a problem of type `urn:panneau:problem:two-factor-required` on every operation but those of the auth and of `/account/two-factor`.",
|
|
2506
|
+
"content": {
|
|
2507
|
+
"application/problem+json": {
|
|
2508
|
+
"schema": {
|
|
2509
|
+
"$ref": "#/components/schemas/Problem"
|
|
2510
|
+
}
|
|
2511
|
+
}
|
|
2512
|
+
}
|
|
2513
|
+
},
|
|
2514
|
+
"409": {
|
|
2515
|
+
"description": "Conflict with a business rule.",
|
|
2516
|
+
"content": {
|
|
2517
|
+
"application/problem+json": {
|
|
2518
|
+
"schema": {
|
|
2519
|
+
"$ref": "#/components/schemas/Problem"
|
|
2520
|
+
}
|
|
2521
|
+
}
|
|
2522
|
+
}
|
|
2523
|
+
},
|
|
2524
|
+
"422": {
|
|
2525
|
+
"description": "Invalid values: messages are in `errors`, keyed by dot path.",
|
|
2526
|
+
"content": {
|
|
2527
|
+
"application/problem+json": {
|
|
2528
|
+
"schema": {
|
|
2529
|
+
"$ref": "#/components/schemas/Problem"
|
|
2530
|
+
}
|
|
2531
|
+
}
|
|
2532
|
+
}
|
|
2533
|
+
},
|
|
2534
|
+
"423": {
|
|
2535
|
+
"description": "The password must be confirmed first (`POST /auth/password/confirm`): a problem of type `urn:panneau:problem:password-confirmation`.",
|
|
2536
|
+
"content": {
|
|
2537
|
+
"application/problem+json": {
|
|
2538
|
+
"schema": {
|
|
2539
|
+
"$ref": "#/components/schemas/Problem"
|
|
2540
|
+
}
|
|
2541
|
+
}
|
|
2542
|
+
}
|
|
2543
|
+
}
|
|
2544
|
+
}
|
|
2545
|
+
},
|
|
2546
|
+
"parameters": [
|
|
2547
|
+
{
|
|
2548
|
+
"$ref": "#/components/parameters/Context"
|
|
2549
|
+
}
|
|
2550
|
+
]
|
|
2551
|
+
},
|
|
2552
|
+
"/account/passkeys/options": {
|
|
2553
|
+
"post": {
|
|
2554
|
+
"operationId": "passkeyRegistrationOptions",
|
|
2555
|
+
"summary": "The options of `navigator.credentials.create()`, for the current user. A `409` for a user who can't have passkeys.",
|
|
1662
2556
|
"responses": {
|
|
1663
2557
|
"200": {
|
|
1664
|
-
"description": "
|
|
2558
|
+
"description": "The options.",
|
|
1665
2559
|
"content": {
|
|
1666
2560
|
"application/json": {
|
|
1667
2561
|
"schema": {
|
|
1668
|
-
"$ref": "#/components/schemas/
|
|
2562
|
+
"$ref": "#/components/schemas/WebAuthnOptions"
|
|
1669
2563
|
}
|
|
1670
2564
|
}
|
|
1671
2565
|
}
|
|
1672
2566
|
},
|
|
1673
|
-
"
|
|
1674
|
-
"description": "Not
|
|
2567
|
+
"401": {
|
|
2568
|
+
"description": "Not authenticated.",
|
|
1675
2569
|
"content": {
|
|
1676
2570
|
"application/problem+json": {
|
|
1677
2571
|
"schema": {
|
|
@@ -1680,8 +2574,8 @@
|
|
|
1680
2574
|
}
|
|
1681
2575
|
}
|
|
1682
2576
|
},
|
|
1683
|
-
"
|
|
1684
|
-
"description": "
|
|
2577
|
+
"403": {
|
|
2578
|
+
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`. With `auth.emailVerification`, a user whose email address isn't verified gets a problem of type `urn:panneau:problem:email-unverified` on every operation but those of the auth. A user who must have two-factor authentication and hasn't set it up gets a problem of type `urn:panneau:problem:two-factor-required` on every operation but those of the auth and of `/account/two-factor`.",
|
|
1685
2579
|
"content": {
|
|
1686
2580
|
"application/problem+json": {
|
|
1687
2581
|
"schema": {
|
|
@@ -1689,32 +2583,19 @@
|
|
|
1689
2583
|
}
|
|
1690
2584
|
}
|
|
1691
2585
|
}
|
|
1692
|
-
}
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
"parameters": [
|
|
1696
|
-
{
|
|
1697
|
-
"$ref": "#/components/parameters/Context"
|
|
1698
|
-
}
|
|
1699
|
-
]
|
|
1700
|
-
},
|
|
1701
|
-
"/auth/passkeys/options": {
|
|
1702
|
-
"post": {
|
|
1703
|
-
"operationId": "passkeyOptions",
|
|
1704
|
-
"responses": {
|
|
1705
|
-
"200": {
|
|
1706
|
-
"description": "WebAuthn request options.",
|
|
2586
|
+
},
|
|
2587
|
+
"409": {
|
|
2588
|
+
"description": "Conflict with a business rule.",
|
|
1707
2589
|
"content": {
|
|
1708
|
-
"application/json": {
|
|
2590
|
+
"application/problem+json": {
|
|
1709
2591
|
"schema": {
|
|
1710
|
-
"
|
|
1711
|
-
"additionalProperties": true
|
|
2592
|
+
"$ref": "#/components/schemas/Problem"
|
|
1712
2593
|
}
|
|
1713
2594
|
}
|
|
1714
2595
|
}
|
|
1715
2596
|
},
|
|
1716
|
-
"
|
|
1717
|
-
"description": "
|
|
2597
|
+
"423": {
|
|
2598
|
+
"description": "The password must be confirmed first (`POST /auth/password/confirm`): a problem of type `urn:panneau:problem:password-confirmation`.",
|
|
1718
2599
|
"content": {
|
|
1719
2600
|
"application/problem+json": {
|
|
1720
2601
|
"schema": {
|
|
@@ -1731,33 +2612,39 @@
|
|
|
1731
2612
|
}
|
|
1732
2613
|
]
|
|
1733
2614
|
},
|
|
1734
|
-
"/
|
|
1735
|
-
"
|
|
1736
|
-
|
|
1737
|
-
|
|
2615
|
+
"/account/passkeys/{passkey}": {
|
|
2616
|
+
"parameters": [
|
|
2617
|
+
{
|
|
2618
|
+
"name": "passkey",
|
|
2619
|
+
"in": "path",
|
|
1738
2620
|
"required": true,
|
|
1739
|
-
"
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
"type": "object",
|
|
1743
|
-
"additionalProperties": true
|
|
1744
|
-
}
|
|
1745
|
-
}
|
|
2621
|
+
"description": "The id of the passkey.",
|
|
2622
|
+
"schema": {
|
|
2623
|
+
"type": "string"
|
|
1746
2624
|
}
|
|
1747
2625
|
},
|
|
2626
|
+
{
|
|
2627
|
+
"$ref": "#/components/parameters/Context"
|
|
2628
|
+
}
|
|
2629
|
+
],
|
|
2630
|
+
"delete": {
|
|
2631
|
+
"operationId": "deletePasskey",
|
|
1748
2632
|
"responses": {
|
|
1749
|
-
"
|
|
1750
|
-
"description": "
|
|
2633
|
+
"204": {
|
|
2634
|
+
"description": "Removed."
|
|
2635
|
+
},
|
|
2636
|
+
"401": {
|
|
2637
|
+
"description": "Not authenticated.",
|
|
1751
2638
|
"content": {
|
|
1752
|
-
"application/json": {
|
|
2639
|
+
"application/problem+json": {
|
|
1753
2640
|
"schema": {
|
|
1754
|
-
"$ref": "#/components/schemas/
|
|
2641
|
+
"$ref": "#/components/schemas/Problem"
|
|
1755
2642
|
}
|
|
1756
2643
|
}
|
|
1757
2644
|
}
|
|
1758
2645
|
},
|
|
1759
2646
|
"403": {
|
|
1760
|
-
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`.",
|
|
2647
|
+
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`. With `auth.emailVerification`, a user whose email address isn't verified gets a problem of type `urn:panneau:problem:email-unverified` on every operation but those of the auth. A user who must have two-factor authentication and hasn't set it up gets a problem of type `urn:panneau:problem:two-factor-required` on every operation but those of the auth and of `/account/two-factor`.",
|
|
1761
2648
|
"content": {
|
|
1762
2649
|
"application/problem+json": {
|
|
1763
2650
|
"schema": {
|
|
@@ -1766,8 +2653,18 @@
|
|
|
1766
2653
|
}
|
|
1767
2654
|
}
|
|
1768
2655
|
},
|
|
1769
|
-
"
|
|
1770
|
-
"description": "
|
|
2656
|
+
"404": {
|
|
2657
|
+
"description": "Not found.",
|
|
2658
|
+
"content": {
|
|
2659
|
+
"application/problem+json": {
|
|
2660
|
+
"schema": {
|
|
2661
|
+
"$ref": "#/components/schemas/Problem"
|
|
2662
|
+
}
|
|
2663
|
+
}
|
|
2664
|
+
}
|
|
2665
|
+
},
|
|
2666
|
+
"423": {
|
|
2667
|
+
"description": "The password must be confirmed first (`POST /auth/password/confirm`): a problem of type `urn:panneau:problem:password-confirmation`.",
|
|
1771
2668
|
"content": {
|
|
1772
2669
|
"application/problem+json": {
|
|
1773
2670
|
"schema": {
|
|
@@ -1777,16 +2674,12 @@
|
|
|
1777
2674
|
}
|
|
1778
2675
|
}
|
|
1779
2676
|
}
|
|
1780
|
-
}
|
|
1781
|
-
"parameters": [
|
|
1782
|
-
{
|
|
1783
|
-
"$ref": "#/components/parameters/Context"
|
|
1784
|
-
}
|
|
1785
|
-
]
|
|
2677
|
+
}
|
|
1786
2678
|
},
|
|
1787
2679
|
"/account": {
|
|
1788
2680
|
"get": {
|
|
1789
2681
|
"operationId": "getAccount",
|
|
2682
|
+
"summary": "With `auth.account`: the current user.",
|
|
1790
2683
|
"responses": {
|
|
1791
2684
|
"200": {
|
|
1792
2685
|
"description": "The current user.",
|
|
@@ -1817,7 +2710,7 @@
|
|
|
1817
2710
|
}
|
|
1818
2711
|
},
|
|
1819
2712
|
"403": {
|
|
1820
|
-
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`.",
|
|
2713
|
+
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`. With `auth.emailVerification`, a user whose email address isn't verified gets a problem of type `urn:panneau:problem:email-unverified` on every operation but those of the auth. A user who must have two-factor authentication and hasn't set it up gets a problem of type `urn:panneau:problem:two-factor-required` on every operation but those of the auth and of `/account/two-factor`.",
|
|
1821
2714
|
"content": {
|
|
1822
2715
|
"application/problem+json": {
|
|
1823
2716
|
"schema": {
|
|
@@ -1830,13 +2723,21 @@
|
|
|
1830
2723
|
},
|
|
1831
2724
|
"patch": {
|
|
1832
2725
|
"operationId": "updateAccount",
|
|
2726
|
+
"summary": "Saves the name and the email of the current user. With `auth.emailVerification`, a new email is unverified, and gets a link.",
|
|
1833
2727
|
"requestBody": {
|
|
1834
2728
|
"required": true,
|
|
1835
2729
|
"content": {
|
|
1836
2730
|
"application/json": {
|
|
1837
2731
|
"schema": {
|
|
1838
2732
|
"type": "object",
|
|
1839
|
-
"
|
|
2733
|
+
"properties": {
|
|
2734
|
+
"name": {
|
|
2735
|
+
"type": "string"
|
|
2736
|
+
},
|
|
2737
|
+
"email": {
|
|
2738
|
+
"type": "string"
|
|
2739
|
+
}
|
|
2740
|
+
}
|
|
1840
2741
|
}
|
|
1841
2742
|
}
|
|
1842
2743
|
}
|
|
@@ -1871,7 +2772,75 @@
|
|
|
1871
2772
|
}
|
|
1872
2773
|
},
|
|
1873
2774
|
"403": {
|
|
1874
|
-
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`.",
|
|
2775
|
+
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`. With `auth.emailVerification`, a user whose email address isn't verified gets a problem of type `urn:panneau:problem:email-unverified` on every operation but those of the auth. A user who must have two-factor authentication and hasn't set it up gets a problem of type `urn:panneau:problem:two-factor-required` on every operation but those of the auth and of `/account/two-factor`.",
|
|
2776
|
+
"content": {
|
|
2777
|
+
"application/problem+json": {
|
|
2778
|
+
"schema": {
|
|
2779
|
+
"$ref": "#/components/schemas/Problem"
|
|
2780
|
+
}
|
|
2781
|
+
}
|
|
2782
|
+
}
|
|
2783
|
+
},
|
|
2784
|
+
"422": {
|
|
2785
|
+
"description": "Invalid values: messages are in `errors`, keyed by dot path.",
|
|
2786
|
+
"content": {
|
|
2787
|
+
"application/problem+json": {
|
|
2788
|
+
"schema": {
|
|
2789
|
+
"$ref": "#/components/schemas/Problem"
|
|
2790
|
+
}
|
|
2791
|
+
}
|
|
2792
|
+
}
|
|
2793
|
+
}
|
|
2794
|
+
}
|
|
2795
|
+
},
|
|
2796
|
+
"parameters": [
|
|
2797
|
+
{
|
|
2798
|
+
"$ref": "#/components/parameters/Context"
|
|
2799
|
+
}
|
|
2800
|
+
]
|
|
2801
|
+
},
|
|
2802
|
+
"/account/password": {
|
|
2803
|
+
"put": {
|
|
2804
|
+
"operationId": "updatePassword",
|
|
2805
|
+
"summary": "Changes the password of the current user, with the current one.",
|
|
2806
|
+
"requestBody": {
|
|
2807
|
+
"required": true,
|
|
2808
|
+
"content": {
|
|
2809
|
+
"application/json": {
|
|
2810
|
+
"schema": {
|
|
2811
|
+
"type": "object",
|
|
2812
|
+
"required": [
|
|
2813
|
+
"currentPassword",
|
|
2814
|
+
"password"
|
|
2815
|
+
],
|
|
2816
|
+
"properties": {
|
|
2817
|
+
"currentPassword": {
|
|
2818
|
+
"type": "string"
|
|
2819
|
+
},
|
|
2820
|
+
"password": {
|
|
2821
|
+
"type": "string"
|
|
2822
|
+
}
|
|
2823
|
+
}
|
|
2824
|
+
}
|
|
2825
|
+
}
|
|
2826
|
+
}
|
|
2827
|
+
},
|
|
2828
|
+
"responses": {
|
|
2829
|
+
"204": {
|
|
2830
|
+
"description": "The password was changed."
|
|
2831
|
+
},
|
|
2832
|
+
"401": {
|
|
2833
|
+
"description": "Not authenticated.",
|
|
2834
|
+
"content": {
|
|
2835
|
+
"application/problem+json": {
|
|
2836
|
+
"schema": {
|
|
2837
|
+
"$ref": "#/components/schemas/Problem"
|
|
2838
|
+
}
|
|
2839
|
+
}
|
|
2840
|
+
}
|
|
2841
|
+
},
|
|
2842
|
+
"403": {
|
|
2843
|
+
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`. With `auth.emailVerification`, a user whose email address isn't verified gets a problem of type `urn:panneau:problem:email-unverified` on every operation but those of the auth. A user who must have two-factor authentication and hasn't set it up gets a problem of type `urn:panneau:problem:two-factor-required` on every operation but those of the auth and of `/account/two-factor`.",
|
|
1875
2844
|
"content": {
|
|
1876
2845
|
"application/problem+json": {
|
|
1877
2846
|
"schema": {
|
|
@@ -1889,6 +2858,16 @@
|
|
|
1889
2858
|
}
|
|
1890
2859
|
}
|
|
1891
2860
|
}
|
|
2861
|
+
},
|
|
2862
|
+
"429": {
|
|
2863
|
+
"description": "Too many requests: `Retry-After` gives the seconds to wait.",
|
|
2864
|
+
"content": {
|
|
2865
|
+
"application/problem+json": {
|
|
2866
|
+
"schema": {
|
|
2867
|
+
"$ref": "#/components/schemas/Problem"
|
|
2868
|
+
}
|
|
2869
|
+
}
|
|
2870
|
+
}
|
|
1892
2871
|
}
|
|
1893
2872
|
}
|
|
1894
2873
|
},
|
|
@@ -1957,7 +2936,7 @@
|
|
|
1957
2936
|
}
|
|
1958
2937
|
},
|
|
1959
2938
|
"403": {
|
|
1960
|
-
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`.",
|
|
2939
|
+
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`. With `auth.emailVerification`, a user whose email address isn't verified gets a problem of type `urn:panneau:problem:email-unverified` on every operation but those of the auth. A user who must have two-factor authentication and hasn't set it up gets a problem of type `urn:panneau:problem:two-factor-required` on every operation but those of the auth and of `/account/two-factor`.",
|
|
1961
2940
|
"content": {
|
|
1962
2941
|
"application/problem+json": {
|
|
1963
2942
|
"schema": {
|
|
@@ -2030,7 +3009,7 @@
|
|
|
2030
3009
|
}
|
|
2031
3010
|
},
|
|
2032
3011
|
"403": {
|
|
2033
|
-
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`.",
|
|
3012
|
+
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`. With `auth.emailVerification`, a user whose email address isn't verified gets a problem of type `urn:panneau:problem:email-unverified` on every operation but those of the auth. A user who must have two-factor authentication and hasn't set it up gets a problem of type `urn:panneau:problem:two-factor-required` on every operation but those of the auth and of `/account/two-factor`.",
|
|
2034
3013
|
"content": {
|
|
2035
3014
|
"application/problem+json": {
|
|
2036
3015
|
"schema": {
|
|
@@ -2107,7 +3086,7 @@
|
|
|
2107
3086
|
}
|
|
2108
3087
|
},
|
|
2109
3088
|
"403": {
|
|
2110
|
-
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`.",
|
|
3089
|
+
"description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`. With `auth.emailVerification`, a user whose email address isn't verified gets a problem of type `urn:panneau:problem:email-unverified` on every operation but those of the auth. A user who must have two-factor authentication and hasn't set it up gets a problem of type `urn:panneau:problem:two-factor-required` on every operation but those of the auth and of `/account/two-factor`.",
|
|
2111
3090
|
"content": {
|
|
2112
3091
|
"application/problem+json": {
|
|
2113
3092
|
"schema": {
|
|
@@ -3537,7 +4516,7 @@
|
|
|
3537
4516
|
"type": "string"
|
|
3538
4517
|
},
|
|
3539
4518
|
"url": {
|
|
3540
|
-
"description": "Where the login with this provider starts.",
|
|
4519
|
+
"description": "Where the login with this provider starts, with a full navigation. The app adds `next`, the path to come back to.",
|
|
3541
4520
|
"type": "string"
|
|
3542
4521
|
},
|
|
3543
4522
|
"icon": {
|
|
@@ -3603,16 +4582,24 @@
|
|
|
3603
4582
|
"$ref": "#/components/schemas/AuthProvider"
|
|
3604
4583
|
}
|
|
3605
4584
|
},
|
|
4585
|
+
"account": {
|
|
4586
|
+
"description": "`panneau`: the account page of the user, on `/account`: their name and email, their password, their two-factor authentication.",
|
|
4587
|
+
"type": "boolean"
|
|
4588
|
+
},
|
|
3606
4589
|
"passwordReset": {
|
|
4590
|
+
"description": "`panneau`: a \"Forgot your password?\" link on the login page, through `POST /auth/password/forgot` and `POST /auth/password/reset`.",
|
|
3607
4591
|
"type": "boolean"
|
|
3608
4592
|
},
|
|
3609
4593
|
"twoFactor": {
|
|
4594
|
+
"description": "`panneau`: two-factor authentication, which users set up through `/account/two-factor`, and which a password login asks for with a `202`.",
|
|
3610
4595
|
"type": "boolean"
|
|
3611
4596
|
},
|
|
3612
4597
|
"passkeys": {
|
|
4598
|
+
"description": "`panneau`: logins with a passkey (WebAuthn), which users add on the account page.",
|
|
3613
4599
|
"type": "boolean"
|
|
3614
4600
|
},
|
|
3615
4601
|
"emailVerification": {
|
|
4602
|
+
"description": "`panneau`: the backend refuses users whose email address isn't verified with a `403` problem of type `urn:panneau:problem:email-unverified`, and verifies it through `POST /auth/email/verification` and `POST /auth/email/verify`.",
|
|
3616
4603
|
"type": "boolean"
|
|
3617
4604
|
}
|
|
3618
4605
|
},
|
|
@@ -5438,6 +6425,138 @@
|
|
|
5438
6425
|
],
|
|
5439
6426
|
"additionalProperties": {}
|
|
5440
6427
|
},
|
|
6428
|
+
"TwoFactorChallenge": {
|
|
6429
|
+
"type": "object",
|
|
6430
|
+
"properties": {
|
|
6431
|
+
"twoFactor": {
|
|
6432
|
+
"type": "boolean",
|
|
6433
|
+
"const": true
|
|
6434
|
+
}
|
|
6435
|
+
},
|
|
6436
|
+
"required": [
|
|
6437
|
+
"twoFactor"
|
|
6438
|
+
],
|
|
6439
|
+
"additionalProperties": {},
|
|
6440
|
+
"description": "The answer of `POST /auth/login` when a second factor is needed: the login waits for `POST /auth/two-factor/challenge`."
|
|
6441
|
+
},
|
|
6442
|
+
"TwoFactorStatus": {
|
|
6443
|
+
"type": "object",
|
|
6444
|
+
"properties": {
|
|
6445
|
+
"status": {
|
|
6446
|
+
"type": "string",
|
|
6447
|
+
"enum": [
|
|
6448
|
+
"disabled",
|
|
6449
|
+
"pending",
|
|
6450
|
+
"enabled"
|
|
6451
|
+
],
|
|
6452
|
+
"description": "`pending`: set up, not confirmed with a code yet."
|
|
6453
|
+
},
|
|
6454
|
+
"required": {
|
|
6455
|
+
"type": "boolean",
|
|
6456
|
+
"description": "The backend requires it for this user: it can't be turned off."
|
|
6457
|
+
}
|
|
6458
|
+
},
|
|
6459
|
+
"required": [
|
|
6460
|
+
"status",
|
|
6461
|
+
"required"
|
|
6462
|
+
],
|
|
6463
|
+
"additionalProperties": {},
|
|
6464
|
+
"description": "The two-factor authentication of the current user."
|
|
6465
|
+
},
|
|
6466
|
+
"TwoFactorSetup": {
|
|
6467
|
+
"type": "object",
|
|
6468
|
+
"properties": {
|
|
6469
|
+
"secret": {
|
|
6470
|
+
"type": "string",
|
|
6471
|
+
"description": "The secret, to type in an authenticator app."
|
|
6472
|
+
},
|
|
6473
|
+
"otpauthUrl": {
|
|
6474
|
+
"type": "string",
|
|
6475
|
+
"description": "The `otpauth://totp/…` URL of the secret."
|
|
6476
|
+
},
|
|
6477
|
+
"qrCode": {
|
|
6478
|
+
"description": "An SVG document of the QR code of `otpauthUrl`. Clients show it as an image, never as markup.",
|
|
6479
|
+
"type": "string"
|
|
6480
|
+
}
|
|
6481
|
+
},
|
|
6482
|
+
"required": [
|
|
6483
|
+
"secret",
|
|
6484
|
+
"otpauthUrl"
|
|
6485
|
+
],
|
|
6486
|
+
"additionalProperties": {},
|
|
6487
|
+
"description": "A two-factor authentication to confirm with a code."
|
|
6488
|
+
},
|
|
6489
|
+
"RecoveryCodes": {
|
|
6490
|
+
"type": "object",
|
|
6491
|
+
"properties": {
|
|
6492
|
+
"recoveryCodes": {
|
|
6493
|
+
"type": "array",
|
|
6494
|
+
"items": {
|
|
6495
|
+
"type": "string"
|
|
6496
|
+
}
|
|
6497
|
+
}
|
|
6498
|
+
},
|
|
6499
|
+
"required": [
|
|
6500
|
+
"recoveryCodes"
|
|
6501
|
+
],
|
|
6502
|
+
"additionalProperties": {},
|
|
6503
|
+
"description": "Codes that each log in once in place of a code of the authenticator app."
|
|
6504
|
+
},
|
|
6505
|
+
"WebAuthnOptions": {
|
|
6506
|
+
"type": "object",
|
|
6507
|
+
"properties": {
|
|
6508
|
+
"options": {
|
|
6509
|
+
"type": "object",
|
|
6510
|
+
"propertyNames": {
|
|
6511
|
+
"type": "string"
|
|
6512
|
+
},
|
|
6513
|
+
"additionalProperties": {},
|
|
6514
|
+
"description": "The options of `navigator.credentials.get()` or `create()`, in the JSON form of the WebAuthn spec."
|
|
6515
|
+
}
|
|
6516
|
+
},
|
|
6517
|
+
"required": [
|
|
6518
|
+
"options"
|
|
6519
|
+
],
|
|
6520
|
+
"additionalProperties": {},
|
|
6521
|
+
"description": "The options of a WebAuthn ceremony."
|
|
6522
|
+
},
|
|
6523
|
+
"Passkey": {
|
|
6524
|
+
"type": "object",
|
|
6525
|
+
"properties": {
|
|
6526
|
+
"id": {
|
|
6527
|
+
"$ref": "#/components/schemas/Id"
|
|
6528
|
+
},
|
|
6529
|
+
"name": {
|
|
6530
|
+
"type": "string"
|
|
6531
|
+
},
|
|
6532
|
+
"authenticator": {
|
|
6533
|
+
"description": "What keeps it, when the backend knows: \"iCloud Keychain\", \"1Password\"…",
|
|
6534
|
+
"type": [
|
|
6535
|
+
"string",
|
|
6536
|
+
"null"
|
|
6537
|
+
]
|
|
6538
|
+
},
|
|
6539
|
+
"createdAt": {
|
|
6540
|
+
"type": "string",
|
|
6541
|
+
"description": "ISO 8601."
|
|
6542
|
+
},
|
|
6543
|
+
"lastUsedAt": {
|
|
6544
|
+
"description": "ISO 8601, or null before its first login.",
|
|
6545
|
+
"type": [
|
|
6546
|
+
"string",
|
|
6547
|
+
"null"
|
|
6548
|
+
]
|
|
6549
|
+
}
|
|
6550
|
+
},
|
|
6551
|
+
"required": [
|
|
6552
|
+
"id",
|
|
6553
|
+
"name",
|
|
6554
|
+
"createdAt",
|
|
6555
|
+
"lastUsedAt"
|
|
6556
|
+
],
|
|
6557
|
+
"additionalProperties": {},
|
|
6558
|
+
"description": "A passkey of the current user."
|
|
6559
|
+
},
|
|
5441
6560
|
"SearchResponse": {
|
|
5442
6561
|
"type": "object",
|
|
5443
6562
|
"properties": {
|