@zitadel/config 1.0.0-alpha.21 → 1.0.0-alpha.23
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/README.md +2 -0
- package/defaults/README-branding.md +1 -1
- package/defaults/README-flows.md +9 -4
- package/defaults/default-login.json +0 -27
- package/dist/branding-contrast.d.mts +107 -0
- package/dist/branding-contrast.d.mts.map +1 -0
- package/dist/branding-contrast.mjs +229 -0
- package/dist/branding-contrast.mjs.map +1 -0
- package/dist/css-color.d.mts +36 -0
- package/dist/css-color.d.mts.map +1 -0
- package/dist/css-color.mjs +231 -0
- package/dist/css-color.mjs.map +1 -0
- package/dist/{defaults-Bh4_xVbh.d.mts → defaults-BxGCGdqS.d.mts} +5 -3
- package/dist/defaults-BxGCGdqS.d.mts.map +1 -0
- package/dist/{defaults-DPq0o3iU.mjs → defaults-DV6hY2KT.mjs} +25 -53
- package/dist/defaults-DV6hY2KT.mjs.map +1 -0
- package/dist/defaults.d.mts +1 -1
- package/dist/defaults.mjs +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +4 -4
- package/dist/meta-schemas-OowgSUfU.mjs +1173 -0
- package/dist/meta-schemas-OowgSUfU.mjs.map +1 -0
- package/dist/meta-schemas.d.mts +4 -3
- package/dist/meta-schemas.d.mts.map +1 -1
- package/dist/meta-schemas.mjs +1 -1
- package/dist/schemas-7oNU25Qz.mjs +173 -0
- package/dist/schemas-7oNU25Qz.mjs.map +1 -0
- package/dist/schemas.d.mts +12 -5
- package/dist/schemas.d.mts.map +1 -1
- package/dist/schemas.mjs +3 -69
- package/dist/validate.d.mts +8 -2
- package/dist/validate.d.mts.map +1 -1
- package/dist/validate.mjs +9 -2
- package/dist/validate.mjs.map +1 -1
- package/meta-schemas/auth-method.json +1 -0
- package/meta-schemas/auth-methods.json +5 -3
- package/meta-schemas/branding.json +268 -19
- package/meta-schemas/flow-definition.json +375 -171
- package/meta-schemas/idp-connection.json +397 -0
- package/meta-schemas/property-name.json +1 -0
- package/meta-schemas/sso-auth-method.json +54 -0
- package/meta-schemas/user-property.json +10 -13
- package/meta-schemas/user-schema.json +20 -13
- package/package.json +18 -5
- package/dist/defaults-Bh4_xVbh.d.mts.map +0 -1
- package/dist/defaults-DPq0o3iU.mjs.map +0 -1
- package/dist/meta-schemas-z4IlqbLd.mjs +0 -531
- package/dist/meta-schemas-z4IlqbLd.mjs.map +0 -1
- package/dist/schemas.mjs.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
+
"$comment": "Code generated by scripts/generate-meta-schemas.ts; DO NOT EDIT.",
|
|
2
3
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
4
|
"title": "FlowDefinition",
|
|
4
|
-
"description": "Admin-authored configuration for a flow. A flow definition is a directed graph of steps backed by a user schema. The flow engine selects a definition based on `purpose` and `audience`, then walks the graph by evaluating `transitions` against client submissions. This schema describes the configuration shape only. Runtime emission to the client (capability dictionaries, branding, localized text) is a separate concern and is not modelled here.",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"required": [
|
|
7
7
|
"name",
|
|
@@ -10,11 +10,12 @@
|
|
|
10
10
|
"purposes",
|
|
11
11
|
"steps"
|
|
12
12
|
],
|
|
13
|
+
"description": "A flow definition is the server-side configuration that describes a complete\nauthentication or identity flow. It is NOT sent to the frontend — the flow\nengine evaluates it and produces FlowResponse payloads (steps with capability\ndictionaries) for the client.\n\nFlow definitions are created by administrators and stored in the project/team\nconfiguration hierarchy. The engine selects the matching definition based on\nthe purpose + audience when a flow is created via POST /flow.\n",
|
|
13
14
|
"additionalProperties": false,
|
|
14
15
|
"properties": {
|
|
15
16
|
"$schema": {
|
|
16
17
|
"type": "string",
|
|
17
|
-
"description": "Editor affordance: path or URL of this meta-schema so
|
|
18
|
+
"description": "Editor affordance: path or URL of this file's JSON meta-schema, so an\neditor validates and autocompletes it. The CLI strips it before upload;\nthe platform ignores it.\n"
|
|
18
19
|
},
|
|
19
20
|
"name": {
|
|
20
21
|
"type": "string",
|
|
@@ -23,163 +24,363 @@
|
|
|
23
24
|
"standard-login",
|
|
24
25
|
"combined-auth"
|
|
25
26
|
],
|
|
26
|
-
"description": "Stable identifier for this flow, used as the target of cross-flow
|
|
27
|
+
"description": "Stable identifier for this flow, used as the target of cross-flow\n`switch` and `pivot` transitions. Every revision of a flow shares its\n`name`; publishing a definition under an existing `name` adds a\nrevision to that flow. Renaming is not supported — the `name` is part\nof the public contract another definition may reference. Acts as the\nhuman display label as well; no separate slug.\n"
|
|
27
28
|
},
|
|
28
29
|
"status": {
|
|
29
|
-
"
|
|
30
|
-
"enum": [
|
|
31
|
-
"active",
|
|
32
|
-
"draft"
|
|
33
|
-
],
|
|
34
|
-
"description": "Lifecycle state. - active: the engine can select this definition for new flows. - draft: never selected for new flows; existing flows referencing it must handle it gracefully."
|
|
30
|
+
"$ref": "#/$defs/FlowDefinitionStatus"
|
|
35
31
|
},
|
|
36
32
|
"user_schema": {
|
|
37
33
|
"type": "string",
|
|
34
|
+
"description": "Server-assigned identifier of the user schema this flow operates on,\nas returned by `POST /schemas`. Opaque to the client — the shape is a\nserver implementation detail. Step `fields` reference properties\ndefined in the resolved schema; the engine resolves field types, validation, and\nimplicit outcomes from schema annotations at runtime.\n",
|
|
38
35
|
"examples": [
|
|
39
36
|
"sch_01KWHF18816ZQESRCS7Z2STJ05"
|
|
40
|
-
]
|
|
41
|
-
"description": "Server-assigned identifier of the user schema this flow operates on, as returned by `POST /schemas`. Opaque to the client — the shape is a server implementation detail. Step `fields` reference property names defined in that schema; the engine resolves field type, validation, and implicit transition outcomes from the schema's `x-*` annotations at runtime."
|
|
37
|
+
]
|
|
42
38
|
},
|
|
43
39
|
"purposes": {
|
|
44
40
|
"type": "object",
|
|
41
|
+
"description": "Maps each purpose this definition handles to its entry-point step.\nKeys are purpose names; values must match a `name` in `steps`. A\ndefinition can serve multiple purposes (e.g. a combined login/register\nflow) by listing one entry per purpose.\n",
|
|
45
42
|
"minProperties": 1,
|
|
46
43
|
"propertyNames": {
|
|
47
|
-
"
|
|
44
|
+
"type": "string",
|
|
45
|
+
"enum": [
|
|
46
|
+
"login",
|
|
47
|
+
"register",
|
|
48
|
+
"recovery",
|
|
49
|
+
"profiling",
|
|
50
|
+
"reauth",
|
|
51
|
+
"link_account"
|
|
52
|
+
]
|
|
48
53
|
},
|
|
49
54
|
"additionalProperties": {
|
|
50
|
-
"type": "string"
|
|
51
|
-
"description": "Name of an entry-point step within this definition."
|
|
55
|
+
"type": "string"
|
|
52
56
|
},
|
|
53
57
|
"examples": [
|
|
54
58
|
{
|
|
55
59
|
"login": "identify"
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
"login": "identify",
|
|
59
|
-
"register": "identify"
|
|
60
60
|
}
|
|
61
|
-
]
|
|
62
|
-
"description": "Maps each purpose this definition handles to the step that begins the flow for that purpose. Every value must match a `name` in `steps`; the check is enforced by the engine, not by this schema."
|
|
61
|
+
]
|
|
63
62
|
},
|
|
64
63
|
"audience": {
|
|
65
|
-
"$ref": "#/$defs/
|
|
66
|
-
"
|
|
64
|
+
"$ref": "#/$defs/FlowAudience",
|
|
65
|
+
"examples": [
|
|
66
|
+
{
|
|
67
|
+
"app_ids": [
|
|
68
|
+
"app_saas"
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
]
|
|
67
72
|
},
|
|
68
73
|
"steps": {
|
|
69
74
|
"type": "array",
|
|
70
|
-
"minItems": 1,
|
|
71
75
|
"items": {
|
|
72
|
-
"$ref": "#/$defs/
|
|
76
|
+
"$ref": "#/$defs/FlowDefinitionStep"
|
|
73
77
|
},
|
|
74
|
-
"
|
|
78
|
+
"minItems": 1,
|
|
79
|
+
"description": "Ordered list of steps in this flow. The order is for human readability —\nactual step sequencing is determined by transitions.\n",
|
|
80
|
+
"examples": [
|
|
81
|
+
[
|
|
82
|
+
{
|
|
83
|
+
"name": "identify",
|
|
84
|
+
"fields": [
|
|
85
|
+
"email"
|
|
86
|
+
],
|
|
87
|
+
"actions": [
|
|
88
|
+
{
|
|
89
|
+
"name": "submit",
|
|
90
|
+
"kind": "submit",
|
|
91
|
+
"primary": true
|
|
92
|
+
}
|
|
93
|
+
],
|
|
94
|
+
"transitions": {
|
|
95
|
+
"submit": {
|
|
96
|
+
"target": "authenticate"
|
|
97
|
+
},
|
|
98
|
+
"user_not_found": {
|
|
99
|
+
"target": "register",
|
|
100
|
+
"action": "switch"
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"name": "authenticate",
|
|
106
|
+
"fields": [
|
|
107
|
+
"password"
|
|
108
|
+
],
|
|
109
|
+
"actions": [
|
|
110
|
+
{
|
|
111
|
+
"name": "submit",
|
|
112
|
+
"kind": "submit",
|
|
113
|
+
"primary": true
|
|
114
|
+
}
|
|
115
|
+
],
|
|
116
|
+
"transitions": {
|
|
117
|
+
"submit": {
|
|
118
|
+
"target": "done"
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"name": "done",
|
|
124
|
+
"complete": "redirect"
|
|
125
|
+
}
|
|
126
|
+
]
|
|
127
|
+
]
|
|
75
128
|
}
|
|
76
129
|
},
|
|
77
130
|
"$defs": {
|
|
78
|
-
"
|
|
131
|
+
"FlowDefinitionStatus": {
|
|
79
132
|
"type": "string",
|
|
80
133
|
"enum": [
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"recovery",
|
|
84
|
-
"profiling",
|
|
85
|
-
"reauth",
|
|
86
|
-
"link_account"
|
|
134
|
+
"active",
|
|
135
|
+
"draft"
|
|
87
136
|
],
|
|
88
|
-
"description": "
|
|
137
|
+
"description": "The lifecycle state of this flow definition. \n\nactive: The flow definition is ready to be used. The flow engine can select it for new flows.\ndraft: The engine will not select it for new flows, and existing flows must handle it gracefully if they reference this definition.\n\nA revision's status is fixed at creation. Publish a new revision to change it.\n"
|
|
89
138
|
},
|
|
90
|
-
"
|
|
139
|
+
"FlowAudience": {
|
|
91
140
|
"type": "object",
|
|
92
141
|
"additionalProperties": false,
|
|
142
|
+
"description": "Scopes which teams or apps this flow definition applies to. Empty or\nomitted fields mean \"no restriction\"; when both are empty the definition\nmatches every request in the project. The engine picks the most specific\nmatching definition: app > team > project-wide.\n",
|
|
93
143
|
"properties": {
|
|
94
144
|
"team_ids": {
|
|
95
145
|
"type": "array",
|
|
96
|
-
"uniqueItems": true,
|
|
97
146
|
"items": {
|
|
98
147
|
"type": "string"
|
|
99
148
|
},
|
|
149
|
+
"description": "Restrict to specific teams (organizations). Empty means no team restriction.",
|
|
150
|
+
"uniqueItems": true,
|
|
100
151
|
"examples": [
|
|
101
152
|
[
|
|
102
153
|
"team_acme"
|
|
103
154
|
]
|
|
104
|
-
]
|
|
105
|
-
"description": "Restrict to specific teams (organizations)."
|
|
155
|
+
]
|
|
106
156
|
},
|
|
107
157
|
"app_ids": {
|
|
108
158
|
"type": "array",
|
|
109
|
-
"uniqueItems": true,
|
|
110
159
|
"items": {
|
|
111
160
|
"type": "string"
|
|
112
161
|
},
|
|
162
|
+
"description": "Restrict to specific applications. Empty means no app restriction.",
|
|
163
|
+
"uniqueItems": true,
|
|
113
164
|
"examples": [
|
|
114
165
|
[
|
|
115
|
-
"
|
|
166
|
+
"app_saas"
|
|
116
167
|
]
|
|
117
|
-
]
|
|
118
|
-
"description": "Restrict to specific applications."
|
|
168
|
+
]
|
|
119
169
|
}
|
|
120
170
|
}
|
|
121
171
|
},
|
|
122
|
-
"
|
|
172
|
+
"FlowDefinitionStep": {
|
|
123
173
|
"type": "object",
|
|
124
174
|
"required": [
|
|
125
175
|
"name"
|
|
126
176
|
],
|
|
127
177
|
"additionalProperties": false,
|
|
178
|
+
"not": {
|
|
179
|
+
"anyOf": [
|
|
180
|
+
{
|
|
181
|
+
"required": [
|
|
182
|
+
"sso_providers"
|
|
183
|
+
],
|
|
184
|
+
"properties": {
|
|
185
|
+
"sso_providers": {
|
|
186
|
+
"minItems": 1
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
"anyOf": [
|
|
190
|
+
{
|
|
191
|
+
"not": {
|
|
192
|
+
"required": [
|
|
193
|
+
"transitions"
|
|
194
|
+
]
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"properties": {
|
|
199
|
+
"transitions": {
|
|
200
|
+
"not": {
|
|
201
|
+
"required": [
|
|
202
|
+
"callback"
|
|
203
|
+
]
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
]
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"required": [
|
|
212
|
+
"complete"
|
|
213
|
+
],
|
|
214
|
+
"anyOf": [
|
|
215
|
+
{
|
|
216
|
+
"required": [
|
|
217
|
+
"fields"
|
|
218
|
+
],
|
|
219
|
+
"properties": {
|
|
220
|
+
"fields": {
|
|
221
|
+
"minItems": 1
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"required": [
|
|
227
|
+
"actions"
|
|
228
|
+
],
|
|
229
|
+
"properties": {
|
|
230
|
+
"actions": {
|
|
231
|
+
"minItems": 1
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
"required": [
|
|
237
|
+
"sso_providers"
|
|
238
|
+
],
|
|
239
|
+
"properties": {
|
|
240
|
+
"sso_providers": {
|
|
241
|
+
"minItems": 1
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
"required": [
|
|
247
|
+
"gates"
|
|
248
|
+
],
|
|
249
|
+
"properties": {
|
|
250
|
+
"gates": {
|
|
251
|
+
"minProperties": 1
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"required": [
|
|
257
|
+
"transitions"
|
|
258
|
+
],
|
|
259
|
+
"properties": {
|
|
260
|
+
"transitions": {
|
|
261
|
+
"minProperties": 1
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
]
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
"not": {
|
|
269
|
+
"required": [
|
|
270
|
+
"complete"
|
|
271
|
+
]
|
|
272
|
+
},
|
|
273
|
+
"properties": {
|
|
274
|
+
"fields": {
|
|
275
|
+
"maxItems": 0
|
|
276
|
+
},
|
|
277
|
+
"actions": {
|
|
278
|
+
"maxItems": 0
|
|
279
|
+
},
|
|
280
|
+
"sso_providers": {
|
|
281
|
+
"maxItems": 0
|
|
282
|
+
},
|
|
283
|
+
"gates": {
|
|
284
|
+
"maxProperties": 0
|
|
285
|
+
},
|
|
286
|
+
"transitions": {
|
|
287
|
+
"not": {
|
|
288
|
+
"required": [
|
|
289
|
+
"callback"
|
|
290
|
+
]
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
]
|
|
296
|
+
},
|
|
297
|
+
"description": "A step in a flow definition. This is the admin-authored configuration,\nnot the runtime payload sent to the frontend.\n\nSteps are schema-driven: `fields` references properties from the flow's\nuser schema, and the engine resolves field metadata (type, validation,\nimplicit outcomes) from schema annotations at runtime.\n\nA step with only `complete` set is a terminal step. All other steps are\nrendered to the frontend as capability payloads.\n",
|
|
128
298
|
"properties": {
|
|
129
299
|
"name": {
|
|
130
300
|
"type": "string",
|
|
131
|
-
"
|
|
301
|
+
"description": "Unique step identifier within this flow. Used as transition targets\nand returned in the API response as `step.name`.\n",
|
|
302
|
+
"pattern": "^[a-z][a-z0-9_-]*$",
|
|
132
303
|
"examples": [
|
|
133
|
-
"
|
|
134
|
-
|
|
135
|
-
"done"
|
|
136
|
-
],
|
|
137
|
-
"description": "Unique step identifier within this definition. Slug-shaped so it is safe to use as a transition `target` and as a value in `purposes`. Referenced by other steps in the same definition."
|
|
304
|
+
"login"
|
|
305
|
+
]
|
|
138
306
|
},
|
|
139
307
|
"fields": {
|
|
140
308
|
"type": "array",
|
|
141
|
-
"
|
|
309
|
+
"description": "Schema property names to collect from the user. Each entry references\na property in the flow's user schema. The engine resolves field type,\nvalidation rules, and implicit outcomes from schema annotations\n(e.g. a property with `x-unique` set implies a `user_not_found`\ntransition outcome).\n",
|
|
142
310
|
"items": {
|
|
143
311
|
"type": "string"
|
|
144
312
|
},
|
|
313
|
+
"uniqueItems": true,
|
|
314
|
+
"default": [],
|
|
145
315
|
"examples": [
|
|
146
|
-
[
|
|
147
|
-
"email"
|
|
148
|
-
],
|
|
149
316
|
[
|
|
150
317
|
"email",
|
|
151
318
|
"password"
|
|
152
319
|
]
|
|
153
|
-
]
|
|
154
|
-
"description": "Schema property names to collect from the user on this step. Each entry must resolve to a property in the definition's `user_schema`, or use the reserved token `x-auth-methods#<method>` (e.g. `x-auth-methods#password`) to collect a credential proof for a method enabled at the schema root. The engine reads the schema's `x-*` annotations to derive: - field type and validation (rendered into the runtime payload), - implicit transition outcomes - e.g. a property with a non-empty `x-unique` scope makes `user_not_found` a valid `transitions` key on this step."
|
|
320
|
+
]
|
|
155
321
|
},
|
|
156
322
|
"actions": {
|
|
157
323
|
"type": "array",
|
|
324
|
+
"description": "Ordered list of actions the user can take. The action name is what the\nfrontend sends back in the submit request. If omitted, the engine\nprovides a default `submit` action.\n",
|
|
158
325
|
"items": {
|
|
159
|
-
"$ref": "#/$defs/
|
|
326
|
+
"$ref": "#/$defs/StepAction"
|
|
160
327
|
},
|
|
161
|
-
"
|
|
328
|
+
"default": [],
|
|
329
|
+
"examples": [
|
|
330
|
+
[
|
|
331
|
+
{
|
|
332
|
+
"name": "submit",
|
|
333
|
+
"kind": "submit",
|
|
334
|
+
"primary": true
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
"name": "forgot_password",
|
|
338
|
+
"kind": "navigate"
|
|
339
|
+
}
|
|
340
|
+
]
|
|
341
|
+
]
|
|
162
342
|
},
|
|
163
343
|
"gates": {
|
|
164
344
|
"type": "object",
|
|
345
|
+
"description": "Security gates that must be satisfied before submission. Keyed by gate\nname. Each gate selects a kind (e.g. \"captcha\") and provider-specific\nconfiguration. The engine may also inject gates dynamically based on\npolicy.\n",
|
|
165
346
|
"additionalProperties": {
|
|
166
347
|
"$ref": "#/$defs/Gate"
|
|
167
348
|
},
|
|
168
|
-
"
|
|
349
|
+
"default": {},
|
|
350
|
+
"examples": [
|
|
351
|
+
{
|
|
352
|
+
"bot_check": {
|
|
353
|
+
"kind": "captcha",
|
|
354
|
+
"provider": "altcha"
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
]
|
|
169
358
|
},
|
|
170
359
|
"sso_providers": {
|
|
171
360
|
"type": "array",
|
|
361
|
+
"description": "Slugs of the identity provider connections this step offers, in display\norder. Each names the `slug` of a connection under `.zitadel/idps/`; the\nconnection carries the display name and template, so a rename there\nreaches every step without editing the flow. The rendered step the client\nreceives carries the resolved `{id, name, template}` objects instead.\n",
|
|
362
|
+
"uniqueItems": true,
|
|
172
363
|
"items": {
|
|
173
|
-
"
|
|
364
|
+
"type": "string",
|
|
365
|
+
"pattern": "^[a-z0-9][a-z0-9_-]*$",
|
|
366
|
+
"maxLength": 64
|
|
174
367
|
},
|
|
175
|
-
"
|
|
368
|
+
"default": [],
|
|
369
|
+
"examples": [
|
|
370
|
+
[
|
|
371
|
+
"google"
|
|
372
|
+
]
|
|
373
|
+
]
|
|
176
374
|
},
|
|
177
375
|
"on_success": {
|
|
178
376
|
"type": "string",
|
|
179
377
|
"enum": [
|
|
180
378
|
"create_user"
|
|
181
379
|
],
|
|
182
|
-
"description": "Server-side mutation to
|
|
380
|
+
"description": "Server-side mutation to execute when this step completes successfully.\nRuns after field validation passes, before the transition fires.\n\n- create_user: creates the user record (registration flows)\n",
|
|
381
|
+
"examples": [
|
|
382
|
+
"create_user"
|
|
383
|
+
]
|
|
183
384
|
},
|
|
184
385
|
"complete": {
|
|
185
386
|
"type": "string",
|
|
@@ -187,30 +388,112 @@
|
|
|
187
388
|
"redirect",
|
|
188
389
|
"show"
|
|
189
390
|
],
|
|
190
|
-
"description": "Marks this
|
|
391
|
+
"description": "Marks this as a terminal step. Tells the frontend what to do:\n- redirect: navigate to redirect_uri (OIDC/SAML callback done)\n- show: render as a success/info screen\n",
|
|
392
|
+
"examples": [
|
|
393
|
+
"redirect"
|
|
394
|
+
]
|
|
191
395
|
},
|
|
192
396
|
"transitions": {
|
|
193
397
|
"type": "object",
|
|
398
|
+
"description": "Maps action/outcome names to their transition descriptor.\n\nKeys match action names from the `actions` array. Additional keys\ncome from implicit outcomes based on schema annotations\n(e.g. `user_not_found` from `x-unique` fields) and engine\nevents (e.g. `sso`, `callback`).\n",
|
|
194
399
|
"additionalProperties": {
|
|
195
|
-
"
|
|
400
|
+
"type": "object",
|
|
401
|
+
"required": [
|
|
402
|
+
"target"
|
|
403
|
+
],
|
|
404
|
+
"properties": {
|
|
405
|
+
"target": {
|
|
406
|
+
"type": "string",
|
|
407
|
+
"description": "Step name within this flow (when `action` is null), or the name\nof another flow (when `action` is `switch` or `pivot`).\n",
|
|
408
|
+
"examples": [
|
|
409
|
+
"password"
|
|
410
|
+
]
|
|
411
|
+
},
|
|
412
|
+
"action": {
|
|
413
|
+
"oneOf": [
|
|
414
|
+
{
|
|
415
|
+
"type": "string",
|
|
416
|
+
"enum": [
|
|
417
|
+
"switch",
|
|
418
|
+
"pivot"
|
|
419
|
+
]
|
|
420
|
+
},
|
|
421
|
+
{
|
|
422
|
+
"type": "null"
|
|
423
|
+
}
|
|
424
|
+
],
|
|
425
|
+
"description": "How to interpret `target`:\n- null (omitted): transition to a step in the current flow.\n- switch: replace the current flow with the target flow.\n No return — the current flow is discarded.\n Example: login ↔ register.\n- pivot: push the target flow onto the stack. The current flow\n is paused and resumes when the target flow completes (auto-pop).\n Example: login → recovery → back to login.\n"
|
|
426
|
+
},
|
|
427
|
+
"purpose": {
|
|
428
|
+
"oneOf": [
|
|
429
|
+
{
|
|
430
|
+
"type": "string",
|
|
431
|
+
"enum": [
|
|
432
|
+
"login",
|
|
433
|
+
"register",
|
|
434
|
+
"recovery",
|
|
435
|
+
"profiling",
|
|
436
|
+
"reauth",
|
|
437
|
+
"link_account"
|
|
438
|
+
]
|
|
439
|
+
},
|
|
440
|
+
{
|
|
441
|
+
"type": "null"
|
|
442
|
+
}
|
|
443
|
+
],
|
|
444
|
+
"description": "Local re-purposing. When set, taking this transition changes the\nflow's current purpose to this value — the dispatch mode a step's\nchallenges run under — while the flow's original purpose stays\npinned. Must be a purpose this definition serves, and `target`\nmust be that purpose's entry step. Mutually exclusive with\n`action`: a transition either re-purposes within this flow or\ntargets another flow, never both.\nExample: a \"Sign up\" navigation on the login identifier step\n(`{ target: register, purpose: register }`).\n"
|
|
445
|
+
}
|
|
446
|
+
},
|
|
447
|
+
"additionalProperties": false,
|
|
448
|
+
"not": {
|
|
449
|
+
"required": [
|
|
450
|
+
"purpose",
|
|
451
|
+
"action"
|
|
452
|
+
],
|
|
453
|
+
"properties": {
|
|
454
|
+
"purpose": {
|
|
455
|
+
"type": "string"
|
|
456
|
+
},
|
|
457
|
+
"action": {
|
|
458
|
+
"type": "string"
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
}
|
|
196
462
|
},
|
|
197
|
-
"
|
|
463
|
+
"examples": [
|
|
464
|
+
{
|
|
465
|
+
"submit": {
|
|
466
|
+
"target": "password"
|
|
467
|
+
},
|
|
468
|
+
"recover": {
|
|
469
|
+
"target": "recovery",
|
|
470
|
+
"action": "pivot"
|
|
471
|
+
},
|
|
472
|
+
"register": {
|
|
473
|
+
"target": "register",
|
|
474
|
+
"action": "switch"
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
]
|
|
198
478
|
}
|
|
199
479
|
}
|
|
200
480
|
},
|
|
201
|
-
"
|
|
481
|
+
"StepAction": {
|
|
202
482
|
"type": "object",
|
|
483
|
+
"required": [
|
|
484
|
+
"name",
|
|
485
|
+
"kind"
|
|
486
|
+
],
|
|
203
487
|
"additionalProperties": false,
|
|
488
|
+
"description": "An action a flow author declares on a step of a flow definition. The\n`name` is sent back in the submit request as `action`; the engine resolves\nthe action's declared `kind` to decide how to handle the submission.\n",
|
|
204
489
|
"properties": {
|
|
205
490
|
"name": {
|
|
206
491
|
"type": "string",
|
|
207
492
|
"minLength": 1,
|
|
493
|
+
"description": "Action identifier. Sent back in the submit request as `action`.",
|
|
208
494
|
"examples": [
|
|
209
|
-
"submit"
|
|
210
|
-
|
|
211
|
-
"email_fallback"
|
|
212
|
-
],
|
|
213
|
-
"description": "Action identifier, echoed back by the client on submit and matched against `transitions`. The name `back` is reserved for engine-injected back navigation."
|
|
495
|
+
"submit"
|
|
496
|
+
]
|
|
214
497
|
},
|
|
215
498
|
"kind": {
|
|
216
499
|
"type": "string",
|
|
@@ -220,142 +503,63 @@
|
|
|
220
503
|
"passkey_register",
|
|
221
504
|
"navigate"
|
|
222
505
|
],
|
|
223
|
-
"description": "
|
|
506
|
+
"description": "Classifies how the engine handles this action. `back` is not declarable:\nthe engine injects it into runtime steps (see `flow-step-action.yaml`)\nwhenever going back is available.\n- `submit`: collect the step's fields and run validate/dispatch/on_success.\n- `passkey`: issue a WebAuthn assertion challenge; the matching transition\n fires once the returned assertion verifies.\n- `passkey_register`: issue a WebAuthn registration challenge; the matching\n transition fires once the returned attestation verifies.\n- `navigate`: route through the transition without running the input\n pipeline. Used for pure-routing actions declared in the flow definition.\n",
|
|
507
|
+
"examples": [
|
|
508
|
+
"submit"
|
|
509
|
+
]
|
|
224
510
|
},
|
|
225
511
|
"primary": {
|
|
226
512
|
"type": "boolean",
|
|
227
513
|
"default": false,
|
|
228
|
-
"description": "Marks this as the default/primary action. The runtime template uses
|
|
514
|
+
"description": "Marks this as the default/primary action. The runtime template uses\nthis hint to choose visual emphasis. At most one action per step\nshould be primary; this is not enforced here.\n",
|
|
515
|
+
"examples": [
|
|
516
|
+
true
|
|
517
|
+
]
|
|
229
518
|
},
|
|
230
519
|
"text_key": {
|
|
231
520
|
"type": "string",
|
|
521
|
+
"description": "Optional localization key override for the action's label. When\nomitted, the engine derives a key from the step and action names.\nDisplay text is resolved client-side from a locale dictionary, never\nby the engine.\n",
|
|
232
522
|
"examples": [
|
|
233
523
|
"actions.signin.submit"
|
|
234
|
-
]
|
|
235
|
-
"description": "Optional localization key override for the action's label. When omitted, the engine derives a key from the step and action names. Display text is resolved client-side from a locale dictionary, never by the engine."
|
|
524
|
+
]
|
|
236
525
|
}
|
|
237
|
-
}
|
|
238
|
-
"description": "Configuration for a user-invokable action on a step.",
|
|
239
|
-
"required": [
|
|
240
|
-
"name",
|
|
241
|
-
"kind"
|
|
242
|
-
]
|
|
526
|
+
}
|
|
243
527
|
},
|
|
244
528
|
"Gate": {
|
|
245
529
|
"type": "object",
|
|
530
|
+
"additionalProperties": false,
|
|
246
531
|
"required": [
|
|
247
532
|
"kind",
|
|
248
533
|
"provider"
|
|
249
534
|
],
|
|
250
|
-
"
|
|
535
|
+
"description": "A security challenge that must be satisfied before this step's submission\nis accepted. The engine may also inject gates at runtime based on policy\nor risk evaluation.\n",
|
|
251
536
|
"properties": {
|
|
252
537
|
"kind": {
|
|
253
538
|
"type": "string",
|
|
254
539
|
"enum": [
|
|
255
540
|
"captcha"
|
|
256
541
|
],
|
|
257
|
-
"description": "The gate category. Only `captcha` is currently defined. Authenticator
|
|
542
|
+
"description": "The gate category. Only `captcha` is currently defined. Authenticator\nceremonies (e.g. passkey) are modelled as credential auth_attempts via\n`x-credential` on a field, not as gates.\n",
|
|
543
|
+
"examples": [
|
|
544
|
+
"captcha"
|
|
545
|
+
]
|
|
258
546
|
},
|
|
259
547
|
"provider": {
|
|
260
548
|
"type": "string",
|
|
549
|
+
"description": "Provider identifier within the gate kind — e.g. `altcha`, `turnstile`,\n`hcaptcha`. The engine looks up an implementation in its provider\nregistry.\n",
|
|
261
550
|
"examples": [
|
|
262
|
-
"altcha"
|
|
263
|
-
|
|
264
|
-
"hcaptcha"
|
|
265
|
-
],
|
|
266
|
-
"description": "Provider identifier within the gate kind — e.g. `altcha`, `turnstile`, `hcaptcha`. The engine looks up an implementation in its provider registry."
|
|
551
|
+
"altcha"
|
|
552
|
+
]
|
|
267
553
|
},
|
|
268
554
|
"config": {
|
|
269
555
|
"type": "object",
|
|
556
|
+
"description": "Provider-specific configuration consumed by the implementation when\nissuing the per-render challenge. Opaque to the engine.\n",
|
|
270
557
|
"additionalProperties": true,
|
|
271
558
|
"examples": [
|
|
272
559
|
{
|
|
273
|
-
"site_key": "
|
|
560
|
+
"site_key": "0x4AAAAAAA-example-site-key"
|
|
274
561
|
}
|
|
275
|
-
]
|
|
276
|
-
"description": "Provider-specific configuration consumed by the implementation when issuing the per-render challenge. Opaque to the engine."
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
},
|
|
280
|
-
"SSOProvider": {
|
|
281
|
-
"type": "object",
|
|
282
|
-
"required": [
|
|
283
|
-
"id",
|
|
284
|
-
"name",
|
|
285
|
-
"template"
|
|
286
|
-
],
|
|
287
|
-
"additionalProperties": false,
|
|
288
|
-
"properties": {
|
|
289
|
-
"id": {
|
|
290
|
-
"type": "string",
|
|
291
|
-
"examples": [
|
|
292
|
-
"google",
|
|
293
|
-
"corp_idp"
|
|
294
|
-
],
|
|
295
|
-
"description": "Provider instance identifier. Echoed back by the client when the user picks a provider; routed to the corresponding configured IdP at the engine."
|
|
296
|
-
},
|
|
297
|
-
"name": {
|
|
298
|
-
"type": "string",
|
|
299
|
-
"examples": [
|
|
300
|
-
"Google",
|
|
301
|
-
"Acme SSO"
|
|
302
|
-
],
|
|
303
|
-
"description": "Display name surfaced to the user. Localized client-side if a matching text key exists in the locale dictionary."
|
|
304
|
-
},
|
|
305
|
-
"template": {
|
|
306
|
-
"type": "string",
|
|
307
|
-
"examples": [
|
|
308
|
-
"google",
|
|
309
|
-
"entraid",
|
|
310
|
-
"github"
|
|
311
|
-
],
|
|
312
|
-
"description": "Hint for rendering (logo, brand colors) — e.g. `google`, `entraid`, `github`. Consumed by the runtime template, not by the engine."
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
},
|
|
316
|
-
"Transition": {
|
|
317
|
-
"type": "object",
|
|
318
|
-
"required": [
|
|
319
|
-
"target"
|
|
320
|
-
],
|
|
321
|
-
"additionalProperties": false,
|
|
322
|
-
"properties": {
|
|
323
|
-
"target": {
|
|
324
|
-
"type": "string",
|
|
325
|
-
"examples": [
|
|
326
|
-
"authenticate",
|
|
327
|
-
"register",
|
|
328
|
-
"recovery"
|
|
329
|
-
],
|
|
330
|
-
"description": "When `action` is omitted, the `name` of a step in the same definition. When `action` is `switch` or `pivot`, the `name` of another flow definition in the same project."
|
|
331
|
-
},
|
|
332
|
-
"action": {
|
|
333
|
-
"type": [
|
|
334
|
-
"string",
|
|
335
|
-
"null"
|
|
336
|
-
],
|
|
337
|
-
"enum": [
|
|
338
|
-
"switch",
|
|
339
|
-
"pivot",
|
|
340
|
-
null
|
|
341
|
-
],
|
|
342
|
-
"description": "How to interpret `target`. - Omitted: transition to a step in the current definition. - `switch`: replace the current flow with the target flow. No return; the current flow is discarded. Typical use: navigating between peer flows like login ↔ register. - `pivot`: push the target flow onto the stack. The current flow is paused; when the target flow completes the engine auto-pops back. Typical use: login → recovery → back to login."
|
|
343
|
-
},
|
|
344
|
-
"purpose": {
|
|
345
|
-
"type": [
|
|
346
|
-
"string",
|
|
347
|
-
"null"
|
|
348
|
-
],
|
|
349
|
-
"enum": [
|
|
350
|
-
"login",
|
|
351
|
-
"register",
|
|
352
|
-
"recovery",
|
|
353
|
-
"profiling",
|
|
354
|
-
"reauth",
|
|
355
|
-
"link_account",
|
|
356
|
-
null
|
|
357
|
-
],
|
|
358
|
-
"description": "Local re-purposing. When set, taking this transition changes the flow's current purpose to this value — the dispatch mode a step's challenges run under — while the flow's original purpose stays pinned. Must be a purpose this definition serves, and `target` must be that purpose's entry step. Mutually exclusive with `action`: a transition either re-purposes within this flow or targets another flow, never both. Example: a \"Sign up\" navigation on the login identifier step (`{ \"target\": \"register\", \"purpose\": \"register\" }`)."
|
|
562
|
+
]
|
|
359
563
|
}
|
|
360
564
|
}
|
|
361
565
|
}
|