@webda/auth 0.0.0-stage → 4.0.0-beta.10
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/LICENSE +166 -0
- package/README.md +59 -2
- package/lib/authentication.service.d.ts +322 -0
- package/lib/authentication.service.d.ts.map +1 -0
- package/lib/authentication.service.js +978 -0
- package/lib/authentication.service.js.map +1 -0
- package/lib/certificate/certificate.service.d.ts +139 -0
- package/lib/certificate/certificate.service.d.ts.map +1 -0
- package/lib/certificate/certificate.service.js +343 -0
- package/lib/certificate/certificate.service.js.map +1 -0
- package/lib/compat/upgrade.d.ts +71 -0
- package/lib/compat/upgrade.d.ts.map +1 -0
- package/lib/compat/upgrade.js +200 -0
- package/lib/compat/upgrade.js.map +1 -0
- package/lib/email/emailpassword.service.d.ts +249 -0
- package/lib/email/emailpassword.service.d.ts.map +1 -0
- package/lib/email/emailpassword.service.js +714 -0
- package/lib/email/emailpassword.service.js.map +1 -0
- package/lib/email/tokens.d.ts +36 -0
- package/lib/email/tokens.d.ts.map +1 -0
- package/lib/email/tokens.js +46 -0
- package/lib/email/tokens.js.map +1 -0
- package/lib/errors.d.ts +53 -0
- package/lib/errors.d.ts.map +1 -0
- package/lib/errors.js +74 -0
- package/lib/errors.js.map +1 -0
- package/lib/index.d.ts +12 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +12 -0
- package/lib/index.js.map +1 -0
- package/lib/mfa/secondfactor.service.d.ts +44 -0
- package/lib/mfa/secondfactor.service.d.ts.map +1 -0
- package/lib/mfa/secondfactor.service.js +38 -0
- package/lib/mfa/secondfactor.service.js.map +1 -0
- package/lib/mfa/totp.service.d.ts +41 -0
- package/lib/mfa/totp.service.d.ts.map +1 -0
- package/lib/mfa/totp.service.js +63 -0
- package/lib/mfa/totp.service.js.map +1 -0
- package/lib/oauth/oauth.service.d.ts +296 -0
- package/lib/oauth/oauth.service.d.ts.map +1 -0
- package/lib/oauth/oauth.service.js +560 -0
- package/lib/oauth/oauth.service.js.map +1 -0
- package/lib/provider.d.ts +53 -0
- package/lib/provider.d.ts.map +1 -0
- package/lib/provider.js +55 -0
- package/lib/provider.js.map +1 -0
- package/lib/test/authtest.d.ts +39 -0
- package/lib/test/authtest.d.ts.map +1 -0
- package/lib/test/authtest.js +62 -0
- package/lib/test/authtest.js.map +1 -0
- package/lib/test/emailtest.d.ts +25 -0
- package/lib/test/emailtest.d.ts.map +1 -0
- package/lib/test/emailtest.js +42 -0
- package/lib/test/emailtest.js.map +1 -0
- package/lib/test/fakeoauth.service.d.ts +45 -0
- package/lib/test/fakeoauth.service.d.ts.map +1 -0
- package/lib/test/fakeoauth.service.js +78 -0
- package/lib/test/fakeoauth.service.js.map +1 -0
- package/lib/test/mfauser.fixture.model.d.ts +11 -0
- package/lib/test/mfauser.fixture.model.d.ts.map +1 -0
- package/lib/test/mfauser.fixture.model.js +44 -0
- package/lib/test/mfauser.fixture.model.js.map +1 -0
- package/lib/test/stubprovider.d.ts +35 -0
- package/lib/test/stubprovider.d.ts.map +1 -0
- package/lib/test/stubprovider.js +46 -0
- package/lib/test/stubprovider.js.map +1 -0
- package/lib/test/v3.d.ts +29 -0
- package/lib/test/v3.d.ts.map +1 -0
- package/lib/test/v3.js +47 -0
- package/lib/test/v3.js.map +1 -0
- package/lib/throttle.d.ts +41 -0
- package/lib/throttle.d.ts.map +1 -0
- package/lib/throttle.js +49 -0
- package/lib/throttle.js.map +1 -0
- package/package.json +69 -3
- package/test/config.json +23 -0
- package/webda.module.json +891 -0
|
@@ -0,0 +1,891 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://webda.io/schemas/webda.module.v4.json",
|
|
3
|
+
"beans": {},
|
|
4
|
+
"deployers": {},
|
|
5
|
+
"moddas": {
|
|
6
|
+
"Webda/Authentication": {
|
|
7
|
+
"Import": "lib/authentication.service:Authentication",
|
|
8
|
+
"Schema": {
|
|
9
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
10
|
+
"additionalProperties": false,
|
|
11
|
+
"definitions": {
|
|
12
|
+
"AuthenticationCompatibility": {
|
|
13
|
+
"additionalProperties": false,
|
|
14
|
+
"description": "v3 data compatibility options",
|
|
15
|
+
"properties": {
|
|
16
|
+
"v3": {
|
|
17
|
+
"default": true,
|
|
18
|
+
"description": "Read and write v3 data layouts",
|
|
19
|
+
"type": "boolean"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"type": "object"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"description": "Authentication parameters",
|
|
26
|
+
"properties": {
|
|
27
|
+
"compatibility": {
|
|
28
|
+
"$ref": "#/definitions/AuthenticationCompatibility",
|
|
29
|
+
"default": {
|
|
30
|
+
"v3": true
|
|
31
|
+
},
|
|
32
|
+
"description": "v3 data compatibility"
|
|
33
|
+
},
|
|
34
|
+
"identModel": {
|
|
35
|
+
"default": "Webda/Ident",
|
|
36
|
+
"description": "Ident model",
|
|
37
|
+
"type": "string"
|
|
38
|
+
},
|
|
39
|
+
"linking": {
|
|
40
|
+
"default": "verified",
|
|
41
|
+
"description": "Linking policy",
|
|
42
|
+
"enum": [
|
|
43
|
+
"never",
|
|
44
|
+
"verified",
|
|
45
|
+
"always"
|
|
46
|
+
],
|
|
47
|
+
"type": "string"
|
|
48
|
+
},
|
|
49
|
+
"registration": {
|
|
50
|
+
"default": true,
|
|
51
|
+
"description": "Allow automatic registration of new users",
|
|
52
|
+
"type": "boolean"
|
|
53
|
+
},
|
|
54
|
+
"type": {
|
|
55
|
+
"description": "Type of the service",
|
|
56
|
+
"type": "string"
|
|
57
|
+
},
|
|
58
|
+
"userModel": {
|
|
59
|
+
"default": "Webda/User",
|
|
60
|
+
"description": "User model",
|
|
61
|
+
"type": "string"
|
|
62
|
+
},
|
|
63
|
+
"openapi": {
|
|
64
|
+
"type": "object",
|
|
65
|
+
"additionalProperties": true
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"required": [
|
|
69
|
+
"type"
|
|
70
|
+
],
|
|
71
|
+
"type": "object",
|
|
72
|
+
"title": "Authentication"
|
|
73
|
+
},
|
|
74
|
+
"Configuration": "lib/authentication.service:AuthenticationParameters",
|
|
75
|
+
"commands": {
|
|
76
|
+
"auth migrate": {
|
|
77
|
+
"description": "Migrate v3 authentication data (idents, users) to v4",
|
|
78
|
+
"method": "migrate",
|
|
79
|
+
"args": {
|
|
80
|
+
"dryRun": {
|
|
81
|
+
"type": "boolean",
|
|
82
|
+
"default": false,
|
|
83
|
+
"description": "Only count the records to migrate, write nothing"
|
|
84
|
+
},
|
|
85
|
+
"batch": {
|
|
86
|
+
"type": "number",
|
|
87
|
+
"default": 100,
|
|
88
|
+
"description": "Page size of the store scans"
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"phase": "initialized"
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"Webda/CertificateProvider": {
|
|
96
|
+
"Import": "lib/certificate/certificate.service:CertificateProvider",
|
|
97
|
+
"Schema": {
|
|
98
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
99
|
+
"additionalProperties": false,
|
|
100
|
+
"definitions": {
|
|
101
|
+
"Record<string, string[]>": {
|
|
102
|
+
"additionalProperties": {
|
|
103
|
+
"items": {
|
|
104
|
+
"type": "string"
|
|
105
|
+
},
|
|
106
|
+
"type": "array"
|
|
107
|
+
},
|
|
108
|
+
"description": "Construct a type with a set of properties K of type T",
|
|
109
|
+
"type": "object"
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"description": "CertificateProvider parameters",
|
|
113
|
+
"properties": {
|
|
114
|
+
"allowedIssuers": {
|
|
115
|
+
"description": "Only certificates whose issuer common name or distinguished name (\"O=Webda, CN=ca\") is listed are accepted,\nundefined accepts every issuer trusted by the TLS layer",
|
|
116
|
+
"items": {
|
|
117
|
+
"type": "string"
|
|
118
|
+
},
|
|
119
|
+
"type": "array"
|
|
120
|
+
},
|
|
121
|
+
"allowedSubjects": {
|
|
122
|
+
"description": "Only certificates whose subject distinguished name (\"O=Webda, CN=alice\") matches one of these regular\nexpressions are accepted, undefined accepts every subject",
|
|
123
|
+
"items": {
|
|
124
|
+
"type": "string"
|
|
125
|
+
},
|
|
126
|
+
"type": "array"
|
|
127
|
+
},
|
|
128
|
+
"autoRegister": {
|
|
129
|
+
"default": false,
|
|
130
|
+
"description": "Register a user on the first request of an unknown certificate; otherwise the certificate has to be linked to\na logged user with `Auth.Certificate.Link`",
|
|
131
|
+
"type": "boolean"
|
|
132
|
+
},
|
|
133
|
+
"cacheTtl": {
|
|
134
|
+
"default": 60000,
|
|
135
|
+
"description": "How long a certificate resolved to a user is remembered, in milliseconds (0 disables the cache)",
|
|
136
|
+
"type": "number"
|
|
137
|
+
},
|
|
138
|
+
"identityField": {
|
|
139
|
+
"default": "fingerprint256",
|
|
140
|
+
"description": "Certificate field used as ident uid: the SHA-256 fingerprint pins one certificate, the other fields survive a\ncertificate renewal",
|
|
141
|
+
"enum": [
|
|
142
|
+
"fingerprint256",
|
|
143
|
+
"subject.CN",
|
|
144
|
+
"san.email",
|
|
145
|
+
"san.uri"
|
|
146
|
+
],
|
|
147
|
+
"type": "string"
|
|
148
|
+
},
|
|
149
|
+
"mode": {
|
|
150
|
+
"default": "login",
|
|
151
|
+
"description": "`factor` only adds `mtls` to a session already authenticated as the certificate's linked user.",
|
|
152
|
+
"enum": [
|
|
153
|
+
"login",
|
|
154
|
+
"factor"
|
|
155
|
+
],
|
|
156
|
+
"type": "string"
|
|
157
|
+
},
|
|
158
|
+
"roles": {
|
|
159
|
+
"$ref": "#/definitions/Record%3Cstring%2C%20string%5B%5D%3E",
|
|
160
|
+
"description": "Roles of the certificate sessions by subject attribute: `{ \"OU=admins\": [\"admin\"] }` gives the role admin to\ncertificates having an OU admins"
|
|
161
|
+
},
|
|
162
|
+
"type": {
|
|
163
|
+
"description": "Type of the service",
|
|
164
|
+
"type": "string"
|
|
165
|
+
},
|
|
166
|
+
"openapi": {
|
|
167
|
+
"type": "object",
|
|
168
|
+
"additionalProperties": true
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
"required": [
|
|
172
|
+
"type"
|
|
173
|
+
],
|
|
174
|
+
"type": "object",
|
|
175
|
+
"title": "CertificateProvider"
|
|
176
|
+
},
|
|
177
|
+
"Configuration": "lib/certificate/certificate.service:CertificateProviderParameters"
|
|
178
|
+
},
|
|
179
|
+
"Webda/EmailPasswordProvider": {
|
|
180
|
+
"Import": "lib/email/emailpassword.service:EmailPasswordProvider",
|
|
181
|
+
"Schema": {
|
|
182
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
183
|
+
"additionalProperties": false,
|
|
184
|
+
"definitions": {
|
|
185
|
+
"password": {
|
|
186
|
+
"additionalProperties": false,
|
|
187
|
+
"default": {
|
|
188
|
+
"policy": ".{8,}"
|
|
189
|
+
},
|
|
190
|
+
"description": "Password rules",
|
|
191
|
+
"properties": {
|
|
192
|
+
"policy": {
|
|
193
|
+
"default": ".{8,}",
|
|
194
|
+
"type": "string"
|
|
195
|
+
},
|
|
196
|
+
"verifier": {
|
|
197
|
+
"type": "string"
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
"type": "object"
|
|
201
|
+
},
|
|
202
|
+
"redirects": {
|
|
203
|
+
"additionalProperties": false,
|
|
204
|
+
"description": "Browser redirects for emailed links (no defaults: init() refuses a missing required one). `failure` and `recover`\nare always required, `verified` and `register` unless `verification` is \"none\". `recover` receives the recovery\nlink as `?token=...` (the page then calls Auth.Password.Recover). `confirm` (default `failure`) receives a\nverification link opened without the matching session, with `?reason=LOGIN_REQUIRED&token=...`: log in then call\nAuth.Email.Verify with the token",
|
|
205
|
+
"properties": {
|
|
206
|
+
"confirm": {
|
|
207
|
+
"type": "string"
|
|
208
|
+
},
|
|
209
|
+
"failure": {
|
|
210
|
+
"type": "string"
|
|
211
|
+
},
|
|
212
|
+
"recover": {
|
|
213
|
+
"type": "string"
|
|
214
|
+
},
|
|
215
|
+
"register": {
|
|
216
|
+
"type": "string"
|
|
217
|
+
},
|
|
218
|
+
"verified": {
|
|
219
|
+
"type": "string"
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
"type": "object"
|
|
223
|
+
},
|
|
224
|
+
"throttle": {
|
|
225
|
+
"additionalProperties": false,
|
|
226
|
+
"default": {
|
|
227
|
+
"failedBeforeDelay": 3,
|
|
228
|
+
"lockout": 900000,
|
|
229
|
+
"resendDelay": 14400000
|
|
230
|
+
},
|
|
231
|
+
"description": "Throttling",
|
|
232
|
+
"properties": {
|
|
233
|
+
"failedBeforeDelay": {
|
|
234
|
+
"default": 3,
|
|
235
|
+
"type": "number"
|
|
236
|
+
},
|
|
237
|
+
"lockout": {
|
|
238
|
+
"default": 900000,
|
|
239
|
+
"type": "number"
|
|
240
|
+
},
|
|
241
|
+
"resendDelay": {
|
|
242
|
+
"default": 14400000,
|
|
243
|
+
"type": "number"
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
"type": "object"
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
"description": "EmailPasswordProvider parameters",
|
|
250
|
+
"properties": {
|
|
251
|
+
"allowedEmailDomains": {
|
|
252
|
+
"description": "Only these email domains may use this provider (see ProviderEmailPolicy)",
|
|
253
|
+
"items": {
|
|
254
|
+
"type": "string"
|
|
255
|
+
},
|
|
256
|
+
"type": "array"
|
|
257
|
+
},
|
|
258
|
+
"mailer": {
|
|
259
|
+
"default": "Mailer",
|
|
260
|
+
"description": "Mailer service name",
|
|
261
|
+
"type": "string"
|
|
262
|
+
},
|
|
263
|
+
"password": {
|
|
264
|
+
"$ref": "#/definitions/password",
|
|
265
|
+
"default": {
|
|
266
|
+
"policy": ".{8,}"
|
|
267
|
+
},
|
|
268
|
+
"description": "Password rules"
|
|
269
|
+
},
|
|
270
|
+
"redirects": {
|
|
271
|
+
"$ref": "#/definitions/redirects",
|
|
272
|
+
"description": "Browser redirects for emailed links (no defaults: init() refuses a missing required one). `failure` and `recover`\nare always required, `verified` and `register` unless `verification` is \"none\". `recover` receives the recovery\nlink as `?token=...` (the page then calls Auth.Password.Recover). `confirm` (default `failure`) receives a\nverification link opened without the matching session, with `?reason=LOGIN_REQUIRED&token=...`: log in then call\nAuth.Email.Verify with the token"
|
|
273
|
+
},
|
|
274
|
+
"throttle": {
|
|
275
|
+
"$ref": "#/definitions/throttle",
|
|
276
|
+
"default": {
|
|
277
|
+
"failedBeforeDelay": 3,
|
|
278
|
+
"lockout": 900000,
|
|
279
|
+
"resendDelay": 14400000
|
|
280
|
+
},
|
|
281
|
+
"description": "Throttling"
|
|
282
|
+
},
|
|
283
|
+
"trustEmailVerification": {
|
|
284
|
+
"anyOf": [
|
|
285
|
+
{
|
|
286
|
+
"items": {
|
|
287
|
+
"type": "string"
|
|
288
|
+
},
|
|
289
|
+
"type": "array"
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
"type": "boolean"
|
|
293
|
+
}
|
|
294
|
+
],
|
|
295
|
+
"description": "Whether the verification of the email is believed (see ProviderEmailPolicy)"
|
|
296
|
+
},
|
|
297
|
+
"type": {
|
|
298
|
+
"description": "Type of the service",
|
|
299
|
+
"type": "string"
|
|
300
|
+
},
|
|
301
|
+
"url": {
|
|
302
|
+
"default": "/auth/email",
|
|
303
|
+
"description": "Base url for emailed links",
|
|
304
|
+
"type": "string"
|
|
305
|
+
},
|
|
306
|
+
"verification": {
|
|
307
|
+
"default": "before",
|
|
308
|
+
"description": "Verification mode",
|
|
309
|
+
"enum": [
|
|
310
|
+
"before",
|
|
311
|
+
"after",
|
|
312
|
+
"none"
|
|
313
|
+
],
|
|
314
|
+
"type": "string"
|
|
315
|
+
},
|
|
316
|
+
"openapi": {
|
|
317
|
+
"type": "object",
|
|
318
|
+
"additionalProperties": true
|
|
319
|
+
}
|
|
320
|
+
},
|
|
321
|
+
"required": [
|
|
322
|
+
"redirects",
|
|
323
|
+
"type"
|
|
324
|
+
],
|
|
325
|
+
"type": "object",
|
|
326
|
+
"title": "EmailPasswordProvider"
|
|
327
|
+
},
|
|
328
|
+
"Configuration": "lib/email/emailpassword.service:EmailPasswordParameters"
|
|
329
|
+
},
|
|
330
|
+
"Webda/TotpService": {
|
|
331
|
+
"Import": "lib/mfa/totp.service:TotpService",
|
|
332
|
+
"Schema": {
|
|
333
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
334
|
+
"additionalProperties": false,
|
|
335
|
+
"definitions": {
|
|
336
|
+
"ThrottleParameters": {
|
|
337
|
+
"additionalProperties": false,
|
|
338
|
+
"description": "Throttle configuration options",
|
|
339
|
+
"properties": {
|
|
340
|
+
"failedBeforeDelay": {
|
|
341
|
+
"description": "Failures allowed before lockout engages",
|
|
342
|
+
"type": "number"
|
|
343
|
+
},
|
|
344
|
+
"lockout": {
|
|
345
|
+
"description": "Lockout duration in milliseconds",
|
|
346
|
+
"type": "number"
|
|
347
|
+
}
|
|
348
|
+
},
|
|
349
|
+
"type": "object"
|
|
350
|
+
}
|
|
351
|
+
},
|
|
352
|
+
"description": "Parameters for TOTP service",
|
|
353
|
+
"properties": {
|
|
354
|
+
"algorithm": {
|
|
355
|
+
"default": "sha1",
|
|
356
|
+
"description": "HMAC hash algorithm (default \"sha1\")",
|
|
357
|
+
"enum": [
|
|
358
|
+
"sha1",
|
|
359
|
+
"sha256",
|
|
360
|
+
"sha512"
|
|
361
|
+
],
|
|
362
|
+
"type": "string"
|
|
363
|
+
},
|
|
364
|
+
"digits": {
|
|
365
|
+
"description": "Number of digits (default 6)",
|
|
366
|
+
"enum": [
|
|
367
|
+
6,
|
|
368
|
+
8
|
|
369
|
+
],
|
|
370
|
+
"type": "number"
|
|
371
|
+
},
|
|
372
|
+
"issuer": {
|
|
373
|
+
"description": "Application name / issuer shown in authenticator apps (defaults to application name)",
|
|
374
|
+
"type": "string"
|
|
375
|
+
},
|
|
376
|
+
"period": {
|
|
377
|
+
"description": "Time step in seconds (default 30)",
|
|
378
|
+
"type": "number"
|
|
379
|
+
},
|
|
380
|
+
"recoveryCodes": {
|
|
381
|
+
"description": "Number of recovery codes generated (default 10, 0 disables recovery codes)",
|
|
382
|
+
"type": "number"
|
|
383
|
+
},
|
|
384
|
+
"throttle": {
|
|
385
|
+
"$ref": "#/definitions/ThrottleParameters",
|
|
386
|
+
"description": "Throttle config for failed attempts"
|
|
387
|
+
},
|
|
388
|
+
"type": {
|
|
389
|
+
"description": "Type of the service",
|
|
390
|
+
"type": "string"
|
|
391
|
+
},
|
|
392
|
+
"window": {
|
|
393
|
+
"description": "Accepted drift window in time steps (default 1)",
|
|
394
|
+
"type": "number"
|
|
395
|
+
},
|
|
396
|
+
"openapi": {
|
|
397
|
+
"type": "object",
|
|
398
|
+
"additionalProperties": true
|
|
399
|
+
}
|
|
400
|
+
},
|
|
401
|
+
"required": [
|
|
402
|
+
"type"
|
|
403
|
+
],
|
|
404
|
+
"type": "object",
|
|
405
|
+
"title": "TotpService"
|
|
406
|
+
},
|
|
407
|
+
"Configuration": "lib/mfa/totp.service:TotpParameters"
|
|
408
|
+
}
|
|
409
|
+
},
|
|
410
|
+
"models": {},
|
|
411
|
+
"schemas": {
|
|
412
|
+
"Webda/BinaryFile": {
|
|
413
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
414
|
+
"WebdaSchema": true,
|
|
415
|
+
"additionalProperties": false,
|
|
416
|
+
"description": "Represent a file to store",
|
|
417
|
+
"properties": {
|
|
418
|
+
"hash": {
|
|
419
|
+
"description": "Will be computed by the service\n\nhash of the content",
|
|
420
|
+
"type": "string"
|
|
421
|
+
},
|
|
422
|
+
"metadata": {
|
|
423
|
+
"description": "Metadatas stored along with the binary"
|
|
424
|
+
},
|
|
425
|
+
"mimetype": {
|
|
426
|
+
"description": "Mimetype of the binary",
|
|
427
|
+
"type": "string"
|
|
428
|
+
},
|
|
429
|
+
"name": {
|
|
430
|
+
"description": "Current name",
|
|
431
|
+
"type": "string"
|
|
432
|
+
},
|
|
433
|
+
"originalname": {
|
|
434
|
+
"description": "Original name",
|
|
435
|
+
"type": "string"
|
|
436
|
+
},
|
|
437
|
+
"size": {
|
|
438
|
+
"description": "Size of the binary",
|
|
439
|
+
"type": "number"
|
|
440
|
+
}
|
|
441
|
+
},
|
|
442
|
+
"required": [
|
|
443
|
+
"mimetype",
|
|
444
|
+
"name",
|
|
445
|
+
"size"
|
|
446
|
+
],
|
|
447
|
+
"type": "object",
|
|
448
|
+
"title": "BinaryFile"
|
|
449
|
+
},
|
|
450
|
+
"Webda/OAuthTokenRequest": {
|
|
451
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
452
|
+
"WebdaSchema": true,
|
|
453
|
+
"additionalProperties": false,
|
|
454
|
+
"definitions": {
|
|
455
|
+
"OAuthTokens": {
|
|
456
|
+
"additionalProperties": {},
|
|
457
|
+
"description": "Credentials as returned by an OAuth token endpoint (google-auth-library `Credentials` shape): `id_token`,\n`access_token`, `refresh_token`, `expiry_date`, `token_type`, `scope`... Values are not typed by the schema\n(providers send nulls); providers check what they use.",
|
|
458
|
+
"type": "object"
|
|
459
|
+
}
|
|
460
|
+
},
|
|
461
|
+
"description": "Input of the `Auth.<Provider>.Token` operations: `token`, or the provider credentials `tokens`",
|
|
462
|
+
"properties": {
|
|
463
|
+
"token": {
|
|
464
|
+
"description": "Token issued by the provider to the client (an ID token for OpenID Connect providers)",
|
|
465
|
+
"type": "string"
|
|
466
|
+
},
|
|
467
|
+
"tokens": {
|
|
468
|
+
"$ref": "#/definitions/OAuthTokens",
|
|
469
|
+
"description": "Credentials obtained by the client from the provider (v3 body; its `id_token` is verified)"
|
|
470
|
+
}
|
|
471
|
+
},
|
|
472
|
+
"type": "object",
|
|
473
|
+
"title": "OAuthTokenRequest"
|
|
474
|
+
},
|
|
475
|
+
"Authentication.providers.input": {
|
|
476
|
+
"type": "object",
|
|
477
|
+
"properties": {}
|
|
478
|
+
},
|
|
479
|
+
"Authentication.providers.output": {
|
|
480
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
481
|
+
"items": {
|
|
482
|
+
"$ref": "#/definitions/ProviderInfo"
|
|
483
|
+
},
|
|
484
|
+
"type": "array",
|
|
485
|
+
"definitions": {
|
|
486
|
+
"ProviderInfo": {
|
|
487
|
+
"additionalProperties": false,
|
|
488
|
+
"description": "Describe an authentication provider exposed by an authentication service",
|
|
489
|
+
"properties": {
|
|
490
|
+
"name": {
|
|
491
|
+
"description": "Provider name",
|
|
492
|
+
"type": "string"
|
|
493
|
+
},
|
|
494
|
+
"startUrl": {
|
|
495
|
+
"description": "URL to start the authentication flow (oauth, passwordless)",
|
|
496
|
+
"type": "string"
|
|
497
|
+
},
|
|
498
|
+
"type": {
|
|
499
|
+
"description": "Provider type",
|
|
500
|
+
"enum": [
|
|
501
|
+
"password",
|
|
502
|
+
"oauth",
|
|
503
|
+
"passwordless",
|
|
504
|
+
"certificate"
|
|
505
|
+
],
|
|
506
|
+
"type": "string"
|
|
507
|
+
}
|
|
508
|
+
},
|
|
509
|
+
"required": [
|
|
510
|
+
"name",
|
|
511
|
+
"type"
|
|
512
|
+
],
|
|
513
|
+
"type": "object"
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
},
|
|
517
|
+
"Authentication.me.input": {
|
|
518
|
+
"type": "object",
|
|
519
|
+
"properties": {}
|
|
520
|
+
},
|
|
521
|
+
"Authentication.me.output": {
|
|
522
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
523
|
+
},
|
|
524
|
+
"Authentication.logout.input": {
|
|
525
|
+
"type": "object",
|
|
526
|
+
"properties": {}
|
|
527
|
+
},
|
|
528
|
+
"Authentication.logout.output": {
|
|
529
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
530
|
+
"not": {}
|
|
531
|
+
},
|
|
532
|
+
"Authentication.refresh.input": {
|
|
533
|
+
"type": "object",
|
|
534
|
+
"properties": {
|
|
535
|
+
"refreshToken": {
|
|
536
|
+
"type": "string"
|
|
537
|
+
}
|
|
538
|
+
},
|
|
539
|
+
"required": [
|
|
540
|
+
"refreshToken"
|
|
541
|
+
]
|
|
542
|
+
},
|
|
543
|
+
"Authentication.refresh.output": {
|
|
544
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
545
|
+
"additionalProperties": false,
|
|
546
|
+
"description": "Tokens returned by a successful login or refresh",
|
|
547
|
+
"properties": {
|
|
548
|
+
"accessToken": {
|
|
549
|
+
"type": "string"
|
|
550
|
+
},
|
|
551
|
+
"expiresIn": {
|
|
552
|
+
"type": "number"
|
|
553
|
+
},
|
|
554
|
+
"refreshToken": {
|
|
555
|
+
"type": "string"
|
|
556
|
+
}
|
|
557
|
+
},
|
|
558
|
+
"required": [
|
|
559
|
+
"accessToken",
|
|
560
|
+
"expiresIn",
|
|
561
|
+
"refreshToken"
|
|
562
|
+
],
|
|
563
|
+
"type": "object"
|
|
564
|
+
},
|
|
565
|
+
"Authentication.idents.input": {
|
|
566
|
+
"type": "object",
|
|
567
|
+
"properties": {}
|
|
568
|
+
},
|
|
569
|
+
"Authentication.idents.output": {
|
|
570
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
571
|
+
"items": {
|
|
572
|
+
"$ref": "#/definitions/%5B%5D"
|
|
573
|
+
},
|
|
574
|
+
"type": "array",
|
|
575
|
+
"definitions": {
|
|
576
|
+
"[]": {
|
|
577
|
+
"additionalProperties": false,
|
|
578
|
+
"properties": {
|
|
579
|
+
"email": {
|
|
580
|
+
"type": "string"
|
|
581
|
+
},
|
|
582
|
+
"lastUsedAt": {
|
|
583
|
+
"format": "date-time",
|
|
584
|
+
"type": "string"
|
|
585
|
+
},
|
|
586
|
+
"provider": {
|
|
587
|
+
"type": "string"
|
|
588
|
+
},
|
|
589
|
+
"providerUid": {
|
|
590
|
+
"type": "string"
|
|
591
|
+
},
|
|
592
|
+
"verifiedAt": {
|
|
593
|
+
"format": "date-time",
|
|
594
|
+
"type": "string"
|
|
595
|
+
}
|
|
596
|
+
},
|
|
597
|
+
"required": [
|
|
598
|
+
"provider",
|
|
599
|
+
"providerUid"
|
|
600
|
+
],
|
|
601
|
+
"type": "object"
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
},
|
|
605
|
+
"Authentication.unlink.input": {
|
|
606
|
+
"type": "object",
|
|
607
|
+
"properties": {
|
|
608
|
+
"provider": {
|
|
609
|
+
"type": "string"
|
|
610
|
+
},
|
|
611
|
+
"providerUid": {
|
|
612
|
+
"type": "string"
|
|
613
|
+
}
|
|
614
|
+
},
|
|
615
|
+
"required": [
|
|
616
|
+
"provider",
|
|
617
|
+
"providerUid"
|
|
618
|
+
]
|
|
619
|
+
},
|
|
620
|
+
"Authentication.unlink.output": {
|
|
621
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
622
|
+
"not": {}
|
|
623
|
+
},
|
|
624
|
+
"CertificateProvider.link.input": {
|
|
625
|
+
"type": "object",
|
|
626
|
+
"properties": {}
|
|
627
|
+
},
|
|
628
|
+
"CertificateProvider.link.output": {
|
|
629
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
630
|
+
"anyOf": [
|
|
631
|
+
{
|
|
632
|
+
"additionalProperties": false,
|
|
633
|
+
"properties": {
|
|
634
|
+
"accessToken": {
|
|
635
|
+
"type": "string"
|
|
636
|
+
},
|
|
637
|
+
"expiresIn": {
|
|
638
|
+
"type": "number"
|
|
639
|
+
},
|
|
640
|
+
"refreshToken": {
|
|
641
|
+
"type": "string"
|
|
642
|
+
},
|
|
643
|
+
"status": {
|
|
644
|
+
"const": "ok",
|
|
645
|
+
"type": "string"
|
|
646
|
+
},
|
|
647
|
+
"user": {}
|
|
648
|
+
},
|
|
649
|
+
"required": [
|
|
650
|
+
"accessToken",
|
|
651
|
+
"expiresIn",
|
|
652
|
+
"refreshToken",
|
|
653
|
+
"status",
|
|
654
|
+
"user"
|
|
655
|
+
],
|
|
656
|
+
"type": "object"
|
|
657
|
+
},
|
|
658
|
+
{
|
|
659
|
+
"$ref": "#/definitions/%232"
|
|
660
|
+
},
|
|
661
|
+
{
|
|
662
|
+
"$ref": "#/definitions/%233"
|
|
663
|
+
}
|
|
664
|
+
],
|
|
665
|
+
"definitions": {
|
|
666
|
+
"#2": {
|
|
667
|
+
"additionalProperties": false,
|
|
668
|
+
"properties": {
|
|
669
|
+
"methods": {
|
|
670
|
+
"items": {
|
|
671
|
+
"type": "string"
|
|
672
|
+
},
|
|
673
|
+
"type": "array"
|
|
674
|
+
},
|
|
675
|
+
"status": {
|
|
676
|
+
"const": "mfa_required",
|
|
677
|
+
"type": "string"
|
|
678
|
+
}
|
|
679
|
+
},
|
|
680
|
+
"required": [
|
|
681
|
+
"methods",
|
|
682
|
+
"status"
|
|
683
|
+
],
|
|
684
|
+
"type": "object"
|
|
685
|
+
},
|
|
686
|
+
"#3": {
|
|
687
|
+
"additionalProperties": false,
|
|
688
|
+
"properties": {
|
|
689
|
+
"status": {
|
|
690
|
+
"const": "linked",
|
|
691
|
+
"type": "string"
|
|
692
|
+
}
|
|
693
|
+
},
|
|
694
|
+
"required": [
|
|
695
|
+
"status"
|
|
696
|
+
],
|
|
697
|
+
"type": "object"
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
},
|
|
701
|
+
"EmailPasswordProvider.login.input": {
|
|
702
|
+
"type": "object",
|
|
703
|
+
"properties": {
|
|
704
|
+
"email": {
|
|
705
|
+
"type": "string"
|
|
706
|
+
},
|
|
707
|
+
"password": {
|
|
708
|
+
"type": "string"
|
|
709
|
+
}
|
|
710
|
+
},
|
|
711
|
+
"required": [
|
|
712
|
+
"email",
|
|
713
|
+
"password"
|
|
714
|
+
]
|
|
715
|
+
},
|
|
716
|
+
"EmailPasswordProvider.login.output": {
|
|
717
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
718
|
+
"anyOf": [
|
|
719
|
+
{
|
|
720
|
+
"additionalProperties": false,
|
|
721
|
+
"properties": {
|
|
722
|
+
"accessToken": {
|
|
723
|
+
"type": "string"
|
|
724
|
+
},
|
|
725
|
+
"expiresIn": {
|
|
726
|
+
"type": "number"
|
|
727
|
+
},
|
|
728
|
+
"refreshToken": {
|
|
729
|
+
"type": "string"
|
|
730
|
+
},
|
|
731
|
+
"status": {
|
|
732
|
+
"const": "ok",
|
|
733
|
+
"type": "string"
|
|
734
|
+
},
|
|
735
|
+
"user": {}
|
|
736
|
+
},
|
|
737
|
+
"required": [
|
|
738
|
+
"accessToken",
|
|
739
|
+
"expiresIn",
|
|
740
|
+
"refreshToken",
|
|
741
|
+
"status",
|
|
742
|
+
"user"
|
|
743
|
+
],
|
|
744
|
+
"type": "object"
|
|
745
|
+
},
|
|
746
|
+
{
|
|
747
|
+
"$ref": "#/definitions/%232"
|
|
748
|
+
}
|
|
749
|
+
],
|
|
750
|
+
"description": "Result of an authentication completion",
|
|
751
|
+
"definitions": {
|
|
752
|
+
"#2": {
|
|
753
|
+
"additionalProperties": false,
|
|
754
|
+
"properties": {
|
|
755
|
+
"methods": {
|
|
756
|
+
"items": {
|
|
757
|
+
"type": "string"
|
|
758
|
+
},
|
|
759
|
+
"type": "array"
|
|
760
|
+
},
|
|
761
|
+
"status": {
|
|
762
|
+
"const": "mfa_required",
|
|
763
|
+
"type": "string"
|
|
764
|
+
}
|
|
765
|
+
},
|
|
766
|
+
"required": [
|
|
767
|
+
"methods",
|
|
768
|
+
"status"
|
|
769
|
+
],
|
|
770
|
+
"type": "object"
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
},
|
|
774
|
+
"EmailPasswordProvider.register.input": {
|
|
775
|
+
"type": "object",
|
|
776
|
+
"properties": {
|
|
777
|
+
"email": {
|
|
778
|
+
"type": "string"
|
|
779
|
+
},
|
|
780
|
+
"password": {
|
|
781
|
+
"type": "string"
|
|
782
|
+
},
|
|
783
|
+
"token": {
|
|
784
|
+
"type": "string"
|
|
785
|
+
},
|
|
786
|
+
"profile": {}
|
|
787
|
+
},
|
|
788
|
+
"required": [
|
|
789
|
+
"email",
|
|
790
|
+
"password"
|
|
791
|
+
]
|
|
792
|
+
},
|
|
793
|
+
"EmailPasswordProvider.register.output": {
|
|
794
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
795
|
+
},
|
|
796
|
+
"EmailPasswordProvider.startVerification.input": {
|
|
797
|
+
"type": "object",
|
|
798
|
+
"properties": {
|
|
799
|
+
"email": {
|
|
800
|
+
"type": "string"
|
|
801
|
+
}
|
|
802
|
+
},
|
|
803
|
+
"required": [
|
|
804
|
+
"email"
|
|
805
|
+
]
|
|
806
|
+
},
|
|
807
|
+
"EmailPasswordProvider.startVerification.output": {
|
|
808
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
809
|
+
"not": {}
|
|
810
|
+
},
|
|
811
|
+
"EmailPasswordProvider.verify.input": {
|
|
812
|
+
"type": "object",
|
|
813
|
+
"properties": {
|
|
814
|
+
"token": {
|
|
815
|
+
"type": "string"
|
|
816
|
+
}
|
|
817
|
+
},
|
|
818
|
+
"required": [
|
|
819
|
+
"token"
|
|
820
|
+
]
|
|
821
|
+
},
|
|
822
|
+
"EmailPasswordProvider.verify.output": {
|
|
823
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
824
|
+
"additionalProperties": false,
|
|
825
|
+
"properties": {
|
|
826
|
+
"status": {
|
|
827
|
+
"const": "verified",
|
|
828
|
+
"type": "string"
|
|
829
|
+
}
|
|
830
|
+
},
|
|
831
|
+
"required": [
|
|
832
|
+
"status"
|
|
833
|
+
],
|
|
834
|
+
"type": "object"
|
|
835
|
+
},
|
|
836
|
+
"EmailPasswordProvider.startRecovery.input": {
|
|
837
|
+
"type": "object",
|
|
838
|
+
"properties": {
|
|
839
|
+
"email": {
|
|
840
|
+
"type": "string"
|
|
841
|
+
}
|
|
842
|
+
},
|
|
843
|
+
"required": [
|
|
844
|
+
"email"
|
|
845
|
+
]
|
|
846
|
+
},
|
|
847
|
+
"EmailPasswordProvider.startRecovery.output": {
|
|
848
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
849
|
+
"not": {}
|
|
850
|
+
},
|
|
851
|
+
"EmailPasswordProvider.recover.input": {
|
|
852
|
+
"type": "object",
|
|
853
|
+
"properties": {
|
|
854
|
+
"token": {
|
|
855
|
+
"type": "string"
|
|
856
|
+
},
|
|
857
|
+
"password": {
|
|
858
|
+
"type": "string"
|
|
859
|
+
}
|
|
860
|
+
},
|
|
861
|
+
"required": [
|
|
862
|
+
"token",
|
|
863
|
+
"password"
|
|
864
|
+
]
|
|
865
|
+
},
|
|
866
|
+
"EmailPasswordProvider.recover.output": {
|
|
867
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
868
|
+
"not": {}
|
|
869
|
+
},
|
|
870
|
+
"EmailPasswordProvider.changePassword.input": {
|
|
871
|
+
"type": "object",
|
|
872
|
+
"properties": {
|
|
873
|
+
"current": {
|
|
874
|
+
"type": "string"
|
|
875
|
+
},
|
|
876
|
+
"next": {
|
|
877
|
+
"type": "string"
|
|
878
|
+
}
|
|
879
|
+
},
|
|
880
|
+
"required": [
|
|
881
|
+
"current",
|
|
882
|
+
"next"
|
|
883
|
+
]
|
|
884
|
+
},
|
|
885
|
+
"EmailPasswordProvider.changePassword.output": {
|
|
886
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
887
|
+
"not": {}
|
|
888
|
+
}
|
|
889
|
+
},
|
|
890
|
+
"behaviors": {}
|
|
891
|
+
}
|