@burgan-tech/morph-idm-runtime 0.0.0

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 (206) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +245 -0
  3. package/burgan-tech-morph-idm-runtime-0.0.0.tgz +0 -0
  4. package/morph-idm/Extensions/.gitkeep +0 -0
  5. package/morph-idm/Functions/.gitkeep +0 -0
  6. package/morph-idm/Functions/user/function-validate-user.json +31 -0
  7. package/morph-idm/Functions/user/src/ValidateUser.csx +39 -0
  8. package/morph-idm/Mappings/device-register-evaluate-get-device-request.mapper.json +319 -0
  9. package/morph-idm/Mappings/device-register-evaluate-get-device-response.mapper.json +761 -0
  10. package/morph-idm/Mappings/device-register-new-device-call-device-start-request.mapper.json +762 -0
  11. package/morph-idm/Mappings/device-register-start.mapper.json +971 -0
  12. package/morph-idm/Mappings/device-start-request.mapper.json +20 -0
  13. package/morph-idm/Mappings/device-start.mapper.json +896 -0
  14. package/morph-idm/Mappings/device-update-request.mapper.json +883 -0
  15. package/morph-idm/Mappings/token-start-request.mapper.json +436 -0
  16. package/morph-idm/Schemas/approval-matrix/approval-matrix-master-1.0.0.json +98 -0
  17. package/morph-idm/Schemas/approval-matrix/approval-matrix-update-1.0.0.json +85 -0
  18. package/morph-idm/Schemas/client/client-master-1.0.0.json +293 -0
  19. package/morph-idm/Schemas/client/client-update-master-1.0.0.json +201 -0
  20. package/morph-idm/Schemas/consent/consent-master-1.0.0.json +151 -0
  21. package/morph-idm/Schemas/device/device-master-1.0.0.json +433 -0
  22. package/morph-idm/Schemas/device/device-register-master-1.0.0.json +300 -0
  23. package/morph-idm/Schemas/device/device-register-start-1.0.0.json +270 -0
  24. package/morph-idm/Schemas/device/device-start-1.0.0.json +281 -0
  25. package/morph-idm/Schemas/device/device-update-1.0.0.json +275 -0
  26. package/morph-idm/Schemas/headers-1.0.0.json +245 -0
  27. package/morph-idm/Schemas/organization/organization-master-1.0.0.json +386 -0
  28. package/morph-idm/Schemas/organization/organization-update-1.0.0.json +60 -0
  29. package/morph-idm/Schemas/privilege/privilege-master-1.0.0.json +84 -0
  30. package/morph-idm/Schemas/privilege/privilege-update-1.0.0.json +76 -0
  31. package/morph-idm/Schemas/scope/scope-group-master-1.0.0.json +52 -0
  32. package/morph-idm/Schemas/scope/scope-master-1.0.0.json +120 -0
  33. package/morph-idm/Schemas/token/token-master-1.0.0.json +346 -0
  34. package/morph-idm/Schemas/token/token-start-1.0.0.json +50 -0
  35. package/morph-idm/Schemas/transaction-limit/transaction-limit-master-1.0.0.json +175 -0
  36. package/morph-idm/Schemas/transaction-limit/transaction-limit-update-1.0.0.json +90 -0
  37. package/morph-idm/Schemas/user/person-master-1.0.0.json +211 -0
  38. package/morph-idm/Schemas/user/user-master-1.0.0.json +121 -0
  39. package/morph-idm/Tasks/.gitkeep +0 -0
  40. package/morph-idm/Tasks/call-device-start-1.0.0.json +21 -0
  41. package/morph-idm/Tasks/call-device-update-1.0.0.json +21 -0
  42. package/morph-idm/Tasks/client/client-create-rsa.json +26 -0
  43. package/morph-idm/Tasks/client/client-password-generator.json +14 -0
  44. package/morph-idm/Tasks/client/get-client-by-task.json +18 -0
  45. package/morph-idm/Tasks/consent/get-consent-by-task.json +18 -0
  46. package/morph-idm/Tasks/consent/get-multi-consents-by-task.json +25 -0
  47. package/morph-idm/Tasks/device/get-device-by-task.json +18 -0
  48. package/morph-idm/Tasks/get-device-1.0.0.json +20 -0
  49. package/morph-idm/Tasks/scope/get-scope-by-task.json +17 -0
  50. package/morph-idm/Tasks/scope/scope-by-user-task.json +25 -0
  51. package/morph-idm/Tasks/scope/scope-details-task.json +25 -0
  52. package/morph-idm/Tasks/token/send-token-to-main.json +20 -0
  53. package/morph-idm/Tasks/token/token-create-jwt.json +27 -0
  54. package/morph-idm/Tasks/user/get-user-by-task.json +18 -0
  55. package/morph-idm/Tasks/user/send-otp-task.json +25 -0
  56. package/morph-idm/Tasks/user/send-push-task.json +22 -0
  57. package/morph-idm/Tasks/user/user-password-generator.json +26 -0
  58. package/morph-idm/Tasks/user/verify-otp-task.json +22 -0
  59. package/morph-idm/Tasks/user/verify-push-task.json +22 -0
  60. package/morph-idm/Views/.gitkeep +0 -0
  61. package/morph-idm/Workflows/.gitkeep +0 -0
  62. package/morph-idm/Workflows/approval-matrix/approval-1.0.0.json +452 -0
  63. package/morph-idm/Workflows/approval-matrix/approval-matrix-1.0.0.json +184 -0
  64. package/morph-idm/Workflows/client/client-1.0.0.json +257 -0
  65. package/morph-idm/Workflows/client/client-update-1.0.0.json +202 -0
  66. package/morph-idm/Workflows/client/execute/client.http +377 -0
  67. package/morph-idm/Workflows/client/src/ClientCreateRsa.csx +198 -0
  68. package/morph-idm/Workflows/client/src/ClientCreateRsaByScript.csx +118 -0
  69. package/morph-idm/Workflows/client/src/CreateRsaByHttpCallMapping.csx +223 -0
  70. package/morph-idm/Workflows/client/src/PasswordGeneratorMapping.csx +26 -0
  71. package/morph-idm/Workflows/client/src/RsaExistsRule.csx +44 -0
  72. package/morph-idm/Workflows/client-manager/client-manager-1.0.0.json +217 -0
  73. package/morph-idm/Workflows/client-manager/execute/client-manager.http +214 -0
  74. package/morph-idm/Workflows/client-manager/src/ClientCreatedRule.csx +28 -0
  75. package/morph-idm/Workflows/client-manager/src/ClientExistsRule.csx +25 -0
  76. package/morph-idm/Workflows/client-manager/src/CreateClientSubFlowMapping.csx +63 -0
  77. package/morph-idm/Workflows/client-manager/src/GetClientForManagerMapping.csx +59 -0
  78. package/morph-idm/Workflows/consent/consent-1.0.0.json +424 -0
  79. package/morph-idm/Workflows/consent/execute/README.md +167 -0
  80. package/morph-idm/Workflows/consent/execute/consent-invitation-flow.http +283 -0
  81. package/morph-idm/Workflows/consent/execute/create-consent.http +780 -0
  82. package/morph-idm/Workflows/consent/src/AutoConsentRule.csx +29 -0
  83. package/morph-idm/Workflows/consent/src/ConsentTimeoutTimer.csx +14 -0
  84. package/morph-idm/Workflows/consent-selection/consent-selection-1.0.0.json +331 -0
  85. package/morph-idm/Workflows/consent-selection/src/AutoConsentCreatedRule.csx +28 -0
  86. package/morph-idm/Workflows/consent-selection/src/ConsentFetchMapping.csx +82 -0
  87. package/morph-idm/Workflows/consent-selection/src/ConsentSelectedMapping.csx +70 -0
  88. package/morph-idm/Workflows/consent-selection/src/CreateAutoConsentMapping.csx +150 -0
  89. package/morph-idm/Workflows/consent-selection/src/MultipleConsentsRule.csx +31 -0
  90. package/morph-idm/Workflows/consent-selection/src/NoConsentEligibleRule.csx +44 -0
  91. package/morph-idm/Workflows/consent-selection/src/SingleConsentRule.csx +45 -0
  92. package/morph-idm/Workflows/device/device-1.0.0.json +261 -0
  93. package/morph-idm/Workflows/device/device-migration-1.0.0.json +213 -0
  94. package/morph-idm/Workflows/device/device-register-1.0.0-documentation.md +646 -0
  95. package/morph-idm/Workflows/device/device-register-1.0.0-documentation.svg +36 -0
  96. package/morph-idm/Workflows/device/device-register-1.0.0.json +185 -0
  97. package/morph-idm/Workflows/device/execute/device-android.http +260 -0
  98. package/morph-idm/Workflows/device/execute/device-huawei.http +219 -0
  99. package/morph-idm/Workflows/device/execute/device-ios.http +325 -0
  100. package/morph-idm/Workflows/device/execute/device-web.http +284 -0
  101. package/morph-idm/Workflows/device/src/DeviceCreatedRule.csx +32 -0
  102. package/morph-idm/Workflows/device/src/DeviceFoundRule.csx +32 -0
  103. package/morph-idm/Workflows/device/src/DeviceNotFoundRule.csx +28 -0
  104. package/morph-idm/Workflows/device/src/DeviceUpdatedRule.csx +26 -0
  105. package/morph-idm/Workflows/device/src/NoUpdateRule.csx +19 -0
  106. package/morph-idm/Workflows/device/src/ReInstallRule.csx +19 -0
  107. package/morph-idm/Workflows/document-validation/_FF_document-validation.json +423 -0
  108. package/morph-idm/Workflows/document-validation/src/ApproveRule.csx +16 -0
  109. package/morph-idm/Workflows/document-validation/src/ClassifyRule.csx +16 -0
  110. package/morph-idm/Workflows/document-validation/src/ExtractRule.csx +16 -0
  111. package/morph-idm/Workflows/document-validation/src/HitlRule.csx +16 -0
  112. package/morph-idm/Workflows/document-validation/src/RejectRule.csx +16 -0
  113. package/morph-idm/Workflows/document-validation/src/RunOcrRule.csx +16 -0
  114. package/morph-idm/Workflows/document-validation/src/StartRule.csx +16 -0
  115. package/morph-idm/Workflows/document-validation/src/ToAggregateRule.csx +16 -0
  116. package/morph-idm/Workflows/document-validation/src/ToFraudRule.csx +16 -0
  117. package/morph-idm/Workflows/document-validation/src/ToReferentialRule.csx +16 -0
  118. package/morph-idm/Workflows/document-validation/src/ToSemanticRule.csx +16 -0
  119. package/morph-idm/Workflows/document-validation/src/ToStructuralRule.csx +16 -0
  120. package/morph-idm/Workflows/organization/execute/create-organization.http +280 -0
  121. package/morph-idm/Workflows/organization/organization-1.0.0-documentation.md +616 -0
  122. package/morph-idm/Workflows/organization/organization-1.0.0.json +181 -0
  123. package/morph-idm/Workflows/privilege/privilege-1.0.0.json +185 -0
  124. package/morph-idm/Workflows/scope/execute/scope-24-7-access.http +131 -0
  125. package/morph-idm/Workflows/scope/execute/scope-business-hours.http +138 -0
  126. package/morph-idm/Workflows/scope/execute/scope-corporate.http +165 -0
  127. package/morph-idm/Workflows/scope/execute/scope-individual.http +133 -0
  128. package/morph-idm/Workflows/scope/execute/scope-lifecycle-test.http +133 -0
  129. package/morph-idm/Workflows/scope/execute/scope-multi-systems.http +159 -0
  130. package/morph-idm/Workflows/scope/execute/scope-restricted.http +143 -0
  131. package/morph-idm/Workflows/scope/scope-1.0.0.json +142 -0
  132. package/morph-idm/Workflows/scope/scope-group-1.0.0.json +144 -0
  133. package/morph-idm/Workflows/scope-group/execute/create-scope-group.http +222 -0
  134. package/morph-idm/Workflows/token/execute/README.md +450 -0
  135. package/morph-idm/Workflows/token/execute/token.http +236 -0
  136. package/morph-idm/Workflows/token/oauth-authentication-workflow.json +406 -0
  137. package/morph-idm/Workflows/token/password-subflow.json +173 -0
  138. package/morph-idm/Workflows/token/scope-cdc-worker.1.0.0.json +46 -0
  139. package/morph-idm/Workflows/token/src/CreateRsaJwtMapping.csx +208 -0
  140. package/morph-idm/Workflows/token/src/ExpireTokenTimer.csx +14 -0
  141. package/morph-idm/Workflows/token/src/PrepareAuthorizationCodeRule.csx +16 -0
  142. package/morph-idm/Workflows/token/src/RequestInappropriateRule.csx +16 -0
  143. package/morph-idm/Workflows/token/src/SendJwtToMainMapping.csx +167 -0
  144. package/morph-idm/Workflows/token/token-1.0.0.json +356 -0
  145. package/morph-idm/Workflows/token/token-1.0.0.openapi.json.md +707 -0
  146. package/morph-idm/Workflows/token/token-exchange.1.0.0.json +45 -0
  147. package/morph-idm/Workflows/transaction-limit/transaction-limit-1.0.0.json +244 -0
  148. package/morph-idm/Workflows/transaction-limit/transaction-limit-authorization.json +502 -0
  149. package/morph-idm/Workflows/transaction-limit/transaction-limit-capture.json +142 -0
  150. package/morph-idm/Workflows/user/execute/README-LOGIN.md +535 -0
  151. package/morph-idm/Workflows/user/execute/create-user-1234567890.http +116 -0
  152. package/morph-idm/Workflows/user/execute/create-user-minimal.http +22 -0
  153. package/morph-idm/Workflows/user/execute/create-user-person-password.http +130 -0
  154. package/morph-idm/Workflows/user/execute/create-user-person.http +249 -0
  155. package/morph-idm/Workflows/user/execute/create-user-system.http +16 -0
  156. package/morph-idm/Workflows/user/execute/user-login.http +583 -0
  157. package/morph-idm/Workflows/user/execute/user-requests.http +51 -0
  158. package/morph-idm/Workflows/user/person-1.0.0.json +140 -0
  159. package/morph-idm/Workflows/user/person-cdc-worker.1.0.0.json +46 -0
  160. package/morph-idm/Workflows/user/person-upsert-1.0.0.json +129 -0
  161. package/morph-idm/Workflows/user/src/ApproveRule.csx +16 -0
  162. package/morph-idm/Workflows/user/src/AutoConsentCreatedRule.csx +20 -0
  163. package/morph-idm/Workflows/user/src/AutoConsentRequiredRule.csx +77 -0
  164. package/morph-idm/Workflows/user/src/CheckDeviceByUserReferenceMapping.csx +66 -0
  165. package/morph-idm/Workflows/user/src/ClientValidationFailRule.csx +28 -0
  166. package/morph-idm/Workflows/user/src/ClientValidationRule.csx +25 -0
  167. package/morph-idm/Workflows/user/src/ConsentSelectedRule.csx +24 -0
  168. package/morph-idm/Workflows/user/src/ConsentValidationRule.csx +36 -0
  169. package/morph-idm/Workflows/user/src/CreateAutoConsentMapping.csx +171 -0
  170. package/morph-idm/Workflows/user/src/DeviceFoundForLoginRule.csx +32 -0
  171. package/morph-idm/Workflows/user/src/DeviceNotFoundForLoginRule.csx +31 -0
  172. package/morph-idm/Workflows/user/src/GetClientMapping.csx +45 -0
  173. package/morph-idm/Workflows/user/src/GetConsentMapping.csx +27 -0
  174. package/morph-idm/Workflows/user/src/GetDeviceMapping.csx +52 -0
  175. package/morph-idm/Workflows/user/src/GetScopeMapping.csx +139 -0
  176. package/morph-idm/Workflows/user/src/GetScopesByUserMapping.csx +137 -0
  177. package/morph-idm/Workflows/user/src/GetUserMapping.csx +39 -0
  178. package/morph-idm/Workflows/user/src/GrantValidationFailRule.csx +48 -0
  179. package/morph-idm/Workflows/user/src/GrantValidationRule.csx +45 -0
  180. package/morph-idm/Workflows/user/src/IsIbWebClientWithDeviceRule.csx +42 -0
  181. package/morph-idm/Workflows/user/src/NonIbWebClientWithDeviceRule.csx +42 -0
  182. package/morph-idm/Workflows/user/src/OtpSentRule.csx +31 -0
  183. package/morph-idm/Workflows/user/src/OtpVerifiedRule.csx +31 -0
  184. package/morph-idm/Workflows/user/src/PushSentRule.csx +31 -0
  185. package/morph-idm/Workflows/user/src/PushVerifiedRule.csx +31 -0
  186. package/morph-idm/Workflows/user/src/RejectRule.csx +16 -0
  187. package/morph-idm/Workflows/user/src/ScopeFetchedRule.csx +35 -0
  188. package/morph-idm/Workflows/user/src/ScopeValidationFailRule.csx +67 -0
  189. package/morph-idm/Workflows/user/src/ScopeValidationRule.csx +67 -0
  190. package/morph-idm/Workflows/user/src/SendOtpMapping.csx +94 -0
  191. package/morph-idm/Workflows/user/src/SendPushMapping.csx +90 -0
  192. package/morph-idm/Workflows/user/src/TokenGenerationSuccessRule.csx +28 -0
  193. package/morph-idm/Workflows/user/src/TriggerConsentSelectionAsSubFlowMapping.csx +63 -0
  194. package/morph-idm/Workflows/user/src/TriggerTokenWorkflowAsSubFlowMapping.csx +42 -0
  195. package/morph-idm/Workflows/user/src/UserPasswordGeneratorMapping.csx +190 -0
  196. package/morph-idm/Workflows/user/src/UserValidationFailRule.csx +36 -0
  197. package/morph-idm/Workflows/user/src/UserValidationRule.csx +38 -0
  198. package/morph-idm/Workflows/user/src/VerifyOtpMapping.csx +65 -0
  199. package/morph-idm/Workflows/user/src/VerifyPushMapping.csx +65 -0
  200. package/morph-idm/Workflows/user/user-1.0.0.json +400 -0
  201. package/morph-idm/Workflows/user/user-force-update.1.0.0.json +46 -0
  202. package/morph-idm/Workflows/user/user-login-certificate.1.0.0.json +46 -0
  203. package/morph-idm/Workflows/user/user-login.1.0.0.json +1144 -0
  204. package/morph-idm/Workflows/user/user-password-reset.1.0.0.json +45 -0
  205. package/package.json +21 -0
  206. package/vnext.config.json +58 -0
