@appaflytech/zeyrek-ai-mcp 0.0.67 → 0.0.68
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/knowledge/platform/mobile.js +1 -1
- package/dist/knowledge/platform/mobileRules.js +56 -0
- package/dist/knowledge/rules.js +109 -13
- package/dist/knowledge/signInProviders.js +103 -0
- package/dist/knowledge/socialSignIn.js +134 -0
- package/dist/resources/examples/flow-sign-in-with.json +312 -0
- package/dist/resources/examples/workflow-social-sign-in-mobile.json +300 -0
- package/dist/resources/examples/workflow-social-sign-in-web.json +277 -0
- package/dist/resources/guides/expressions.md +1 -1
- package/dist/resources/guides/mobile-publish.md +34 -1
- package/dist/resources/guides/mobile-steps.md +69 -3
- package/dist/resources/guides/mobile.md +1 -1
- package/dist/resources/guides/workflow.md +38 -0
- package/dist/resources/schema-fingerprint.json +2 -2
- package/dist/resources/schemas/CreateWorkflowCommand.json +6 -1
- package/dist/resources/schemas/PreviewWorkflowCommand.json +6 -1
- package/dist/resources/schemas/StepDto.json +6 -1
- package/dist/resources/schemas/UpdateWorkflowCommand.json +6 -1
- package/dist/server.js +2 -0
- package/dist/tools/flows.js +21 -8
- package/dist/tools/platformInfo.js +1 -1
- package/dist/tools/signInProviders.js +60 -0
- package/dist/tools/workflows.js +25 -14
- package/package.json +1 -1
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_meta": {
|
|
3
|
+
"synthetic": true,
|
|
4
|
+
"note": "Mobil sayfada 'Apple ile devam et' düğmesinin akışı (kök docs/adr/0035-sosyal-giris-akis-adimi.md): sunucudan nonce al → sign-in-with ile cihazın penceresinden idToken al → sunucuda doğrula ve oturum/jeton al → simple projede jetonu sakla → ana sayfaya git. Sunucu uçları (giris-basla, giris) workflow'un 'social-sign-in' adımıyla kurulur — gövdeleri ngapps://examples/workflow-social-sign-in-mobile; yanıt şekilleri { success, nonce } ve { success, userId, isNewUser, token? } olarak o örnekle aynıdır (Steps.basla.data.nonce, Steps.giris.data.token). Bu örnek yalnız istemci yarısıdır ve sentetiktir — gerçek bir uygulamada uçtan uca ölçülmemiştir.",
|
|
5
|
+
"harvestedFrom": "sentetik: kök ADR 0035 sözleşmesi ve @ng-apps/flow sign-in-golden.json'dan elle yazıldı; gateway kuralları (FLOW-047) altında bulgusuz doğrulandı"
|
|
6
|
+
},
|
|
7
|
+
"_rules": {
|
|
8
|
+
"args": "args.value sağlayıcıdır, DÜZ METİN: 'apple' ya da 'google' (ifade, tırnaklı ya da büyük harfli değer 422; FLOW-047). args.name sunucunun verdiği nonce'tur ve METİN ŞABLONUDUR: '{{ Steps.basla.data.nonce }}'. provider / nonce anahtarı sözleşmede yoktur ve sessizce düşer.",
|
|
9
|
+
"branches": "Dallar 'always' ve 'error'. Vazgeçme bir HATADIR (Steps.<ad>.error.status === 'cancelled'): error dalı → akışın hata adımları → ikisi de yoksa akış bu adımda BİTER (FLOW-047 uyarır). 'cancelled' kullanıcı kendi isteğiyle vazgeçtiği için sessiz kalır, öbür hatalar uyarı gösterir.",
|
|
10
|
+
"output": "Başarı Steps.<adım ADI>.data = { provider, idToken, authorizationCode, nonce, user: { email, name }, isPreview }. user.id YOKTUR: kimlik sunucuda doğrulanmış jetonun 'sub' alanından okunur. Apple ad ve e-postayı yalnız İLK girişte verir (ikincisinde null). Hata Steps.<ad>.error.status: cancelled · unavailable · unsupported · not-configured · invalid · failed.",
|
|
11
|
+
"where": "Studio önizlemesi deneme penceresi açar (Giriş başarılı / Vazgeç / Kullanılamıyor): başarıda isPreview true ve idToken null olur, sunucu bunu 'invalid_token' ile reddeder — sahte jeton üretilmez. Production /view ve web uygulaması unsupported döner; web'de giriş yönlendirmeyledir. Android'de Apple unsupported'dur.",
|
|
12
|
+
"cookie": "Yalnız simple projede: sunucu jeton döner (Steps.giris.data.token), 'token_kaydet' setcookie'si saklar (mobilde SecureStore). Complex projede oturum çerezle gelir: 'token_kaydet' adımını çıkarın, 'kontrol' koşulu doğrudan 'git'e bağlansın.",
|
|
13
|
+
"provider": "Her sağlayıcı ayrı düğme ve ayrı sign-in-with adımıdır (value: 'google' için aynı akışı çoğaltın); sağlayıcıyı ifadeyle seçmek yazılamaz.",
|
|
14
|
+
"binding": "Akışı olaya bağlamak ayrı adımdır: page_schema_patch set_event { target: 'btn_apple', event: 'click', eventValue: '<flow id>' }.",
|
|
15
|
+
"sunucuHatasi": "Sunucu hata dalını 200 + success:false ile bitirir (workflow-social-sign-in-mobile): 'kontrol' koşulu Steps.giris.data.success === true değilse 'olmadi'ye gider. İstek ağ ya da 4xx/5xx hatasıyla düşerse giris adımının error dalı aynı yere bağlıdır."
|
|
16
|
+
},
|
|
17
|
+
"pageOps": [
|
|
18
|
+
{
|
|
19
|
+
"op": "add_component",
|
|
20
|
+
"parent": "page_container",
|
|
21
|
+
"component": {
|
|
22
|
+
"elementId": "btn_apple",
|
|
23
|
+
"name": "btn_apple",
|
|
24
|
+
"type": "button",
|
|
25
|
+
"props": {
|
|
26
|
+
"text": "Apple ile devam et"
|
|
27
|
+
},
|
|
28
|
+
"blocks": [
|
|
29
|
+
{
|
|
30
|
+
"breakpoint": 1024,
|
|
31
|
+
"size": {
|
|
32
|
+
"w": 12,
|
|
33
|
+
"h": 1
|
|
34
|
+
},
|
|
35
|
+
"position": {
|
|
36
|
+
"x": 0,
|
|
37
|
+
"y": 1
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"op": "add_component",
|
|
45
|
+
"parent": "page_container",
|
|
46
|
+
"component": {
|
|
47
|
+
"elementId": "tx_giris_hata",
|
|
48
|
+
"name": "tx_giris_hata",
|
|
49
|
+
"type": "text",
|
|
50
|
+
"props": {
|
|
51
|
+
"content": ""
|
|
52
|
+
},
|
|
53
|
+
"blocks": [
|
|
54
|
+
{
|
|
55
|
+
"breakpoint": 1024,
|
|
56
|
+
"size": {
|
|
57
|
+
"w": 12,
|
|
58
|
+
"h": 1
|
|
59
|
+
},
|
|
60
|
+
"position": {
|
|
61
|
+
"x": 0,
|
|
62
|
+
"y": 2
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
],
|
|
69
|
+
"flowCreateArgs": {
|
|
70
|
+
"host": "page",
|
|
71
|
+
"hostId": "<page id>",
|
|
72
|
+
"name": "btn_apple - click",
|
|
73
|
+
"slug": "btn-apple-click",
|
|
74
|
+
"steps": [
|
|
75
|
+
{
|
|
76
|
+
"stepId": "start",
|
|
77
|
+
"name": "start",
|
|
78
|
+
"type": "start",
|
|
79
|
+
"kind": "normal",
|
|
80
|
+
"args": {},
|
|
81
|
+
"branches": [
|
|
82
|
+
{
|
|
83
|
+
"name": "always",
|
|
84
|
+
"nextStepId": "basla"
|
|
85
|
+
}
|
|
86
|
+
]
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"stepId": "basla",
|
|
90
|
+
"name": "basla",
|
|
91
|
+
"type": "microservice",
|
|
92
|
+
"kind": "normal",
|
|
93
|
+
"args": {
|
|
94
|
+
"microserviceId": "<giris-basla ucu id>",
|
|
95
|
+
"isRaw": false,
|
|
96
|
+
"parameters": [
|
|
97
|
+
{
|
|
98
|
+
"name": "provider",
|
|
99
|
+
"type": "string",
|
|
100
|
+
"source": "body",
|
|
101
|
+
"value": {
|
|
102
|
+
"type": "static",
|
|
103
|
+
"ref": "apple"
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"name": "client",
|
|
108
|
+
"type": "string",
|
|
109
|
+
"source": "body",
|
|
110
|
+
"value": {
|
|
111
|
+
"type": "static",
|
|
112
|
+
"ref": "mobile"
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
]
|
|
116
|
+
},
|
|
117
|
+
"branches": [
|
|
118
|
+
{
|
|
119
|
+
"name": "always",
|
|
120
|
+
"nextStepId": "apple"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"name": "error",
|
|
124
|
+
"nextStepId": "olmadi"
|
|
125
|
+
}
|
|
126
|
+
]
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"stepId": "apple",
|
|
130
|
+
"name": "apple",
|
|
131
|
+
"type": "sign-in-with",
|
|
132
|
+
"kind": "normal",
|
|
133
|
+
"args": {
|
|
134
|
+
"value": "apple",
|
|
135
|
+
"name": "{{ Steps.basla.data.nonce }}"
|
|
136
|
+
},
|
|
137
|
+
"branches": [
|
|
138
|
+
{
|
|
139
|
+
"name": "always",
|
|
140
|
+
"nextStepId": "giris"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"name": "error",
|
|
144
|
+
"nextStepId": "olmadi"
|
|
145
|
+
}
|
|
146
|
+
]
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"stepId": "giris",
|
|
150
|
+
"name": "giris",
|
|
151
|
+
"type": "microservice",
|
|
152
|
+
"kind": "normal",
|
|
153
|
+
"args": {
|
|
154
|
+
"microserviceId": "<giris ucu id>",
|
|
155
|
+
"isRaw": false,
|
|
156
|
+
"parameters": [
|
|
157
|
+
{
|
|
158
|
+
"name": "provider",
|
|
159
|
+
"type": "string",
|
|
160
|
+
"source": "body",
|
|
161
|
+
"value": {
|
|
162
|
+
"type": "code",
|
|
163
|
+
"ref": "Steps.apple.data.provider"
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"name": "idToken",
|
|
168
|
+
"type": "string",
|
|
169
|
+
"source": "body",
|
|
170
|
+
"value": {
|
|
171
|
+
"type": "code",
|
|
172
|
+
"ref": "Steps.apple.data.idToken"
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"name": "nonce",
|
|
177
|
+
"type": "string",
|
|
178
|
+
"source": "body",
|
|
179
|
+
"value": {
|
|
180
|
+
"type": "code",
|
|
181
|
+
"ref": "Steps.apple.data.nonce"
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"name": "authorizationCode",
|
|
186
|
+
"type": "string",
|
|
187
|
+
"source": "body",
|
|
188
|
+
"value": {
|
|
189
|
+
"type": "code",
|
|
190
|
+
"ref": "Steps.apple.data.authorizationCode"
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"name": "name",
|
|
195
|
+
"type": "string",
|
|
196
|
+
"source": "body",
|
|
197
|
+
"value": {
|
|
198
|
+
"type": "code",
|
|
199
|
+
"ref": "Steps.apple.data.user.name"
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
]
|
|
203
|
+
},
|
|
204
|
+
"branches": [
|
|
205
|
+
{
|
|
206
|
+
"name": "always",
|
|
207
|
+
"nextStepId": "kontrol"
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"name": "error",
|
|
211
|
+
"nextStepId": "olmadi"
|
|
212
|
+
}
|
|
213
|
+
]
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
"stepId": "kontrol",
|
|
217
|
+
"name": "kontrol",
|
|
218
|
+
"type": "condition",
|
|
219
|
+
"kind": "normal",
|
|
220
|
+
"args": {
|
|
221
|
+
"rules": [
|
|
222
|
+
{
|
|
223
|
+
"id": "01a16594-0000-7000-8000-0000000000d1",
|
|
224
|
+
"expression": "Steps.giris.data.success === true",
|
|
225
|
+
"type": "if"
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"id": "01a16594-0000-7000-8000-0000000000d2",
|
|
229
|
+
"expression": "",
|
|
230
|
+
"type": "else"
|
|
231
|
+
}
|
|
232
|
+
]
|
|
233
|
+
},
|
|
234
|
+
"branches": [
|
|
235
|
+
{
|
|
236
|
+
"name": "01a16594-0000-7000-8000-0000000000d1",
|
|
237
|
+
"nextStepId": "token_kaydet"
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
"name": "01a16594-0000-7000-8000-0000000000d2",
|
|
241
|
+
"nextStepId": "olmadi"
|
|
242
|
+
}
|
|
243
|
+
]
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
"stepId": "token_kaydet",
|
|
247
|
+
"name": "token_kaydet",
|
|
248
|
+
"type": "setcookie",
|
|
249
|
+
"kind": "normal",
|
|
250
|
+
"args": {
|
|
251
|
+
"name": "APP_Token",
|
|
252
|
+
"value": "Steps.giris.data.token",
|
|
253
|
+
"expiresInHours": 240
|
|
254
|
+
},
|
|
255
|
+
"branches": [
|
|
256
|
+
{
|
|
257
|
+
"name": "always",
|
|
258
|
+
"nextStepId": "git"
|
|
259
|
+
}
|
|
260
|
+
]
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
"stepId": "git",
|
|
264
|
+
"name": "git",
|
|
265
|
+
"type": "redirect",
|
|
266
|
+
"kind": "normal",
|
|
267
|
+
"args": {
|
|
268
|
+
"pageId": "<ana sayfa id>",
|
|
269
|
+
"path": "anasayfa",
|
|
270
|
+
"query": ""
|
|
271
|
+
},
|
|
272
|
+
"branches": [
|
|
273
|
+
{
|
|
274
|
+
"name": "always",
|
|
275
|
+
"nextStepId": null
|
|
276
|
+
}
|
|
277
|
+
]
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
"stepId": "olmadi",
|
|
281
|
+
"name": "olmadi",
|
|
282
|
+
"type": "setter",
|
|
283
|
+
"kind": "normal",
|
|
284
|
+
"args": {
|
|
285
|
+
"iteratees": [
|
|
286
|
+
{
|
|
287
|
+
"element": "tx_giris_hata",
|
|
288
|
+
"property": "content",
|
|
289
|
+
"source": "component",
|
|
290
|
+
"mapping": {
|
|
291
|
+
"source": "",
|
|
292
|
+
"mappings": {}
|
|
293
|
+
},
|
|
294
|
+
"type": "change",
|
|
295
|
+
"value": {
|
|
296
|
+
"type": "code",
|
|
297
|
+
"ref": "Steps.apple.error?.status === 'cancelled' ? '' : 'Giriş yapılamadı, lütfen tekrar deneyin'"
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
]
|
|
301
|
+
},
|
|
302
|
+
"branches": [
|
|
303
|
+
{
|
|
304
|
+
"name": "always",
|
|
305
|
+
"nextStepId": null
|
|
306
|
+
}
|
|
307
|
+
]
|
|
308
|
+
}
|
|
309
|
+
],
|
|
310
|
+
"errorSteps": []
|
|
311
|
+
}
|
|
312
|
+
}
|
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_meta": {
|
|
3
|
+
"synthetic": true,
|
|
4
|
+
"note": "Mobil Apple / Google girişinin SUNUCU yarısı (kök ADR 0036): üç workflow — giris-basla (social-sign-in start), giris (sign-in), hesap-sil (revoke). Cihaz yarısı flow-sign-in-with örneğidir; iki örnek aynı uç adlarını ve çıktı alanlarını (nonce, success, token) kullanır. Sentetiktir: sözleşme backend belgesinden (sosyal-giris/03) ve ADR 0036'ten yazıldı; workflow önizlemesinde start (state + nonce) ve sahte jetonla sign-in (invalid_token) canlı ölçüldü, gerçek bir Google / Apple jetonuyla uçtan uca tur ve complex projede oturum çerezleri ölçülmedi.",
|
|
5
|
+
"harvestedFrom": "sentetik: kök docs/adr/0036-sosyal-giris-workflow-adimi.md, zeyrek-backend/docs/sosyal-giris/03-workflow-adimi.md; gateway kuralları (WF-043/038/039) altında bulgusuz doğrulandı"
|
|
6
|
+
},
|
|
7
|
+
"_rules": {
|
|
8
|
+
"uclar": "Üç workflow, her biri bir microservice ucu (source: 'workflow') olarak yayımlanır; akıştaki microservice adımları bu uçları çağırır: giris-basla (anonim), giris (anonim), hesap-sil (oturum gerekir). Adım yalnız type: 'workflow' akışta çalışır; middleware'de hiçbir işlem, automation'da yalnız revoke geçer (WF-043).",
|
|
9
|
+
"start": "start ({ provider, client: 'mobile' }) tek kullanımlık state ve nonce üretir; yalnız özetleri saklanır. Cihaz nonce'u sağlayıcıya verir, jetondaki nonce sunucuda saklanan özetle karşılaştırılır. Yanıta yalnız nonce konur: flow Steps.basla.data.nonce okur. Adım çıktısındaki state / nonce / token yürütme izinde *** yazılır, yanıt ve sonraki adımlar gerçek değeri alır.",
|
|
10
|
+
"signIn": "sign-in girdisi { provider, idToken, nonce, authorizationCode?, name? } — sign-in-with sonucundan gelir. E-posta GİRDİ DEĞİLDİR: adım e-postayı yalnız doğrulanmış jetondan alır (WF-044). newUser ('create' | 'reject'; simple'da varsayılan create, complex'te reject) ve linkByEmail ('verified' | 'never'; varsayılan never) ifadeye eklenebilir.",
|
|
11
|
+
"oturum": "simple projede çıktı token'ı taşır ve flow setcookie ile saklar; complex projede oturum çerezleri yanıtla gider, çıktıda token YOKTUR — yanıt gövdesinden token satırını ve flow'daki setcookie adımını çıkarın (WF-045). access.session.create bu akışta kullanılmaz: parola ister.",
|
|
12
|
+
"cikti": "sign-in çıktısı { provider, subject, email, emailVerified, name, userId, isNewUser, refreshTokenStored, token? }. refreshTokenStored Apple yenileme jetonunun kaydedildiğini söyler; false ise o hesapta silme sırasında Apple iptali yapılamaz — akış kullanıcıyı uyarabilir ya da girişi reddedebilir.",
|
|
13
|
+
"hata": "Hata kodları kapalı kümedir: invalid_token · expired · audience · nonce · state · user_rejected · provider_not_configured · provider_unavailable. Başarısız adımın kodu <adım>.error.code'dadır (bağlı fail dalının hedefi global 'error'u okuyamaz, WF-035). Hata dalını 200 + success:false ile bitirin; flow condition ile success'e bakar.",
|
|
14
|
+
"revoke": "revoke hesap silmede (App Review 5.1.1(v)) çalışır: userId verilmezse oturumdaki kullanıcı alınır, başkasının kimliği user_rejected. Apple iptali başarısızsa o bağ SİLİNMEZ (yeniden denenebilir), appleRevoked false döner; kullanıcı verisini silmeden önce bu çıktıya bakın.",
|
|
15
|
+
"production": "AI social-sign-in taşıyan workflow'u production'da microservice_execute ile çalıştırmaz (WF-046); development'ta deneyin. Giriş sağlayıcılarının kimliği ve sırrı application_sign_in_update ile yazılır (ayarda yoksa provider_not_configured)."
|
|
16
|
+
},
|
|
17
|
+
"definitionStart": {
|
|
18
|
+
"name": "Giriş Başlat",
|
|
19
|
+
"slug": "giris-basla",
|
|
20
|
+
"description": "Apple / Google girişi için tek kullanımlık state ve nonce üretir; cihaz nonce'u sağlayıcıya verir.",
|
|
21
|
+
"type": "workflow",
|
|
22
|
+
"parameterDtoId": "<girdi DTO id: { provider: string }>",
|
|
23
|
+
"parameterBehavior": "object",
|
|
24
|
+
"returnDtoId": "<çıktı DTO id: { nonce: string, success: boolean, code: string }>",
|
|
25
|
+
"returnBehavior": "object",
|
|
26
|
+
"steps": [
|
|
27
|
+
{
|
|
28
|
+
"id": "<GUID-1>",
|
|
29
|
+
"name": "Start",
|
|
30
|
+
"type": "start",
|
|
31
|
+
"description": "Akışı başlatır.",
|
|
32
|
+
"branches": [
|
|
33
|
+
{
|
|
34
|
+
"id": "<GUID-b1>",
|
|
35
|
+
"name": "start",
|
|
36
|
+
"type": "success",
|
|
37
|
+
"nextStepId": "<GUID-3>"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"id": "<GUID-b2>",
|
|
41
|
+
"name": "global-error",
|
|
42
|
+
"type": "global-error",
|
|
43
|
+
"nextStepId": "<GUID-9>"
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"id": "<GUID-3>",
|
|
49
|
+
"name": "basla",
|
|
50
|
+
"type": "social-sign-in",
|
|
51
|
+
"description": "Giriş başlatır: durum satırı ve nonce üretir (mobil).",
|
|
52
|
+
"rule": {
|
|
53
|
+
"stepType": "social-sign-in",
|
|
54
|
+
"signInOperation": "start",
|
|
55
|
+
"expression": "({ provider: input.provider, client: 'mobile' })"
|
|
56
|
+
},
|
|
57
|
+
"branches": [
|
|
58
|
+
{
|
|
59
|
+
"id": "<GUID-b3>",
|
|
60
|
+
"name": "success",
|
|
61
|
+
"type": "success",
|
|
62
|
+
"nextStepId": "<GUID-6>"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"id": "<GUID-b4>",
|
|
66
|
+
"name": "fail",
|
|
67
|
+
"type": "fail",
|
|
68
|
+
"nextStepId": "<GUID-5>"
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"id": "<GUID-6>",
|
|
74
|
+
"name": "tamam",
|
|
75
|
+
"type": "response",
|
|
76
|
+
"description": "nonce'u döner; flow Steps.basla.data.nonce ile okur.",
|
|
77
|
+
"rule": {
|
|
78
|
+
"stepType": "response",
|
|
79
|
+
"bodyExpression": "({ success: true, nonce: basla.data.nonce })",
|
|
80
|
+
"httpStatusCode": 200
|
|
81
|
+
},
|
|
82
|
+
"branches": []
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"id": "<GUID-5>",
|
|
86
|
+
"name": "basarisiz",
|
|
87
|
+
"type": "response",
|
|
88
|
+
"description": "Doğrulama ya da giriş reddedildi: 200 + success:false döner (2xx dışı yanıt isteğin yazımlarını geri alabilir, durum tüketimi de gider). İstemci success alanına bakar, code hata kodunu söyler.",
|
|
89
|
+
"rule": {
|
|
90
|
+
"stepType": "response",
|
|
91
|
+
"bodyExpression": "({ success: false, code: basla.error.code })",
|
|
92
|
+
"httpStatusCode": 200
|
|
93
|
+
},
|
|
94
|
+
"branches": []
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"id": "<GUID-9>",
|
|
98
|
+
"name": "onError",
|
|
99
|
+
"type": "response",
|
|
100
|
+
"description": "Akış beklenmedik biçimde patlarsa hata kodunu ve mesajını 500 ile döner.",
|
|
101
|
+
"rule": {
|
|
102
|
+
"stepType": "response",
|
|
103
|
+
"bodyExpression": "({ code: error.code, message: error.message })",
|
|
104
|
+
"httpStatusCode": 500
|
|
105
|
+
},
|
|
106
|
+
"branches": []
|
|
107
|
+
}
|
|
108
|
+
]
|
|
109
|
+
},
|
|
110
|
+
"definitionSignIn": {
|
|
111
|
+
"name": "Giriş",
|
|
112
|
+
"slug": "giris",
|
|
113
|
+
"description": "Cihazdan gelen kimlik jetonunu sunucuda doğrular, kişiyi bulur ya da açar ve simple projede uygulama jetonunu döner.",
|
|
114
|
+
"type": "workflow",
|
|
115
|
+
"parameterDtoId": "<girdi DTO id: { provider, idToken, nonce, authorizationCode?, name? }>",
|
|
116
|
+
"parameterBehavior": "object",
|
|
117
|
+
"returnDtoId": "<çıktı DTO id: { success: boolean, userId: string, isNewUser: boolean, token: string, code: string }>",
|
|
118
|
+
"returnBehavior": "object",
|
|
119
|
+
"steps": [
|
|
120
|
+
{
|
|
121
|
+
"id": "<GUID-1>",
|
|
122
|
+
"name": "Start",
|
|
123
|
+
"type": "start",
|
|
124
|
+
"description": "Akışı başlatır.",
|
|
125
|
+
"branches": [
|
|
126
|
+
{
|
|
127
|
+
"id": "<GUID-b1>",
|
|
128
|
+
"name": "start",
|
|
129
|
+
"type": "success",
|
|
130
|
+
"nextStepId": "<GUID-3>"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"id": "<GUID-b2>",
|
|
134
|
+
"name": "global-error",
|
|
135
|
+
"type": "global-error",
|
|
136
|
+
"nextStepId": "<GUID-9>"
|
|
137
|
+
}
|
|
138
|
+
]
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"id": "<GUID-3>",
|
|
142
|
+
"name": "giris",
|
|
143
|
+
"type": "social-sign-in",
|
|
144
|
+
"description": "Jetonu doğrular (imza, kitle, nonce), kimlik bağını bulur ya da kişi açar.",
|
|
145
|
+
"rule": {
|
|
146
|
+
"stepType": "social-sign-in",
|
|
147
|
+
"signInOperation": "sign-in",
|
|
148
|
+
"expression": "({ provider: input.provider, idToken: input.idToken, nonce: input.nonce, authorizationCode: input.authorizationCode, name: input.name })"
|
|
149
|
+
},
|
|
150
|
+
"branches": [
|
|
151
|
+
{
|
|
152
|
+
"id": "<GUID-b3>",
|
|
153
|
+
"name": "success",
|
|
154
|
+
"type": "success",
|
|
155
|
+
"nextStepId": "<GUID-6>"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"id": "<GUID-b4>",
|
|
159
|
+
"name": "fail",
|
|
160
|
+
"type": "fail",
|
|
161
|
+
"nextStepId": "<GUID-5>"
|
|
162
|
+
}
|
|
163
|
+
]
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"id": "<GUID-6>",
|
|
167
|
+
"name": "tamam",
|
|
168
|
+
"type": "response",
|
|
169
|
+
"description": "Simple projede token döner (flow setcookie ile saklar). Complex projede token satırını çıkarın: oturum çerezle gelir.",
|
|
170
|
+
"rule": {
|
|
171
|
+
"stepType": "response",
|
|
172
|
+
"bodyExpression": "({ success: true, userId: giris.data.userId, isNewUser: giris.data.isNewUser, token: giris.data.token })",
|
|
173
|
+
"httpStatusCode": 200
|
|
174
|
+
},
|
|
175
|
+
"branches": []
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"id": "<GUID-5>",
|
|
179
|
+
"name": "basarisiz",
|
|
180
|
+
"type": "response",
|
|
181
|
+
"description": "Doğrulama ya da giriş reddedildi: 200 + success:false döner (2xx dışı yanıt isteğin yazımlarını geri alabilir, durum tüketimi de gider). İstemci success alanına bakar, code hata kodunu söyler.",
|
|
182
|
+
"rule": {
|
|
183
|
+
"stepType": "response",
|
|
184
|
+
"bodyExpression": "({ success: false, code: giris.error.code })",
|
|
185
|
+
"httpStatusCode": 200
|
|
186
|
+
},
|
|
187
|
+
"branches": []
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"id": "<GUID-9>",
|
|
191
|
+
"name": "onError",
|
|
192
|
+
"type": "response",
|
|
193
|
+
"description": "Akış beklenmedik biçimde patlarsa hata kodunu ve mesajını 500 ile döner.",
|
|
194
|
+
"rule": {
|
|
195
|
+
"stepType": "response",
|
|
196
|
+
"bodyExpression": "({ code: error.code, message: error.message })",
|
|
197
|
+
"httpStatusCode": 500
|
|
198
|
+
},
|
|
199
|
+
"branches": []
|
|
200
|
+
}
|
|
201
|
+
]
|
|
202
|
+
},
|
|
203
|
+
"definitionRevoke": {
|
|
204
|
+
"name": "Hesap Sil",
|
|
205
|
+
"slug": "hesap-sil",
|
|
206
|
+
"description": "Hesap silmede oturumdaki kullanıcının sosyal giriş bağlarını ve Apple yenileme jetonunu iptal eder.",
|
|
207
|
+
"type": "workflow",
|
|
208
|
+
"parameterDtoId": "<girdi DTO id: {}>",
|
|
209
|
+
"parameterBehavior": "object",
|
|
210
|
+
"returnDtoId": "<çıktı DTO id: { success: boolean, appleRevoked: boolean, code: string }>",
|
|
211
|
+
"returnBehavior": "object",
|
|
212
|
+
"steps": [
|
|
213
|
+
{
|
|
214
|
+
"id": "<GUID-1>",
|
|
215
|
+
"name": "Start",
|
|
216
|
+
"type": "start",
|
|
217
|
+
"description": "Akışı başlatır.",
|
|
218
|
+
"branches": [
|
|
219
|
+
{
|
|
220
|
+
"id": "<GUID-b1>",
|
|
221
|
+
"name": "start",
|
|
222
|
+
"type": "success",
|
|
223
|
+
"nextStepId": "<GUID-3>"
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"id": "<GUID-b2>",
|
|
227
|
+
"name": "global-error",
|
|
228
|
+
"type": "global-error",
|
|
229
|
+
"nextStepId": "<GUID-9>"
|
|
230
|
+
}
|
|
231
|
+
]
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"id": "<GUID-3>",
|
|
235
|
+
"name": "iptal",
|
|
236
|
+
"type": "social-sign-in",
|
|
237
|
+
"description": "Oturumdaki kullanıcının bağlarını siler; Apple iptali başarısızsa o bağ kalır.",
|
|
238
|
+
"rule": {
|
|
239
|
+
"stepType": "social-sign-in",
|
|
240
|
+
"signInOperation": "revoke",
|
|
241
|
+
"expression": "({})"
|
|
242
|
+
},
|
|
243
|
+
"branches": [
|
|
244
|
+
{
|
|
245
|
+
"id": "<GUID-b3>",
|
|
246
|
+
"name": "success",
|
|
247
|
+
"type": "success",
|
|
248
|
+
"nextStepId": "<GUID-6>"
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
"id": "<GUID-b4>",
|
|
252
|
+
"name": "fail",
|
|
253
|
+
"type": "fail",
|
|
254
|
+
"nextStepId": "<GUID-5>"
|
|
255
|
+
}
|
|
256
|
+
]
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
"id": "<GUID-6>",
|
|
260
|
+
"name": "tamam",
|
|
261
|
+
"type": "response",
|
|
262
|
+
"description": "appleRevoked false ise kullanıcı verisini silmeden önce karar verin.",
|
|
263
|
+
"rule": {
|
|
264
|
+
"stepType": "response",
|
|
265
|
+
"bodyExpression": "({ success: true, appleRevoked: iptal.data.appleRevoked })",
|
|
266
|
+
"httpStatusCode": 200
|
|
267
|
+
},
|
|
268
|
+
"branches": []
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
"id": "<GUID-5>",
|
|
272
|
+
"name": "basarisiz",
|
|
273
|
+
"type": "response",
|
|
274
|
+
"description": "Doğrulama ya da giriş reddedildi: 200 + success:false döner (2xx dışı yanıt isteğin yazımlarını geri alabilir, durum tüketimi de gider). İstemci success alanına bakar, code hata kodunu söyler.",
|
|
275
|
+
"rule": {
|
|
276
|
+
"stepType": "response",
|
|
277
|
+
"bodyExpression": "({ success: false, code: iptal.error.code })",
|
|
278
|
+
"httpStatusCode": 200
|
|
279
|
+
},
|
|
280
|
+
"branches": []
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"id": "<GUID-9>",
|
|
284
|
+
"name": "onError",
|
|
285
|
+
"type": "response",
|
|
286
|
+
"description": "Akış beklenmedik biçimde patlarsa hata kodunu ve mesajını 500 ile döner.",
|
|
287
|
+
"rule": {
|
|
288
|
+
"stepType": "response",
|
|
289
|
+
"bodyExpression": "({ code: error.code, message: error.message })",
|
|
290
|
+
"httpStatusCode": 500
|
|
291
|
+
},
|
|
292
|
+
"branches": []
|
|
293
|
+
}
|
|
294
|
+
]
|
|
295
|
+
},
|
|
296
|
+
"usage": {
|
|
297
|
+
"kurulumSirasi": "1) application_sign_in_update ile sağlayıcı kimlikleri ve sırrı yaz (ayar yoksa provider_not_configured), 2) üç parametre / dönüş DTO'sunu aç, 3) üç workflow'u workflow_create ile kaydet, 4) her biri için source: 'workflow' microservice (giris-basla ve giris anonim), 5) flow-sign-in-with akışındaki microserviceId'leri bu uçlara bağla.",
|
|
298
|
+
"dogrulama": "workflow_preview: start çıktısı { state, nonce } (iz ***), bozuk jetonla sign-in invalid_token. Gerçek jetonla tur yalnız cihazda (mağaza derlemesi) yapılır."
|
|
299
|
+
}
|
|
300
|
+
}
|