@burgan-tech/morph-idm-runtime 0.0.2 → 0.0.3

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.
Files changed (24) hide show
  1. package/burgan-tech-morph-idm-runtime-0.0.3.tgz +0 -0
  2. package/morph-idm/Schemas/client/client-update-1.0.0.json +263 -0
  3. package/morph-idm/Tasks/{user/send-push-task.json → user-login/push-send-task.json} +2 -2
  4. package/morph-idm/Workflows/client/client-1.0.0.json +7 -2
  5. package/morph-idm/Workflows/client/execute/client-update.http +763 -0
  6. package/morph-idm/Workflows/client/execute/client.http +12 -4
  7. package/morph-idm/Workflows/client/src/CreateRsaByHttpCallMapping.csx +10 -14
  8. package/morph-idm/Workflows/user/src/SendOtpSmsMapping.csx +3 -2
  9. package/morph-idm/Workflows/user-login/src/DeviceSearchMapping.csx +11 -3
  10. package/morph-idm/Workflows/user-login/src/PasswordVerifyMapping.csx +7 -4
  11. package/morph-idm/Workflows/user-login/src/PushSendMapping.csx +101 -0
  12. package/morph-idm/Workflows/user-login/src/ScopesByUserGetMapping.csx +7 -5
  13. package/morph-idm/Workflows/user-login/user-login.1.0.0.json +8 -7
  14. package/package.json +1 -1
  15. package/vnext.config.json +1 -1
  16. package/burgan-tech-morph-idm-runtime-0.0.2.tgz +0 -0
  17. package/morph-idm/Schemas/client/client-update-master-1.0.0.json +0 -201
  18. package/morph-idm/Workflows/client/client-update-1.0.0.json +0 -202
  19. package/morph-idm/Workflows/client-manager/client-manager-1.0.0.json +0 -217
  20. package/morph-idm/Workflows/client-manager/execute/client-manager.http +0 -214
  21. package/morph-idm/Workflows/client-manager/src/ClientCreatedRule.csx +0 -28
  22. package/morph-idm/Workflows/client-manager/src/ClientExistsRule.csx +0 -25
  23. package/morph-idm/Workflows/client-manager/src/CreateClientSubFlowMapping.csx +0 -63
  24. package/morph-idm/Workflows/client-manager/src/GetClientForManagerMapping.csx +0 -59