@@ -0,0 +1,436 @@
1
+ {
2
+ "version": "1.0",
3
+ "metadata": {
4
+ "name": "token-start-request",
5
+ "description": "token-start-request mapper",
6
+ "version": "1.0.0",
7
+ "source": "none",
8
+ "target": "none",
9
+ "createdAt": "2025-11-08T09:33:50.762Z",
10
+ "tags": [
11
+ "new"
12
+ ]
13
+ },
14
+ "schemas": {
15
+ "source": "none",
16
+ "target": "none"
17
+ },
18
+ "nodes": [],
19
+ "edges": [
20
+ {
21
+ "id": "xy-edge__source-schema$.request.client-target-schema$.instance.client.id",
22
+ "source": "source-schema",
23
+ "sourceHandle": "$.request.client",
24
+ "target": "target-schema",
25
+ "targetHandle": "$.instance.client.id"
26
+ },
27
+ {
28
+ "id": "xy-edge__source-schema$.request.user-target-schema$.instance.user.id",
29
+ "source": "source-schema",
30
+ "sourceHandle": "$.request.user",
31
+ "target": "target-schema",
32
+ "targetHandle": "$.instance.user.id"
33
+ },
34
+ {
35
+ "id": "xy-edge__source-schema$.request.consent-target-schema$.instance.consent.id",
36
+ "source": "source-schema",
37
+ "sourceHandle": "$.request.consent",
38
+ "target": "target-schema",
39
+ "targetHandle": "$.instance.consent.id"
40
+ },
41
+ {
42
+ "id": "xy-edge__source-schema$.request.scope-target-schema$.instance.scope.id",
43
+ "source": "source-schema",
44
+ "sourceHandle": "$.request.scope",
45
+ "target": "target-schema",
46
+ "targetHandle": "$.instance.scope.id"
47
+ }
48
+ ],
49
+ "schemaParts": {
50
+ "source": {
51
+ "request": {
52
+ "schemaRef": "custom",
53
+ "schema": {
54
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
55
+ "$id": "https://example.com/schemas/token-start.schema.json",
56
+ "title": "Token Start",
57
+ "description": "OAuth2 token flow initiation data. Contains client, user, scope, and consent information to start token workflow.",
58
+ "type": "object",
59
+ "properties": {
60
+ "client": {
61
+ "type": "string",
62
+ "description": "Client fact key for the OAuth2 token request."
63
+ },
64
+ "user": {
65
+ "type": "string",
66
+ "description": "User fact key for the token request."
67
+ },
68
+ "consent": {
69
+ "type": "string",
70
+ "description": "Consent fact key for the token request."
71
+ },
72
+ "scope": {
73
+ "type": "string",
74
+ "description": "Requested scopes for the token (space-separated)."
75
+ }
76
+ },
77
+ "required": [
78
+ "client",
79
+ "user",
80
+ "consent",
81
+ "scope"
82
+ ],
83
+ "additionalProperties": false
84
+ },
85
+ "schemaSourcePath": "morph-idm/morph-idm/Schemas/token-start-1.0.0.json",
86
+ "schemaHash": "fade4ff3180722a4d12ec2f5e51390e25de171eaaeaa2e5a7ee6632d731f5857",
87
+ "label": "request"
88
+ }
89
+ },
90
+ "target": {
91
+ "instance": {
92
+ "schemaRef": "custom",
93
+ "schema": {
94
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
95
+ "$id": "https://example.com/schemas/token-master.schema.json",
96
+ "title": "Token",
97
+ "description": "OAuth2/OIDC token and session data. Contains access tokens and related information that a user has obtained as a result of a specific flow. This schema includes a snapshot of client policies so the token can manage its own lifecycle without querying the client repeatedly.",
98
+ "type": "object",
99
+ "properties": {
100
+ "client": {
101
+ "type": "object",
102
+ "description": "OAuth2 client information and snapshot.",
103
+ "properties": {
104
+ "id": {
105
+ "type": "string",
106
+ "description": "Client fact key."
107
+ },
108
+ "snapshot": {
109
+ "type": "object",
110
+ "description": "Client configuration snapshot taken at token creation. Allows token to manage its own lifecycle without querying client repeatedly.",
111
+ "properties": {
112
+ "fetchedAt": {
113
+ "type": "string",
114
+ "format": "date-time",
115
+ "description": "When this client snapshot was fetched."
116
+ },
117
+ "name": {
118
+ "type": "string",
119
+ "description": "Client name for logging and auditing."
120
+ },
121
+ "tokenDurations": {
122
+ "type": "object",
123
+ "description": "Token lifetime durations from client configuration.",
124
+ "properties": {
125
+ "authorizationCode": {
126
+ "type": "string",
127
+ "description": "Authorization code lifetime (ISO-8601 duration, e.g., PT1M)."
128
+ },
129
+ "accessToken": {
130
+ "type": "string",
131
+ "description": "Access token lifetime (ISO-8601 duration, e.g., PT5M)."
132
+ },
133
+ "refreshToken": {
134
+ "type": "string",
135
+ "description": "Refresh token lifetime (ISO-8601 duration, e.g., P30D)."
136
+ },
137
+ "identityToken": {
138
+ "type": "string",
139
+ "description": "Identity token lifetime (ISO-8601 duration, e.g., PT1H)."
140
+ }
141
+ }
142
+ },
143
+ "refreshTokenPolicy": {
144
+ "type": "object",
145
+ "description": "Refresh token policy from client configuration.",
146
+ "properties": {
147
+ "rotation": {
148
+ "type": "string",
149
+ "enum": [
150
+ "reuse",
151
+ "rotate"
152
+ ],
153
+ "description": "Refresh token rotation strategy. reuse: Same token can be reused. rotate: New token generated on each use."
154
+ },
155
+ "absoluteLifetime": {
156
+ "type": "string",
157
+ "description": "Total lifetime of refresh token (ISO-8601 duration)."
158
+ },
159
+ "reuseInterval": {
160
+ "type": "string",
161
+ "description": "In rotation mode, grace period during which old token remains valid (ISO-8601 duration)."
162
+ }
163
+ }
164
+ },
165
+ "accessTokenFormat": {
166
+ "type": "string",
167
+ "enum": [
168
+ "jwt",
169
+ "opaque"
170
+ ],
171
+ "description": "Format of the access token."
172
+ }
173
+ }
174
+ }
175
+ }
176
+ },
177
+ "user": {
178
+ "type": "object",
179
+ "description": "User information and snapshot.",
180
+ "properties": {
181
+ "id": {
182
+ "type": "string",
183
+ "description": "User fact key."
184
+ },
185
+ "snapshot": {
186
+ "type": "object",
187
+ "description": "User information snapshot for token claims.",
188
+ "properties": {
189
+ "fetchedAt": {
190
+ "type": "string",
191
+ "format": "date-time",
192
+ "description": "When this user snapshot was fetched."
193
+ },
194
+ "reference": {
195
+ "type": "string",
196
+ "description": "User business reference (national ID, employee number, etc.)."
197
+ },
198
+ "email": {
199
+ "type": "string",
200
+ "description": "User email address."
201
+ },
202
+ "name": {
203
+ "type": "string",
204
+ "description": "User full name."
205
+ }
206
+ }
207
+ }
208
+ }
209
+ },
210
+ "scope": {
211
+ "type": "object",
212
+ "description": "Scope (customer) information and snapshot.",
213
+ "properties": {
214
+ "id": {
215
+ "type": "string",
216
+ "description": "Scope fact key."
217
+ },
218
+ "snapshot": {
219
+ "type": "object",
220
+ "description": "Scope information snapshot for token claims.",
221
+ "properties": {
222
+ "fetchedAt": {
223
+ "type": "string",
224
+ "format": "date-time",
225
+ "description": "When this scope snapshot was fetched."
226
+ },
227
+ "reference": {
228
+ "type": "string",
229
+ "description": "Scope business reference (customer number, CIF, etc.)."
230
+ },
231
+ "name": {
232
+ "type": "string",
233
+ "description": "Scope name (customer name)."
234
+ }
235
+ }
236
+ }
237
+ }
238
+ },
239
+ "consent": {
240
+ "type": "object",
241
+ "description": "Consent information and snapshot.",
242
+ "properties": {
243
+ "id": {
244
+ "type": "string",
245
+ "description": "Consent fact key."
246
+ },
247
+ "snapshot": {
248
+ "type": "object",
249
+ "description": "Consent authorization snapshot.",
250
+ "properties": {
251
+ "fetchedAt": {
252
+ "type": "string",
253
+ "format": "date-time",
254
+ "description": "When this consent snapshot was fetched."
255
+ },
256
+ "scopes": {
257
+ "type": "array",
258
+ "items": {
259
+ "type": "string"
260
+ },
261
+ "description": "Granted scope names (resource scopes like 'read', 'write')."
262
+ },
263
+ "roles": {
264
+ "type": "array",
265
+ "items": {
266
+ "type": "string"
267
+ },
268
+ "description": "Granted role identifiers."
269
+ },
270
+ "expiresAt": {
271
+ "type": "string",
272
+ "format": "date-time",
273
+ "description": "Consent expiration time."
274
+ }
275
+ }
276
+ }
277
+ }
278
+ },
279
+ "tokenType": {
280
+ "type": "string",
281
+ "default": "Bearer",
282
+ "description": "Type of the token. Typically 'Bearer' for OAuth2 tokens. Used in Authorization header as 'Bearer <token>'."
283
+ },
284
+ "authorizationCode": {
285
+ "type": "object",
286
+ "properties": {
287
+ "value": {
288
+ "type": "string",
289
+ "description": "Authorization code value generated in the Authorization Code Grant Flow."
290
+ },
291
+ "issuedAt": {
292
+ "type": "string",
293
+ "format": "date-time",
294
+ "description": "Timestamp when the authorization code was issued."
295
+ },
296
+ "expiresAt": {
297
+ "type": "string",
298
+ "format": "date-time",
299
+ "description": "Timestamp when the authorization code will expire."
300
+ },
301
+ "isUsed": {
302
+ "type": "boolean",
303
+ "default": false,
304
+ "description": "Flag indicating whether this authorization code has been exchanged for tokens. Once used, it becomes invalid."
305
+ }
306
+ },
307
+ "description": "Authorization code information. Short-lived and single-use only."
308
+ },
309
+ "accessToken": {
310
+ "type": "object",
311
+ "properties": {
312
+ "value": {
313
+ "type": "string",
314
+ "description": "Access token value (JWT or opaque) used to access resources."
315
+ },
316
+ "issuedAt": {
317
+ "type": "string",
318
+ "format": "date-time",
319
+ "description": "Timestamp when the access token was issued."
320
+ },
321
+ "expiresAt": {
322
+ "type": "string",
323
+ "format": "date-time",
324
+ "description": "Timestamp when the access token will expire."
325
+ },
326
+ "claims": {
327
+ "type": "object",
328
+ "description": "Claims embedded in this access token (key-value pairs).",
329
+ "additionalProperties": true
330
+ }
331
+ },
332
+ "description": "Access token information. Used for API calls and resource access."
333
+ },
334
+ "refreshToken": {
335
+ "type": "object",
336
+ "properties": {
337
+ "value": {
338
+ "type": "string",
339
+ "description": "Refresh token value used to obtain new access tokens."
340
+ },
341
+ "issuedAt": {
342
+ "type": "string",
343
+ "format": "date-time",
344
+ "description": "Timestamp when the refresh token was issued."
345
+ },
346
+ "expiresAt": {
347
+ "type": "string",
348
+ "format": "date-time",
349
+ "description": "Timestamp when the refresh token will expire (absolute lifetime)."
350
+ },
351
+ "lastUsedAt": {
352
+ "type": "string",
353
+ "format": "date-time",
354
+ "description": "Timestamp when the refresh token was last used for token refresh."
355
+ },
356
+ "rotationCount": {
357
+ "type": "integer",
358
+ "default": 0,
359
+ "description": "Number of times this refresh token has been rotated. Used for tracking and security auditing."
360
+ }
361
+ },
362
+ "description": "Refresh token information. Used to obtain new access tokens without re-authentication."
363
+ },
364
+ "identityToken": {
365
+ "type": "object",
366
+ "properties": {
367
+ "value": {
368
+ "type": "string",
369
+ "description": "JWT-formatted identity token containing user information."
370
+ },
371
+ "issuedAt": {
372
+ "type": "string",
373
+ "format": "date-time",
374
+ "description": "Timestamp when the identity token was issued."
375
+ },
376
+ "expiresAt": {
377
+ "type": "string",
378
+ "format": "date-time",
379
+ "description": "Timestamp when the identity token will expire."
380
+ },
381
+ "claims": {
382
+ "type": "object",
383
+ "description": "Claims embedded in this identity token (key-value pairs).",
384
+ "additionalProperties": true
385
+ }
386
+ },
387
+ "description": "Identity token information (OpenID Connect). Contains user identity claims."
388
+ },
389
+ "sessionMetadata": {
390
+ "type": "object",
391
+ "properties": {
392
+ "createdAt": {
393
+ "type": "string",
394
+ "format": "date-time",
395
+ "description": "Timestamp when this token session was initially created (first token issued)."
396
+ },
397
+ "lastActivityAt": {
398
+ "type": "string",
399
+ "format": "date-time",
400
+ "description": "Timestamp of the last activity in this session (last token refresh or usage)."
401
+ },
402
+ "totalRefreshCount": {
403
+ "type": "integer",
404
+ "default": 0,
405
+ "description": "Total number of times refresh token has been used in this session."
406
+ }
407
+ },
408
+ "description": "Session-level metadata tracking overall session activity and statistics. Since token works as a session, this provides high-level session information. Client details (IP, port, device ID, user agent) are available in request headers and don't need to be duplicated here."
409
+ },
410
+ "completionReason": {
411
+ "type": "string",
412
+ "description": "Reason for token lifecycle completion. This information is managed by the low-code platform's state machine logic."
413
+ }
414
+ },
415
+ "required": [
416
+ "client",
417
+ "user",
418
+ "scope",
419
+ "consent",
420
+ "tokenType"
421
+ ],
422
+ "additionalProperties": false
423
+ },
424
+ "schemaSourcePath": "morph-idm/morph-idm/Schemas/token-master-1.0.0.json",
425
+ "schemaHash": "d858618fad517ef0c7c7ba804486adc9a621e8d5a5c103b4441d76b552ef86c7",
426
+ "label": "instance"
427
+ }
428
+ },
429
+ "sourceOrder": [
430
+ "request"
431
+ ],
432
+ "targetOrder": [
433
+ "instance"
434
+ ]
435
+ }
436
+ }
@@ -0,0 +1,98 @@
1
+ {
2
+ "key": "approval-matrix-master",
3
+ "version": "1.0.0",
4
+ "domain": "morph-idm",
5
+ "flow": "sys-schemas",
6
+ "flowVersion": "1.0.0",
7
+ "tags": [
8
+ "approval",
9
+ "schema"
10
+ ],
11
+ "attributes": {
12
+ "type": "workflow",
13
+ "schema": {
14
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
15
+ "$id": "https://vnext.io/schemas/approval-matrix/approval-matrix-master.json",
16
+ "title": "Approval Matrix",
17
+ "description": "Approval matrix defining position level based approval limits and amount range based approval requirements. Each instance is scope-specific.",
18
+ "type": "object",
19
+ "properties": {
20
+ "reference": {
21
+ "$ref": "../common/reference.json",
22
+ "description": "REQUIRED. Reference to Scope or ScopeGroup this approval matrix belongs to. Scope-specific matrices override ScopeGroup templates."
23
+ },
24
+ "approvalRules": {
25
+ "type": "array",
26
+ "description": "Amount range based approval rules. Defines who needs to approve based on transaction amount.",
27
+ "items": {
28
+ "type": "object",
29
+ "properties": {
30
+ "amountRange": {
31
+ "type": "object",
32
+ "description": "Amount range for this rule.",
33
+ "properties": {
34
+ "min": {
35
+ "type": "number",
36
+ "minimum": 0,
37
+ "description": "Minimum amount (inclusive)."
38
+ },
39
+ "max": {
40
+ "type": [
41
+ "number",
42
+ "null"
43
+ ],
44
+ "description": "Maximum amount (exclusive). null means unlimited."
45
+ },
46
+ "currency": {
47
+ "type": "string",
48
+ "description": "Currency code (e.g., 'TRY', 'USD')."
49
+ }
50
+ },
51
+ "required": [
52
+ "min",
53
+ "currency"
54
+ ],
55
+ "additionalProperties": false
56
+ },
57
+ "order": {
58
+ "type": "integer",
59
+ "minimum": 1,
60
+ "description": "Order number for approvals. Same order = parallel (any one requirement is enough), different orders = serial (must complete in sequence). Example: order:1 rules run in parallel, then order:2 rules run after all order:1 complete."
61
+ },
62
+ "requirement": {
63
+ "type": "object",
64
+ "description": "Approval requirement specification.",
65
+ "properties": {
66
+ "positionLevel": {
67
+ "type": "string",
68
+ "description": "Required position level code (e.g., 'manager', 'director'). Must be defined in the organization.positionLevels array of the referenced Scope or ScopeGroup."
69
+ },
70
+ "count": {
71
+ "type": "integer",
72
+ "minimum": 1,
73
+ "description": "Number of approvals required from this position level."
74
+ }
75
+ },
76
+ "required": [
77
+ "positionLevel",
78
+ "count"
79
+ ],
80
+ "additionalProperties": false
81
+ }
82
+ },
83
+ "required": [
84
+ "amountRange",
85
+ "order",
86
+ "requirement"
87
+ ],
88
+ "additionalProperties": false
89
+ }
90
+ }
91
+ },
92
+ "required": [
93
+ "reference"
94
+ ],
95
+ "additionalProperties": false
96
+ }
97
+ }
98
+ }
@@ -0,0 +1,85 @@
1
+ {
2
+ "key": "approval-matrix-update",
3
+ "version": "1.0.0",
4
+ "domain": "morph-idm",
5
+ "flow": "sys-schemas",
6
+ "flowVersion": "1.0.0",
7
+ "tags": [
8
+ "approval",
9
+ "schema",
10
+ "update"
11
+ ],
12
+ "attributes": {
13
+ "type": "workflow",
14
+ "schema": {
15
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
16
+ "$id": "https://vnext.io/schemas/approval-matrix/approval-matrix-update.json",
17
+ "title": "Approval Matrix Update",
18
+ "description": "Partial update schema for approval matrix instances. All fields are optional.",
19
+ "type": "object",
20
+ "properties": {
21
+ "approvalRules": {
22
+ "type": "array",
23
+ "description": "Updated approval rules. If provided, replaces existing list.",
24
+ "items": {
25
+ "type": "object",
26
+ "properties": {
27
+ "amountRange": {
28
+ "type": "object",
29
+ "properties": {
30
+ "min": {
31
+ "type": "number",
32
+ "minimum": 0
33
+ },
34
+ "max": {
35
+ "type": [
36
+ "number",
37
+ "null"
38
+ ]
39
+ },
40
+ "currency": {
41
+ "type": "string"
42
+ }
43
+ },
44
+ "required": [
45
+ "min",
46
+ "currency"
47
+ ],
48
+ "additionalProperties": false
49
+ },
50
+ "order": {
51
+ "type": "integer",
52
+ "minimum": 1
53
+ },
54
+ "requirement": {
55
+ "type": "object",
56
+ "properties": {
57
+ "positionLevel": {
58
+ "type": "string",
59
+ "description": "Must be defined in organization.positionLevels of referenced Scope/ScopeGroup."
60
+ },
61
+ "count": {
62
+ "type": "integer",
63
+ "minimum": 1
64
+ }
65
+ },
66
+ "required": [
67
+ "positionLevel",
68
+ "count"
69
+ ],
70
+ "additionalProperties": false
71
+ }
72
+ },
73
+ "required": [
74
+ "amountRange",
75
+ "order",
76
+ "requirement"
77
+ ],
78
+ "additionalProperties": false
79
+ }
80
+ }
81
+ },
82
+ "additionalProperties": false
83
+ }
84
+ }
85
+ }