@@ -0,0 +1,763 @@
1
+ ### Variables
2
+ ### NOTE: baseUrl, apiVersion, and domain are defined in .vscode/settings.json
3
+ ### Current values (dev environment):
4
+ ### baseUrl: http://localhost:4201
5
+ ### apiVersion: v1
6
+ ### domain: morph-idm
7
+ ### To change environment, use VS Code REST Client extension's environment selector
8
+ ###
9
+ @workflow = client
10
+ @clientInstanceId = c056020d-1ccf-4b41-bbcb-ec25319086a5
11
+ @clientKey = IbWeb2
12
+
13
+ ### ============================================
14
+ ### CLIENT UPDATE SCENARIOS
15
+ ### ============================================
16
+ ### Not: Update transition is available in all states (draft, active, passive)
17
+ ### Update operation keeps the same state ($self target)
18
+ ### IMPORTANT: Array fields (redirectUris, allowedGrants, tokens, etc.) are REPLACED entirely, not merged
19
+ ### HTTP METHOD: Update transition requires PATCH (not POST) - API returns 405 if POST is used
20
+ ###
21
+ ### ARRAY UPDATE BEHAVIOR:
22
+ ### - Empty array [] REPLACES and removes all items (e.g., redirectUris: [] removes all redirect URIs)
23
+ ### - Non-empty array REPLACES entire existing array (not merged)
24
+ ### - Schema: client-update-1.0.0.json defines this behavior explicitly
25
+ ###
26
+ ### NOTE: After schema changes, API server may need to reload schemas or restart
27
+
28
+ ### ============================================
29
+ ### 1. BASIC UPDATES
30
+ ### ============================================
31
+
32
+ ### 1.1. Update Client Name Only
33
+ PATCH {{baseUrl}}/api/{{apiVersion}}/{{domain}}/workflows/{{workflow}}/instances/{{clientInstanceId}}/transitions/update?sync=true
34
+ Accept-Language: tr-TR
35
+ X-Request-Id: {{$guid}}
36
+ X-Device-Id: admin-portal
37
+ X-Token-Id: {{$guid}}
38
+ X-Device-Info: Admin Portal/1.0
39
+ X-Forwarded-For: 192.168.1.100
40
+ user_reference: admin-001
41
+ Content-Type: application/json
42
+
43
+ {
44
+ "attributes": {
45
+ "clientName": "Amorph Portal v2.0"
46
+ }
47
+ }
48
+
49
+ ###
50
+
51
+ ### 1.2. Update Client Name - Using Key Instead of Instance ID
52
+ PATCH {{baseUrl}}/api/{{apiVersion}}/{{domain}}/workflows/{{workflow}}/instances/{{clientKey}}/transitions/update?sync=true
53
+ Accept-Language: tr-TR
54
+ X-Request-Id: {{$guid}}
55
+ X-Device-Id: admin-portal
56
+ X-Token-Id: {{$guid}}
57
+ X-Device-Info: Admin Portal/1.0
58
+ X-Forwarded-For: 192.168.1.100
59
+ user_reference: admin-001
60
+ Content-Type: application/json
61
+
62
+ {
63
+ "attributes": {
64
+ "clientName": "Amorph Portal v2.0"
65
+ }
66
+ }
67
+
68
+ ###
69
+
70
+ ### ============================================
71
+ ### 2. SECURITY-RELATED UPDATES
72
+ ### ============================================
73
+
74
+ ### 2.1. Update Redirect URIs (Critical for Security)
75
+ # WARNING: This REPLACES all existing redirectUris
76
+ PATCH {{baseUrl}}/api/{{apiVersion}}/{{domain}}/workflows/{{workflow}}/instances/{{clientInstanceId}}/transitions/update?sync=true
77
+ Accept-Language: tr-TR
78
+ X-Request-Id: {{$guid}}
79
+ X-Device-Id: admin-portal
80
+ X-Token-Id: {{$guid}}
81
+ X-Device-Info: Admin Portal/1.0
82
+ X-Forwarded-For: 192.168.1.100
83
+ user_reference: admin-001
84
+ Content-Type: application/json
85
+
86
+ {
87
+ "attributes": {
88
+ "redirectUris": [
89
+ "https://portal.amorph.com/callback",
90
+ "https://portal.amorph.com/auth/callback",
91
+ "https://localhost:3000/callback"
92
+ ],
93
+ "postLogoutRedirectUris": [
94
+ "https://portal.amorph.com/logout",
95
+ "https://portal.amorph.com/goodbye"
96
+ ]
97
+ }
98
+ }
99
+
100
+ ###
101
+
102
+ ### 2.2. Remove All Redirect URIs (Send Empty Array)
103
+ # ⚠️ WARNING: Currently API runtime ignores empty arrays in PATCH requests
104
+ # This is a known limitation - empty arrays are not processed
105
+ # Workaround: Use a placeholder value then remove it, or wait for API fix
106
+ #
107
+ # Expected behavior: Empty array should clear all redirectUris
108
+ # Current behavior: Empty array is ignored, no changes made
109
+ #
110
+ PATCH {{baseUrl}}/api/{{apiVersion}}/{{domain}}/workflows/{{workflow}}/instances/{{clientInstanceId}}/transitions/update?sync=true
111
+ Accept-Language: tr-TR
112
+ X-Request-Id: {{$guid}}
113
+ X-Device-Id: admin-portal
114
+ X-Token-Id: {{$guid}}
115
+ X-Device-Info: Admin Portal/1.0
116
+ X-Forwarded-For: 192.168.1.100
117
+ user_reference: admin-001
118
+ Content-Type: application/json
119
+
120
+ {
121
+ "attributes": {
122
+ "redirectUris": []
123
+ }
124
+ }
125
+
126
+ ### 2.2a. WORKAROUND: Remove Redirect URIs (Using Placeholder)
127
+ # Since empty arrays are ignored, use a placeholder then remove it
128
+ # Step 1: Replace with a single placeholder URI
129
+ PATCH {{baseUrl}}/api/{{apiVersion}}/{{domain}}/workflows/{{workflow}}/instances/{{clientInstanceId}}/transitions/update?sync=true
130
+ Accept-Language: tr-TR
131
+ X-Request-Id: {{$guid}}
132
+ X-Device-Id: admin-portal
133
+ X-Token-Id: {{$guid}}
134
+ X-Device-Info: Admin Portal/1.0
135
+ X-Forwarded-For: 192.168.1.100
136
+ user_reference: admin-001
137
+ Content-Type: application/json
138
+
139
+ {
140
+ "attributes": {
141
+ "redirectUris": ["https://placeholder-to-remove.com"]
142
+ }
143
+ }
144
+
145
+ ###
146
+ # Step 2: Now remove the placeholder (this might work if API accepts single-item removal)
147
+ # Note: This workaround may not work if API merges instead of replaces
148
+
149
+ ###
150
+
151
+ ### 2.3. Update CORS Allowed Origins (Critical for SPA)
152
+ PATCH {{baseUrl}}/api/{{apiVersion}}/{{domain}}/workflows/{{workflow}}/instances/{{clientInstanceId}}/transitions/update?sync=true
153
+ Accept-Language: tr-TR
154
+ X-Request-Id: {{$guid}}
155
+ X-Device-Id: admin-portal
156
+ X-Token-Id: {{$guid}}
157
+ X-Device-Info: Admin Portal/1.0
158
+ X-Forwarded-For: 192.168.1.100
159
+ user_reference: admin-001
160
+ Content-Type: application/json
161
+
162
+ {
163
+ "attributes": {
164
+ "allowedOrigins": [
165
+ "https://portal.amorph.com",
166
+ "https://app.amorph.com",
167
+ "http://localhost:3000",
168
+ "http://localhost:3001"
169
+ ]
170
+ }
171
+ }
172
+
173
+ ###
174
+
175
+ ### 2.4. Update PKCE Settings (Security Enhancement)
176
+ PATCH {{baseUrl}}/api/{{apiVersion}}/{{domain}}/workflows/{{workflow}}/instances/{{clientInstanceId}}/transitions/update?sync=true
177
+ Accept-Language: tr-TR
178
+ X-Request-Id: {{$guid}}
179
+ X-Device-Id: admin-portal
180
+ X-Token-Id: {{$guid}}
181
+ X-Device-Info: Admin Portal/1.0
182
+ X-Forwarded-For: 192.168.1.100
183
+ user_reference: admin-001
184
+ Content-Type: application/json
185
+
186
+ {
187
+ "attributes": {
188
+ "pkce": {
189
+ "mode": "optional"
190
+ }
191
+ }
192
+ }
193
+
194
+ ###
195
+
196
+ ### 2.5. Update Token Endpoint Authentication Method
197
+ PATCH {{baseUrl}}/api/{{apiVersion}}/{{domain}}/workflows/{{workflow}}/instances/{{clientInstanceId}}/transitions/update?sync=true
198
+ Accept-Language: tr-TR
199
+ X-Request-Id: {{$guid}}
200
+ X-Device-Id: admin-portal
201
+ X-Token-Id: {{$guid}}
202
+ X-Device-Info: Admin Portal/1.0
203
+ X-Forwarded-For: 192.168.1.100
204
+ user_reference: admin-001
205
+ Content-Type: application/json
206
+
207
+ {
208
+ "attributes": {
209
+ "tokenEndpointAuthMethod": "client_secret_basic"
210
+ }
211
+ }
212
+
213
+ ###
214
+
215
+ ### ============================================
216
+ ### 3. TOKEN CONFIGURATION UPDATES
217
+ ### ============================================
218
+
219
+ ### 3.1. Update Token Durations and Claims
220
+ # WARNING: This REPLACES entire tokens array - must include all token types
221
+ PATCH {{baseUrl}}/api/{{apiVersion}}/{{domain}}/workflows/{{workflow}}/instances/{{clientInstanceId}}/transitions/update?sync=true
222
+ Accept-Language: tr-TR
223
+ X-Request-Id: {{$guid}}
224
+ X-Device-Id: admin-portal
225
+ X-Token-Id: {{$guid}}
226
+ X-Device-Info: Admin Portal/1.0
227
+ X-Forwarded-For: 192.168.1.100
228
+ user_reference: admin-001
229
+ Content-Type: application/json
230
+
231
+ {
232
+ "attributes": {
233
+ "tokens": [
234
+ {
235
+ "type": "identity",
236
+ "duration": "PT20M"
237
+ },
238
+ {
239
+ "type": "access",
240
+ "duration": "PT2H",
241
+ "claims": [
242
+ {
243
+ "name": "sub",
244
+ "value": "{{user.id}}"
245
+ },
246
+ {
247
+ "name": "scope",
248
+ "value": "{{user.scopes}}"
249
+ },
250
+ {
251
+ "name": "role",
252
+ "value": "{{user.role}}"
253
+ }
254
+ ]
255
+ },
256
+ {
257
+ "type": "refresh",
258
+ "duration": "P60D",
259
+ "claims": [
260
+ ]
261
+ }
262
+ ]
263
+ }
264
+ }
265
+
266
+ ###
267
+
268
+ ### 3.2. Update Authorization Code Lifetime
269
+ PATCH {{baseUrl}}/api/{{apiVersion}}/{{domain}}/workflows/{{workflow}}/instances/{{clientInstanceId}}/transitions/update?sync=true
270
+ Accept-Language: tr-TR
271
+ X-Request-Id: {{$guid}}
272
+ X-Device-Id: admin-portal
273
+ X-Token-Id: {{$guid}}
274
+ X-Device-Info: Admin Portal/1.0
275
+ X-Forwarded-For: 192.168.1.100
276
+ user_reference: admin-001
277
+ Content-Type: application/json
278
+
279
+ {
280
+ "attributes": {
281
+ "authorizationCodeLifetime": "PT2M"
282
+ }
283
+ }
284
+
285
+ ###
286
+
287
+ ### 3.3. Update Refresh Token Policy
288
+ PATCH {{baseUrl}}/api/{{apiVersion}}/{{domain}}/workflows/{{workflow}}/instances/{{clientInstanceId}}/transitions/update?sync=true
289
+ Accept-Language: tr-TR
290
+ X-Request-Id: {{$guid}}
291
+ X-Device-Id: admin-portal
292
+ X-Token-Id: {{$guid}}
293
+ X-Device-Info: Admin Portal/1.0
294
+ X-Forwarded-For: 192.168.1.100
295
+ user_reference: admin-001
296
+ Content-Type: application/json
297
+
298
+ {
299
+ "attributes": {
300
+ "refreshTokenPolicy": {
301
+ "absoluteLifetime": "P90D"
302
+ }
303
+ }
304
+ }
305
+
306
+ ###
307
+
308
+ ### 3.4. Update Access Token Format
309
+ PATCH {{baseUrl}}/api/{{apiVersion}}/{{domain}}/workflows/{{workflow}}/instances/{{clientInstanceId}}/transitions/update?sync=true
310
+ Accept-Language: tr-TR
311
+ X-Request-Id: {{$guid}}
312
+ X-Device-Id: admin-portal
313
+ X-Token-Id: {{$guid}}
314
+ X-Device-Info: Admin Portal/1.0
315
+ X-Forwarded-For: 192.168.1.100
316
+ user_reference: admin-001
317
+ Content-Type: application/json
318
+
319
+ {
320
+ "attributes": {
321
+ "accessTokenFormat": "opaque"
322
+ }
323
+ }
324
+
325
+ ###
326
+
327
+ ### ============================================
328
+ ### 4. GRANT TYPES AND AUTHENTICATION UPDATES
329
+ ### ============================================
330
+
331
+ ### 4.1. Update Allowed Grant Types
332
+ # WARNING: This REPLACES entire allowedGrants array
333
+ PATCH {{baseUrl}}/api/{{apiVersion}}/{{domain}}/workflows/{{workflow}}/instances/{{clientInstanceId}}/transitions/update?sync=true
334
+ Accept-Language: tr-TR
335
+ X-Request-Id: {{$guid}}
336
+ X-Device-Id: admin-portal
337
+ X-Token-Id: {{$guid}}
338
+ X-Device-Info: Admin Portal/1.0
339
+ X-Forwarded-For: 192.168.1.100
340
+ user_reference: admin-001
341
+ Content-Type: application/json
342
+
343
+ {
344
+ "attributes": {
345
+ "allowedGrants": [
346
+ "authorization_code",
347
+ "refresh_token",
348
+ "client_credentials"
349
+ ]
350
+ }
351
+ }
352
+
353
+ ###
354
+
355
+ ### 4.2. Update Allowed First Factor Authentication Methods
356
+ PATCH {{baseUrl}}/api/{{apiVersion}}/{{domain}}/workflows/{{workflow}}/instances/{{clientInstanceId}}/transitions/update?sync=true
357
+ Accept-Language: tr-TR
358
+ X-Request-Id: {{$guid}}
359
+ X-Device-Id: admin-portal
360
+ X-Token-Id: {{$guid}}
361
+ X-Device-Info: Admin Portal/1.0
362
+ X-Forwarded-For: 192.168.1.100
363
+ user_reference: admin-001
364
+ Content-Type: application/json
365
+
366
+ {
367
+ "attributes": {
368
+ "allowedFirstFactor": [
369
+ "password",
370
+ "sldap",
371
+ "pin"
372
+ ]
373
+ }
374
+ }
375
+
376
+ ###
377
+
378
+ ### 4.3. Update Response Types
379
+ PATCH {{baseUrl}}/api/{{apiVersion}}/{{domain}}/workflows/{{workflow}}/instances/{{clientInstanceId}}/transitions/update?sync=true
380
+ Accept-Language: tr-TR
381
+ X-Request-Id: {{$guid}}
382
+ X-Device-Id: admin-portal
383
+ X-Token-Id: {{$guid}}
384
+ X-Device-Info: Admin Portal/1.0
385
+ X-Forwarded-For: 192.168.1.100
386
+ user_reference: admin-001
387
+ Content-Type: application/json
388
+
389
+ {
390
+ "attributes": {
391
+ "responseTypes": [
392
+ "code",
393
+ "token"
394
+ ]
395
+ }
396
+ }
397
+
398
+ ###
399
+
400
+ ### ============================================
401
+ ### 5. CLIENT METADATA UPDATES
402
+ ### ============================================
403
+
404
+ ### 5.1. Update Client Display Information
405
+ PATCH {{baseUrl}}/api/{{apiVersion}}/{{domain}}/workflows/{{workflow}}/instances/{{clientInstanceId}}/transitions/update?sync=true
406
+ Accept-Language: tr-TR
407
+ X-Request-Id: {{$guid}}
408
+ X-Device-Id: admin-portal
409
+ X-Token-Id: {{$guid}}
410
+ X-Device-Info: Admin Portal/1.0
411
+ X-Forwarded-For: 192.168.1.100
412
+ user_reference: admin-001
413
+ Content-Type: application/json
414
+
415
+ {
416
+ "attributes": {
417
+ "clientName": "Amorph Portal Enterprise",
418
+ "clientUri": "https://portal.amorph.com",
419
+ "logoUri": "https://portal.amorph.com/assets/logo-v2.png",
420
+ "policyUri": "https://portal.amorph.com/privacy-policy",
421
+ "tosUri": "https://portal.amorph.com/terms-of-service"
422
+ }
423
+ }
424
+
425
+ ###
426
+
427
+ ### 5.2. Update Login/Logout URIs
428
+ PATCH {{baseUrl}}/api/{{apiVersion}}/{{domain}}/workflows/{{workflow}}/instances/{{clientInstanceId}}/transitions/update?sync=true
429
+ Accept-Language: tr-TR
430
+ X-Request-Id: {{$guid}}
431
+ X-Device-Id: admin-portal
432
+ X-Token-Id: {{$guid}}
433
+ X-Device-Info: Admin Portal/1.0
434
+ X-Forwarded-For: 192.168.1.100
435
+ user_reference: admin-001
436
+ Content-Type: application/json
437
+
438
+ {
439
+ "attributes": {
440
+ "loginURI": "https://portal.amorph.com/custom-login",
441
+ "returnURI": "https://portal.amorph.com/dashboard",
442
+ "logoutURI": "https://portal.amorph.com/logout-success"
443
+ }
444
+ }
445
+
446
+ ###
447
+
448
+ ### ============================================
449
+ ### 6. SCOPE AND SESSION UPDATES
450
+ ### ============================================
451
+
452
+ ### 6.1. Update Allowed Scope Groups
453
+ PATCH {{baseUrl}}/api/{{apiVersion}}/{{domain}}/workflows/{{workflow}}/instances/{{clientInstanceId}}/transitions/update?sync=true
454
+ Accept-Language: tr-TR
455
+ X-Request-Id: {{$guid}}
456
+ X-Device-Id: admin-portal
457
+ X-Token-Id: {{$guid}}
458
+ X-Device-Info: Admin Portal/1.0
459
+ X-Forwarded-For: 192.168.1.100
460
+ user_reference: admin-001
461
+ Content-Type: application/json
462
+
463
+ {
464
+ "attributes": {
465
+ "allowedScopeGroups": [
466
+ "reference",
467
+ "retail",
468
+ "retail-customers",
469
+ "corporate",
470
+ "admin"
471
+ ]
472
+ }
473
+ }
474
+
475
+ ###
476
+
477
+ ### 6.2. Update Single Session Clients
478
+ PATCH {{baseUrl}}/api/{{apiVersion}}/{{domain}}/workflows/{{workflow}}/instances/{{clientInstanceId}}/transitions/update?sync=true
479
+ Accept-Language: tr-TR
480
+ X-Request-Id: {{$guid}}
481
+ X-Device-Id: admin-portal
482
+ X-Token-Id: {{$guid}}
483
+ X-Device-Info: Admin Portal/1.0
484
+ X-Forwarded-For: 192.168.1.100
485
+ user_reference: admin-001
486
+ Content-Type: application/json
487
+
488
+ {
489
+ "attributes": {
490
+ "singleSessionClients": [
491
+ "web",
492
+ "ios",
493
+ "android"
494
+ ]
495
+ }
496
+ }
497
+
498
+ ###
499
+
500
+ ### ============================================
501
+ ### 7. APPLICATION TYPE UPDATES
502
+ ### ============================================
503
+
504
+ ### 7.1. Change Application Type (Web to SPA)
505
+ PATCH {{baseUrl}}/api/{{apiVersion}}/{{domain}}/workflows/{{workflow}}/instances/{{clientInstanceId}}/transitions/update?sync=true
506
+ Accept-Language: tr-TR
507
+ X-Request-Id: {{$guid}}
508
+ X-Device-Id: admin-portal
509
+ X-Token-Id: {{$guid}}
510
+ X-Device-Info: Admin Portal/1.0
511
+ X-Forwarded-For: 192.168.1.100
512
+ user_reference: admin-001
513
+ Content-Type: application/json
514
+
515
+ {
516
+ "attributes": {
517
+ "applicationType": "spa",
518
+ "clientType": "public",
519
+ "tokenEndpointAuthMethod": "none",
520
+ "responseTypes": [
521
+ "code",
522
+ "token"
523
+ ]
524
+ }
525
+ }
526
+
527
+ ###
528
+
529
+ ### 7.2. Change Application Type (Web to Native)
530
+ PATCH {{baseUrl}}/api/{{apiVersion}}/{{domain}}/workflows/{{workflow}}/instances/{{clientInstanceId}}/transitions/update?sync=true
531
+ Accept-Language: tr-TR
532
+ X-Request-Id: {{$guid}}
533
+ X-Device-Id: admin-portal
534
+ X-Token-Id: {{$guid}}
535
+ X-Device-Info: Admin Portal/1.0
536
+ X-Forwarded-For: 192.168.1.100
537
+ user_reference: admin-001
538
+ Content-Type: application/json
539
+
540
+ {
541
+ "attributes": {
542
+ "applicationType": "native",
543
+ "clientType": "public",
544
+ "tokenEndpointAuthMethod": "none",
545
+ "pkce": {
546
+ "mode": "must",
547
+ "codeChallengeMethods": [
548
+ "S256"
549
+ ],
550
+ "defaultMethod": "S256"
551
+ }
552
+ }
553
+ }
554
+
555
+ ###
556
+
557
+ ### ============================================
558
+ ### 8. COMPREHENSIVE UPDATES
559
+ ### ============================================
560
+
561
+ ### 8.1. Comprehensive Update - Multiple Fields
562
+ PATCH {{baseUrl}}/api/{{apiVersion}}/{{domain}}/workflows/{{workflow}}/instances/{{clientInstanceId}}/transitions/update?sync=true
563
+ Accept-Language: tr-TR
564
+ X-Request-Id: {{$guid}}
565
+ X-Device-Id: admin-portal
566
+ X-Token-Id: {{$guid}}
567
+ X-Device-Info: Admin Portal/1.0
568
+ X-Forwarded-For: 192.168.1.100
569
+ user_reference: admin-001
570
+ Content-Type: application/json
571
+
572
+ {
573
+ "attributes": {
574
+ "clientName": "Amorph Portal Production",
575
+ "allowedGrants": [
576
+ "authorization_code",
577
+ "refresh_token"
578
+ ],
579
+ "redirectUris": [
580
+ "https://portal.amorph.com/callback",
581
+ "https://portal.amorph.com/auth/callback"
582
+ ],
583
+ "allowedOrigins": [
584
+ "https://portal.amorph.com"
585
+ ],
586
+ "tokens": [
587
+ {
588
+ "type": "access",
589
+ "duration": "PT1H",
590
+ "claims": [
591
+ {
592
+ "name": "sub",
593
+ "value": "{{user.id}}"
594
+ },
595
+ {
596
+ "name": "scope",
597
+ "value": "{{user.scopes}}"
598
+ }
599
+ ]
600
+ },
601
+ {
602
+ "type": "refresh",
603
+ "duration": "P30D",
604
+ "claims": [
605
+ {
606
+ "name": "sub",
607
+ "value": "{{user.id}}"
608
+ }
609
+ ]
610
+ }
611
+ ],
612
+ "pkce": {
613
+ "mode": "must",
614
+ "codeChallengeMethods": [
615
+ "S256"
616
+ ],
617
+ "defaultMethod": "S256"
618
+ },
619
+ "authorizationCodeLifetime": "PT1M",
620
+ "accessTokenFormat": "jwt",
621
+ "clientUri": "https://portal.amorph.com",
622
+ "logoUri": "https://portal.amorph.com/assets/logo.png"
623
+ }
624
+ }
625
+
626
+ ###
627
+
628
+ ### ============================================
629
+ ### 9. ASYNC UPDATE MODE
630
+ ### ============================================
631
+
632
+ ### 9.1. Update in Async Mode (sync=false)
633
+ # Async mode: operation runs in background, returns immediately
634
+ PATCH {{baseUrl}}/api/{{apiVersion}}/{{domain}}/workflows/{{workflow}}/instances/{{clientInstanceId}}/transitions/update?sync=false
635
+ Accept-Language: tr-TR
636
+ X-Request-Id: {{$guid}}
637
+ X-Device-Id: admin-portal
638
+ X-Token-Id: {{$guid}}
639
+ X-Device-Info: Admin Portal/1.0
640
+ X-Forwarded-For: 192.168.1.100
641
+ user_reference: admin-001
642
+ Content-Type: application/json
643
+
644
+ {
645
+ "attributes": {
646
+ "clientName": "Updated Client Name",
647
+ "redirectUris": [
648
+ "https://new-callback.amorph.com"
649
+ ]
650
+ }
651
+ }
652
+
653
+ ###
654
+
655
+ ### ============================================
656
+ ### 10. STATE-SPECIFIC UPDATES
657
+ ### ============================================
658
+
659
+ ### 10.1. Update in Draft State
660
+ # Update is available in draft state
661
+ PATCH {{baseUrl}}/api/{{apiVersion}}/{{domain}}/workflows/{{workflow}}/instances/{{clientInstanceId}}/transitions/update?sync=true
662
+ Accept-Language: tr-TR
663
+ X-Request-Id: {{$guid}}
664
+ X-Device-Id: admin-portal
665
+ X-Token-Id: {{$guid}}
666
+ X-Device-Info: Admin Portal/1.0
667
+ X-Forwarded-For: 192.168.1.100
668
+ user_reference: admin-001
669
+ Content-Type: application/json
670
+
671
+ {
672
+ "attributes": {
673
+ "clientName": "Updated in Draft State",
674
+ "allowedGrants": [
675
+ "authorization_code"
676
+ ]
677
+ }
678
+ }
679
+
680
+ ###
681
+
682
+ ### 10.2. Update in Active State
683
+ # Update is available in active state (most common scenario)
684
+ PATCH {{baseUrl}}/api/{{apiVersion}}/{{domain}}/workflows/{{workflow}}/instances/{{clientInstanceId}}/transitions/update?sync=true
685
+ Accept-Language: tr-TR
686
+ X-Request-Id: {{$guid}}
687
+ X-Device-Id: admin-portal
688
+ X-Token-Id: {{$guid}}
689
+ X-Device-Info: Admin Portal/1.0
690
+ X-Forwarded-For: 192.168.1.100
691
+ user_reference: admin-001
692
+ Content-Type: application/json
693
+
694
+ {
695
+ "attributes": {
696
+ "clientName": "Updated in Active State",
697
+ "redirectUris": [
698
+ "https://portal.amorph.com/callback"
699
+ ]
700
+ }
701
+ }
702
+
703
+ ###
704
+
705
+ ### 10.3. Update in Passive State
706
+ # Update is available in passive state
707
+ PATCH {{baseUrl}}/api/{{apiVersion}}/{{domain}}/workflows/{{workflow}}/instances/{{clientInstanceId}}/transitions/update?sync=true
708
+ Accept-Language: tr-TR
709
+ X-Request-Id: {{$guid}}
710
+ X-Device-Id: admin-portal
711
+ X-Token-Id: {{$guid}}
712
+ X-Device-Info: Admin Portal/1.0
713
+ X-Forwarded-For: 192.168.1.100
714
+ user_reference: admin-001
715
+ Content-Type: application/json
716
+
717
+ {
718
+ "attributes": {
719
+ "clientName": "Updated in Passive State",
720
+ "allowedGrants": [
721
+ "authorization_code"
722
+ ]
723
+ }
724
+ }
725
+
726
+ ###
727
+
728
+ ### ============================================
729
+ ### 11. VERIFICATION REQUESTS
730
+ ### ============================================
731
+
732
+ ### 11.1. Get Client State After Update
733
+ # Update keeps the same state - verify state hasn't changed
734
+ GET {{baseUrl}}/api/{{apiVersion}}/{{domain}}/workflows/{{workflow}}/instances/{{clientInstanceId}}/functions/state
735
+ Accept-Language: tr-TR
736
+ X-Request-Id: {{$guid}}
737
+ X-Device-Id: admin-portal
738
+ X-Token-Id: {{$guid}}
739
+ user_reference: admin-001
740
+
741
+ ###
742
+
743
+ ### 11.2. Get Client Data After Update
744
+ # Verify the updated data
745
+ GET {{baseUrl}}/api/{{apiVersion}}/{{domain}}/workflows/{{workflow}}/instances/{{clientInstanceId}}/functions/data
746
+ Accept-Language: tr-TR
747
+ X-Request-Id: {{$guid}}
748
+ X-Device-Id: admin-portal
749
+ X-Token-Id: {{$guid}}
750
+ user_reference: admin-001
751
+
752
+ ###
753
+
754
+ ### 11.3. Get Client by Key After Update
755
+ GET {{baseUrl}}/api/{{apiVersion}}/{{domain}}/workflows/{{workflow}}/instances/{{clientKey}}/functions/data
756
+ Accept-Language: tr-TR
757
+ X-Request-Id: {{$guid}}
758
+ X-Device-Id: admin-portal
759
+ X-Token-Id: {{$guid}}
760
+ user_reference: admin-001
761
+
762
+ ###
763
+