@burgan-tech/morph-idm-runtime 0.0.1 → 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.
- package/burgan-tech-morph-idm-runtime-0.0.3.tgz +0 -0
- package/morph-idm/Schemas/client/client-update-1.0.0.json +263 -0
- package/morph-idm/Schemas/{user → person}/person-master-1.0.0.json +1 -1
- package/morph-idm/Schemas/token/token-start-1.0.0.json +6 -19
- package/morph-idm/Schemas/user/user-master-1.0.0.json +46 -1
- package/morph-idm/Schemas/user-login/retry-login-1.0.0.json +39 -0
- package/morph-idm/Tasks/call-device-start-1.0.0.json +1 -1
- package/morph-idm/Tasks/call-device-update-1.0.0.json +1 -1
- package/morph-idm/Tasks/consent/consent-auto-select-script.json +16 -0
- package/morph-idm/Tasks/{user/send-push-task.json → device/search-device-task.json} +5 -5
- package/morph-idm/Tasks/get-device-1.0.0.json +1 -1
- package/morph-idm/Tasks/person/get-person-by-task.json +19 -0
- package/morph-idm/Tasks/person/person-update-direct-transition.json +23 -0
- package/morph-idm/Tasks/token/token-create-jwt.json +0 -1
- package/morph-idm/Tasks/token/token-redeem-trigger.json +22 -0
- package/morph-idm/Tasks/token/user-login-get-as-filterable.json +22 -0
- package/morph-idm/Tasks/user/evaluate-failed-login-script.json +18 -0
- package/morph-idm/Tasks/user/get-phone-from-person-task.json +20 -0
- package/morph-idm/Tasks/user/otp-code-generator.json +15 -0
- package/morph-idm/Tasks/user/send-otp-sms-task.json +26 -0
- package/morph-idm/Tasks/user/user-update-password-fail-count.json +24 -0
- package/morph-idm/Tasks/user-login/auth-code-generator.json +17 -0
- package/morph-idm/Tasks/user-login/increment-local-fail-count.json +17 -0
- package/morph-idm/Tasks/user-login/password-verify.json +26 -0
- package/morph-idm/Tasks/user-login/push-send-task.json +25 -0
- package/morph-idm/TestCases/test-123/.httpyac.json +15 -0
- package/morph-idm/TestCases/test-123/01-person.http +95 -0
- package/morph-idm/TestCases/test-123/02-user.http +83 -0
- package/morph-idm/TestCases/test-123/03-scope.http +65 -0
- package/morph-idm/TestCases/test-123/04-consent.http +66 -0
- package/morph-idm/TestCases/test-123/05-device.http +86 -0
- package/morph-idm/TestCases/test-123/06-user-login.http +206 -0
- package/morph-idm/TestCases/test-123/README.md +112 -0
- package/morph-idm/TestCases/test-123/cleanup.js +49 -0
- package/morph-idm/TestCases/test-123/cleanup.sh +20 -0
- package/morph-idm/TestCases/test-123/cleanup.sql +45 -0
- package/morph-idm/TestCases/test-123/http-client.env.json +13 -0
- package/morph-idm/TestCases/test-123/run-setup.sh +42 -0
- package/morph-idm/TestCases/test-auto-consent/.httpyac.json +14 -0
- package/morph-idm/TestCases/test-auto-consent/01-person.http +72 -0
- package/morph-idm/TestCases/test-auto-consent/02-user.http +74 -0
- package/morph-idm/TestCases/test-auto-consent/03-scope.http +66 -0
- package/morph-idm/TestCases/test-auto-consent/04-device.http +56 -0
- package/morph-idm/TestCases/test-auto-consent/05-user-login.http +132 -0
- package/morph-idm/TestCases/test-auto-consent/README.md +36 -0
- package/morph-idm/TestCases/test-auto-consent/cleanup.js +47 -0
- package/morph-idm/TestCases/test-auto-consent/run-setup.sh +50 -0
- package/morph-idm/TestCases/test-multiple-consent/.httpyac.json +17 -0
- package/morph-idm/TestCases/test-multiple-consent/01-person.http +103 -0
- package/morph-idm/TestCases/test-multiple-consent/02-user.http +83 -0
- package/morph-idm/TestCases/test-multiple-consent/03-scope-2.http +66 -0
- package/morph-idm/TestCases/test-multiple-consent/03-scope.http +66 -0
- package/morph-idm/TestCases/test-multiple-consent/04-consent-1.http +67 -0
- package/morph-idm/TestCases/test-multiple-consent/04-consent-2.http +66 -0
- package/morph-idm/TestCases/test-multiple-consent/05-device.http +87 -0
- package/morph-idm/TestCases/test-multiple-consent/06-user-login.http +183 -0
- package/morph-idm/TestCases/test-multiple-consent/README.md +37 -0
- package/morph-idm/TestCases/test-multiple-consent/cleanup.js +46 -0
- package/morph-idm/TestCases/test-multiple-consent/cleanup.sh +20 -0
- package/morph-idm/TestCases/test-multiple-consent/run-setup.sh +53 -0
- package/morph-idm/Views/user-login/push-waiting.json +28 -0
- package/morph-idm/Views/user-login/start.json +28 -0
- package/morph-idm/Workflows/client/client-1.0.0.json +8 -3
- package/morph-idm/Workflows/client/execute/client-update.http +763 -0
- package/morph-idm/Workflows/client/execute/client.http +13 -5
- package/morph-idm/Workflows/client/src/CreateRsaByHttpCallMapping.csx +10 -14
- package/morph-idm/Workflows/client/src/PasswordGeneratorMapping.csx +0 -1
- package/morph-idm/Workflows/consent-selection/consent-selection-1.0.0.json +37 -6
- package/morph-idm/Workflows/consent-selection/execute/multi-consent-selection.http +209 -0
- package/morph-idm/Workflows/consent-selection/src/ConsentSelectedMapping.csx +18 -22
- package/morph-idm/Workflows/consent-selection/src/CreateAutoConsentMapping.csx +45 -45
- package/morph-idm/Workflows/consent-selection/src/MultipleConsentsRule.csx +12 -8
- package/morph-idm/Workflows/consent-selection/src/NoConsentEligibleRule.csx +6 -22
- package/morph-idm/Workflows/consent-selection/src/SingleConsentAutoSelectMapping.csx +63 -0
- package/morph-idm/Workflows/consent-selection/src/SingleConsentRule.csx +11 -22
- package/morph-idm/Workflows/device/execute/device-ios.http +0 -6
- package/morph-idm/Workflows/device/execute/search.http +32 -0
- package/morph-idm/Workflows/person/execute/person-123.http +191 -0
- package/morph-idm/Workflows/person/execute/person.http +196 -0
- package/morph-idm/Workflows/{user → person}/person-1.0.0.json +24 -1
- package/morph-idm/Workflows/token/execute/token.http +14 -3
- package/morph-idm/Workflows/token/password-subflow.json +1 -1
- package/morph-idm/Workflows/token/src/AuthCodeRedeemMapping.csx +114 -0
- package/morph-idm/Workflows/token/src/AuthCodeValidationRule.csx +27 -0
- package/morph-idm/Workflows/token/src/CreateRsaJwtMapping.csx +28 -16
- package/morph-idm/Workflows/token/src/StatusSuccessRule.csx +27 -0
- package/morph-idm/Workflows/token/src/TokenCreatedRule.csx +32 -0
- package/morph-idm/Workflows/token/src/UserLoginGetAsFilterableMapping.csx +204 -0
- package/morph-idm/Workflows/token/token-1.0.0.json +109 -41
- package/morph-idm/Workflows/user/execute/create-user-1234567890.http +16 -4
- package/morph-idm/Workflows/user/execute/create-user-migration.http +179 -0
- package/morph-idm/Workflows/user/execute/create-user-person-password.http +78 -32
- package/morph-idm/Workflows/user/src/EvaluateFailedLoginMapping.csx +75 -0
- package/morph-idm/Workflows/user/src/FailCountMaxRule.csx +33 -0
- package/morph-idm/Workflows/user/src/GetPhoneFromPersonMapping.csx +139 -0
- package/morph-idm/Workflows/user/src/HasPasswordsRule.csx +43 -0
- package/morph-idm/Workflows/user/src/OtpSentSuccessRule.csx +46 -0
- package/morph-idm/Workflows/user/src/PasswordGeneratedSuccessRule.csx +73 -0
- package/morph-idm/Workflows/user/src/PhoneFetchedSuccessRule.csx +35 -0
- package/morph-idm/Workflows/user/src/ResetPasswordFailCountMapping.csx +88 -0
- package/morph-idm/Workflows/user/src/SendOtpSmsMapping.csx +357 -0
- package/morph-idm/Workflows/user/src/UserPasswordGeneratorMapping.csx +33 -6
- package/morph-idm/Workflows/user/user-1.0.0.json +365 -5
- package/morph-idm/Workflows/{user → user-login}/execute/user-login.http +155 -32
- package/morph-idm/Workflows/user-login/src/AuthCodeGeneratorMapping.csx +44 -0
- package/morph-idm/Workflows/{user/src/GetClientMapping.csx → user-login/src/ClientGetMapping.csx} +6 -4
- package/morph-idm/Workflows/{user/src/TriggerConsentSelectionAsSubFlowMapping.csx → user-login/src/ConsentSelectionSubFlowMapping.csx} +19 -20
- package/morph-idm/Workflows/user-login/src/DeviceSearchMapping.csx +128 -0
- package/morph-idm/Workflows/{user → user-login}/src/GrantValidationRule.csx +5 -1
- package/morph-idm/Workflows/user-login/src/HasFailCountRule.csx +32 -0
- package/morph-idm/Workflows/user-login/src/MaxRetriesReachedRule.csx +32 -0
- package/morph-idm/Workflows/user-login/src/NoSecurityImageRule.csx +33 -0
- package/morph-idm/Workflows/user-login/src/NoSecurityQuestionRule.csx +65 -0
- package/morph-idm/Workflows/user-login/src/OtpCodeGenerateMapping.csx +37 -0
- package/morph-idm/Workflows/{user/src/SendOtpMapping.csx → user-login/src/OtpSendMapping.csx} +13 -7
- package/morph-idm/Workflows/user-login/src/OtpVerifiedRule.csx +35 -0
- package/morph-idm/Workflows/user-login/src/PasswordFailCountResetMapping.csx +77 -0
- package/morph-idm/Workflows/user-login/src/PasswordFailCountUpdateMapping.csx +80 -0
- package/morph-idm/Workflows/user-login/src/PasswordVerifyMapping.csx +172 -0
- package/morph-idm/Workflows/user-login/src/PersonFetchedRule.csx +32 -0
- package/morph-idm/Workflows/user-login/src/PersonGetMapping.csx +61 -0
- package/morph-idm/Workflows/user-login/src/PersonUpdateMapping.csx +105 -0
- package/morph-idm/Workflows/user-login/src/PersonUpdatedRule.csx +32 -0
- package/morph-idm/Workflows/{user/src/SendPushMapping.csx → user-login/src/PushSendMapping.csx} +22 -11
- package/morph-idm/Workflows/user-login/src/PushVerifiedRule.csx +31 -0
- package/morph-idm/Workflows/{user/src/GetScopesByUserMapping.csx → user-login/src/ScopesByUserGetMapping.csx} +24 -22
- package/morph-idm/Workflows/user-login/src/TokenGenerationSuccessRule.csx +33 -0
- package/morph-idm/Workflows/{user/src/TriggerTokenWorkflowAsSubFlowMapping.csx → user-login/src/TokenSubFlowMapping.csx} +7 -13
- package/morph-idm/Workflows/user-login/src/UserFoundRule.csx +19 -0
- package/morph-idm/Workflows/{user/src/GetUserMapping.csx → user-login/src/UserGetMapping.csx} +5 -3
- package/morph-idm/Workflows/user-login/src/UserStatusActiveRule.csx +34 -0
- package/morph-idm/Workflows/user-login/src/UserValidHasFailCountRule.csx +39 -0
- package/morph-idm/Workflows/user-login/src/UserValidNoFailCountRule.csx +39 -0
- package/morph-idm/Workflows/user-login/user-login.1.0.0.json +1828 -0
- package/package.json +1 -1
- package/vnext.config.json +3 -3
- package/burgan-tech-morph-idm-runtime-0.0.1.tgz +0 -0
- package/morph-idm/Schemas/client/client-update-master-1.0.0.json +0 -201
- package/morph-idm/Workflows/client/client-update-1.0.0.json +0 -202
- package/morph-idm/Workflows/client-manager/client-manager-1.0.0.json +0 -217
- package/morph-idm/Workflows/client-manager/execute/client-manager.http +0 -214
- package/morph-idm/Workflows/client-manager/src/ClientCreatedRule.csx +0 -28
- package/morph-idm/Workflows/client-manager/src/ClientExistsRule.csx +0 -25
- package/morph-idm/Workflows/client-manager/src/CreateClientSubFlowMapping.csx +0 -63
- package/morph-idm/Workflows/client-manager/src/GetClientForManagerMapping.csx +0 -59
- package/morph-idm/Workflows/user/src/ApproveRule.csx +0 -16
- package/morph-idm/Workflows/user/src/AutoConsentCreatedRule.csx +0 -20
- package/morph-idm/Workflows/user/src/AutoConsentRequiredRule.csx +0 -77
- package/morph-idm/Workflows/user/src/CheckDeviceByUserReferenceMapping.csx +0 -66
- package/morph-idm/Workflows/user/src/ClientValidationFailRule.csx +0 -28
- package/morph-idm/Workflows/user/src/ConsentValidationRule.csx +0 -36
- package/morph-idm/Workflows/user/src/CreateAutoConsentMapping.csx +0 -171
- package/morph-idm/Workflows/user/src/DeviceFoundForLoginRule.csx +0 -32
- package/morph-idm/Workflows/user/src/DeviceNotFoundForLoginRule.csx +0 -31
- package/morph-idm/Workflows/user/src/GetConsentMapping.csx +0 -27
- package/morph-idm/Workflows/user/src/GetDeviceMapping.csx +0 -52
- package/morph-idm/Workflows/user/src/GetScopeMapping.csx +0 -139
- package/morph-idm/Workflows/user/src/GrantValidationFailRule.csx +0 -48
- package/morph-idm/Workflows/user/src/OtpVerifiedRule.csx +0 -31
- package/morph-idm/Workflows/user/src/PushVerifiedRule.csx +0 -31
- package/morph-idm/Workflows/user/src/RejectRule.csx +0 -16
- package/morph-idm/Workflows/user/src/ScopeValidationFailRule.csx +0 -67
- package/morph-idm/Workflows/user/src/ScopeValidationRule.csx +0 -67
- package/morph-idm/Workflows/user/src/TokenGenerationSuccessRule.csx +0 -28
- package/morph-idm/Workflows/user/src/UserValidationFailRule.csx +0 -36
- package/morph-idm/Workflows/user/src/VerifyOtpMapping.csx +0 -65
- package/morph-idm/Workflows/user/src/VerifyPushMapping.csx +0 -65
- package/morph-idm/Workflows/user/user-login.1.0.0.json +0 -1144
- /package/morph-idm/Workflows/{user → person}/person-cdc-worker.1.0.0.json +0 -0
- /package/morph-idm/Workflows/{user → person}/person-upsert-1.0.0.json +0 -0
- /package/morph-idm/Workflows/scope/execute/{scope-individual.http → scope-individual-1234567890-1234567890.http} +0 -0
- /package/morph-idm/Workflows/{user → user-login}/execute/README-LOGIN.md +0 -0
- /package/morph-idm/Workflows/{user → user-login}/src/ClientValidationRule.csx +0 -0
- /package/morph-idm/Workflows/{user → user-login}/src/ConsentSelectedRule.csx +0 -0
- /package/morph-idm/Workflows/{user → user-login}/src/IsIbWebClientWithDeviceRule.csx +0 -0
- /package/morph-idm/Workflows/{user → user-login}/src/NonIbWebClientWithDeviceRule.csx +0 -0
- /package/morph-idm/Workflows/{user → user-login}/src/OtpSentRule.csx +0 -0
- /package/morph-idm/Workflows/{user → user-login}/src/PushSentRule.csx +0 -0
- /package/morph-idm/Workflows/{user → user-login}/src/ScopeFetchedRule.csx +0 -0
- /package/morph-idm/Workflows/{user → user-login}/src/UserValidationRule.csx +0 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
###############################################################################
|
|
2
|
+
# STEP 3: Scope - User 1234 için scope
|
|
3
|
+
###############################################################################
|
|
4
|
+
|
|
5
|
+
### Start Scope
|
|
6
|
+
# @name createScope
|
|
7
|
+
POST {{baseUrl}}/api/{{apiVersion}}/{{domain}}/workflows/scope/instances/start?sync=true
|
|
8
|
+
Accept-Language: tr-TR
|
|
9
|
+
X-Request-Id: {{$guid}}
|
|
10
|
+
X-Device-Id: admin-portal
|
|
11
|
+
X-Token-Id: {{$guid}}
|
|
12
|
+
X-Device-Info: Test Suite/1.0
|
|
13
|
+
X-Forwarded-For: 192.168.1.100
|
|
14
|
+
user_reference: test-admin
|
|
15
|
+
Content-Type: application/json
|
|
16
|
+
|
|
17
|
+
{
|
|
18
|
+
"key": "{{scopeKey}}",
|
|
19
|
+
"tags": ["test", "scope", "multi-consent-test"],
|
|
20
|
+
"attributes": {
|
|
21
|
+
"group": {
|
|
22
|
+
"domain": "morph-idm",
|
|
23
|
+
"workflow": "scope-group",
|
|
24
|
+
"key": "retail-customers"
|
|
25
|
+
},
|
|
26
|
+
"searchKey": "{{userKey}}"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
### Publish Scope (draft -> active)
|
|
31
|
+
# @name publishScope
|
|
32
|
+
PATCH {{baseUrl}}/api/{{apiVersion}}/{{domain}}/workflows/scope/instances/{{scopeKey}}/transitions/publish?sync=true
|
|
33
|
+
Accept-Language: tr-TR
|
|
34
|
+
X-Request-Id: {{$guid}}
|
|
35
|
+
X-Device-Id: admin-portal
|
|
36
|
+
X-Token-Id: {{$guid}}
|
|
37
|
+
X-Device-Info: Test Suite/1.0
|
|
38
|
+
X-Forwarded-For: 192.168.1.100
|
|
39
|
+
user_reference: test-admin
|
|
40
|
+
Content-Type: application/json
|
|
41
|
+
|
|
42
|
+
{
|
|
43
|
+
"attributes": {
|
|
44
|
+
"publishedBy": "test-admin",
|
|
45
|
+
"publishedAt": "{{$datetime iso8601}}"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
### Get Scope Data
|
|
50
|
+
# @name getScopeData
|
|
51
|
+
GET {{baseUrl}}/api/{{apiVersion}}/{{domain}}/workflows/scope/instances/{{scopeKey}}/functions/data
|
|
52
|
+
Accept-Language: tr-TR
|
|
53
|
+
X-Request-Id: {{$guid}}
|
|
54
|
+
X-Device-Id: admin-portal
|
|
55
|
+
X-Token-Id: {{$guid}}
|
|
56
|
+
user_reference: test-admin
|
|
57
|
+
|
|
58
|
+
### Get Scope State
|
|
59
|
+
# @name getScopeState
|
|
60
|
+
GET {{baseUrl}}/api/{{apiVersion}}/{{domain}}/workflows/scope/instances/{{scopeKey}}/functions/state
|
|
61
|
+
Accept-Language: tr-TR
|
|
62
|
+
X-Request-Id: {{$guid}}
|
|
63
|
+
X-Device-Id: admin-portal
|
|
64
|
+
X-Token-Id: {{$guid}}
|
|
65
|
+
user_reference: test-admin
|
|
66
|
+
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
###############################################################################
|
|
2
|
+
# STEP 4a: Consent 1 - User 1234 + Client IbWeb (Internet Banking)
|
|
3
|
+
###############################################################################
|
|
4
|
+
|
|
5
|
+
### Create Consent 1 - IbWeb
|
|
6
|
+
# @name createConsent1
|
|
7
|
+
POST {{baseUrl}}/api/{{apiVersion}}/{{domain}}/workflows/consent/instances/start?sync=true
|
|
8
|
+
Accept-Language: tr-TR
|
|
9
|
+
X-Request-Id: {{$guid}}
|
|
10
|
+
X-Device-Id: admin-portal
|
|
11
|
+
X-Token-Id: {{$guid}}
|
|
12
|
+
X-Device-Info: Test Suite/1.0
|
|
13
|
+
X-Forwarded-For: 192.168.1.100
|
|
14
|
+
user_reference: test-admin
|
|
15
|
+
Content-Type: application/json
|
|
16
|
+
|
|
17
|
+
{
|
|
18
|
+
"key": "{{consentKey1}}",
|
|
19
|
+
"tags": ["test", "consent", "ibweb", "multi-consent-test"],
|
|
20
|
+
"attributes": {
|
|
21
|
+
"user": {
|
|
22
|
+
"domain": "morph-idm",
|
|
23
|
+
"workflow": "user",
|
|
24
|
+
"key": "{{userKey}}",
|
|
25
|
+
"version": "1.0.0"
|
|
26
|
+
},
|
|
27
|
+
"client": {
|
|
28
|
+
"domain": "morph-idm",
|
|
29
|
+
"workflow": "client",
|
|
30
|
+
"key": "IbWeb",
|
|
31
|
+
"version": "1.0.0"
|
|
32
|
+
},
|
|
33
|
+
"scope": {
|
|
34
|
+
"domain": "morph-idm",
|
|
35
|
+
"workflow": "scope",
|
|
36
|
+
"key": "{{scopeKey}}",
|
|
37
|
+
"version": "1.0.0"
|
|
38
|
+
},
|
|
39
|
+
"roles": [
|
|
40
|
+
{
|
|
41
|
+
"role": "idm.full-authorized",
|
|
42
|
+
"allowance": "allow"
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
"grantedAt": "{{$datetime iso8601}}",
|
|
46
|
+
"expiresAt": "2027-01-01T00:00:00Z"
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
### Get Consent 1 Data
|
|
51
|
+
# @name getConsent1Data
|
|
52
|
+
GET {{baseUrl}}/api/{{apiVersion}}/{{domain}}/workflows/consent/instances/{{consentKey1}}/functions/data
|
|
53
|
+
Accept-Language: tr-TR
|
|
54
|
+
X-Request-Id: {{$guid}}
|
|
55
|
+
X-Device-Id: admin-portal
|
|
56
|
+
X-Token-Id: {{$guid}}
|
|
57
|
+
user_reference: test-admin
|
|
58
|
+
|
|
59
|
+
### Get Consent 1 State
|
|
60
|
+
# @name getConsent1State
|
|
61
|
+
GET {{baseUrl}}/api/{{apiVersion}}/{{domain}}/workflows/consent/instances/{{consentKey1}}/functions/state
|
|
62
|
+
Accept-Language: tr-TR
|
|
63
|
+
X-Request-Id: {{$guid}}
|
|
64
|
+
X-Device-Id: admin-portal
|
|
65
|
+
X-Token-Id: {{$guid}}
|
|
66
|
+
user_reference: test-admin
|
|
67
|
+
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
###############################################################################
|
|
2
|
+
# STEP 4b: Consent 2 - User 1234 + Client IbWeb + Corporate Scope
|
|
3
|
+
###############################################################################
|
|
4
|
+
|
|
5
|
+
### Create Consent 2 - Corporate
|
|
6
|
+
# @name createConsent2
|
|
7
|
+
POST {{baseUrl}}/api/{{apiVersion}}/{{domain}}/workflows/consent/instances/start?sync=true
|
|
8
|
+
Accept-Language: tr-TR
|
|
9
|
+
X-Request-Id: {{$guid}}
|
|
10
|
+
X-Device-Id: admin-portal
|
|
11
|
+
X-Token-Id: {{$guid}}
|
|
12
|
+
X-Device-Info: Test Suite/1.0
|
|
13
|
+
X-Forwarded-For: 192.168.1.100
|
|
14
|
+
user_reference: test-admin
|
|
15
|
+
Content-Type: application/json
|
|
16
|
+
|
|
17
|
+
{
|
|
18
|
+
"key": "{{consentKey2}}",
|
|
19
|
+
"tags": ["test", "consent", "corporate", "multi-consent-test"],
|
|
20
|
+
"attributes": {
|
|
21
|
+
"user": {
|
|
22
|
+
"domain": "morph-idm",
|
|
23
|
+
"workflow": "user",
|
|
24
|
+
"key": "{{userKey}}",
|
|
25
|
+
"version": "1.0.0"
|
|
26
|
+
},
|
|
27
|
+
"client": {
|
|
28
|
+
"domain": "morph-idm",
|
|
29
|
+
"workflow": "client",
|
|
30
|
+
"key": "{{clientKey}}",
|
|
31
|
+
"version": "1.0.0"
|
|
32
|
+
},
|
|
33
|
+
"scope": {
|
|
34
|
+
"domain": "morph-idm",
|
|
35
|
+
"workflow": "scope",
|
|
36
|
+
"key": "{{scopeKey2}}",
|
|
37
|
+
"version": "1.0.0"
|
|
38
|
+
},
|
|
39
|
+
"roles": [
|
|
40
|
+
{
|
|
41
|
+
"role": "idm.corporate-authorized",
|
|
42
|
+
"allowance": "allow"
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
"grantedAt": "{{$datetime iso8601}}",
|
|
46
|
+
"expiresAt": "2027-01-01T00:00:00Z"
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
### Get Consent 2 Data
|
|
51
|
+
# @name getConsent2Data
|
|
52
|
+
GET {{baseUrl}}/api/{{apiVersion}}/{{domain}}/workflows/consent/instances/{{consentKey2}}/functions/data
|
|
53
|
+
Accept-Language: tr-TR
|
|
54
|
+
X-Request-Id: {{$guid}}
|
|
55
|
+
X-Device-Id: admin-portal
|
|
56
|
+
X-Token-Id: {{$guid}}
|
|
57
|
+
user_reference: test-admin
|
|
58
|
+
|
|
59
|
+
### Get Consent 2 State
|
|
60
|
+
# @name getConsent2State
|
|
61
|
+
GET {{baseUrl}}/api/{{apiVersion}}/{{domain}}/workflows/consent/instances/{{consentKey2}}/functions/state
|
|
62
|
+
Accept-Language: tr-TR
|
|
63
|
+
X-Request-Id: {{$guid}}
|
|
64
|
+
X-Device-Id: admin-portal
|
|
65
|
+
X-Token-Id: {{$guid}}
|
|
66
|
+
user_reference: test-admin
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
###############################################################################
|
|
2
|
+
# STEP 5: Device for User 1234
|
|
3
|
+
###############################################################################
|
|
4
|
+
|
|
5
|
+
### Create Device - Web Browser
|
|
6
|
+
# @name createDevice
|
|
7
|
+
POST {{baseUrl}}/api/{{apiVersion}}/{{domain}}/workflows/device/instances/start?sync=true
|
|
8
|
+
Accept-Language: tr-TR
|
|
9
|
+
X-Request-Id: {{$guid}}
|
|
10
|
+
X-Device-Id: {{deviceId}}
|
|
11
|
+
X-Token-Id: {{$guid}}
|
|
12
|
+
X-Device-Info: Test Browser/1.0
|
|
13
|
+
X-Forwarded-For: 192.168.1.100
|
|
14
|
+
user_reference: anonymous
|
|
15
|
+
Content-Type: application/json
|
|
16
|
+
|
|
17
|
+
{
|
|
18
|
+
"key": "{{deviceId}}",
|
|
19
|
+
"tags": ["test", "web", "browser", "multi-consent-test"],
|
|
20
|
+
"attributes": {
|
|
21
|
+
"deviceId": "{{deviceId}}",
|
|
22
|
+
"installationId": "{{$guid}}",
|
|
23
|
+
"deviceInfo": {
|
|
24
|
+
"osName": "Windows",
|
|
25
|
+
"osVersion": "11",
|
|
26
|
+
"deviceModel": "Desktop",
|
|
27
|
+
"manufacturer": "Generic",
|
|
28
|
+
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) Chrome/120.0",
|
|
29
|
+
"screenResolution": "1920x1080",
|
|
30
|
+
"language": "tr-TR",
|
|
31
|
+
"timezone": "Europe/Istanbul"
|
|
32
|
+
},
|
|
33
|
+
"deviceCertificatePublicKey": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0Z3VS5JJcds3xfn/ygWy\nR7TZZXe1zE8bF9U3Q2m5yM7qKk0W5X3YZ8vN4V2rK1L8mM3C7H4aP2b6D5F1nE0i\nK9J2Y3L4N5M6O7P8Q9R0S1T2U3V4W5X6Y7Z8A9B0C1D2E3F4G5H6I7J8K9L0M1N2\n-----END PUBLIC KEY-----",
|
|
34
|
+
"appVersion": "3.0.0",
|
|
35
|
+
"pushToken": {
|
|
36
|
+
"platform": "apns",
|
|
37
|
+
"token": "a1b2c3d4e5f6789012345678901234567890abcdef1234567890abcdef123456",
|
|
38
|
+
"environment": "production",
|
|
39
|
+
"bundleId": "com.bank.mobilebanking",
|
|
40
|
+
"updatedAt": "{{$datetime iso8601}}"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
### Assign User to Device (saved -> registered)
|
|
46
|
+
# @name assignUser
|
|
47
|
+
PATCH {{baseUrl}}/api/{{apiVersion}}/{{domain}}/workflows/device/instances/{{deviceId}}/transitions/assign-user?sync=true
|
|
48
|
+
Accept-Language: tr-TR
|
|
49
|
+
X-Request-Id: {{$guid}}
|
|
50
|
+
X-Device-Id: {{deviceId}}
|
|
51
|
+
X-Token-Id: {{$guid}}
|
|
52
|
+
X-Device-Info: Test Browser/1.0
|
|
53
|
+
X-Forwarded-For: 192.168.1.100
|
|
54
|
+
user_reference: {{userKey}}
|
|
55
|
+
Content-Type: application/json
|
|
56
|
+
|
|
57
|
+
{
|
|
58
|
+
"attributes": {
|
|
59
|
+
"user": {
|
|
60
|
+
"domain": "morph-idm",
|
|
61
|
+
"workflow": "user",
|
|
62
|
+
"key": "{{userKey}}",
|
|
63
|
+
"version": "1.0.0"
|
|
64
|
+
},
|
|
65
|
+
"certificates": [],
|
|
66
|
+
"lastSeenAt": "{{$datetime iso8601}}"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
### Get Device Data
|
|
71
|
+
# @name getDeviceData
|
|
72
|
+
GET {{baseUrl}}/api/{{apiVersion}}/{{domain}}/workflows/device/instances/{{deviceId}}/functions/data
|
|
73
|
+
Accept-Language: tr-TR
|
|
74
|
+
X-Request-Id: {{$guid}}
|
|
75
|
+
X-Device-Id: {{deviceId}}
|
|
76
|
+
X-Token-Id: {{$guid}}
|
|
77
|
+
user_reference: {{userKey}}
|
|
78
|
+
|
|
79
|
+
### Get Device State
|
|
80
|
+
# @name getDeviceState
|
|
81
|
+
GET {{baseUrl}}/api/{{apiVersion}}/{{domain}}/workflows/device/instances/{{deviceId}}/functions/state
|
|
82
|
+
Accept-Language: tr-TR
|
|
83
|
+
X-Request-Id: {{$guid}}
|
|
84
|
+
X-Device-Id: {{deviceId}}
|
|
85
|
+
X-Token-Id: {{$guid}}
|
|
86
|
+
user_reference: {{userKey}}
|
|
87
|
+
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
###############################################################################
|
|
2
|
+
# STEP 6: User Login - Multi Consent Test
|
|
3
|
+
###############################################################################
|
|
4
|
+
# Bu test, securityQuestion DOLU olan Person 1234 ile login yapar.
|
|
5
|
+
# 2 consent olduğundan consent-selection state'ine gitmeli
|
|
6
|
+
###############################################################################
|
|
7
|
+
|
|
8
|
+
@loginKey = login-1234-{{$timestamp}}
|
|
9
|
+
|
|
10
|
+
### Start Login
|
|
11
|
+
# @name startLogin
|
|
12
|
+
POST {{baseUrl}}/api/{{apiVersion}}/{{domain}}/workflows/user-login/instances/start?sync=true
|
|
13
|
+
Accept-Language: tr-TR
|
|
14
|
+
X-Request-Id: {{$guid}}
|
|
15
|
+
X-Device-Id: {{deviceId}}
|
|
16
|
+
X-Token-Id: {{$guid}}
|
|
17
|
+
X-Device-Info: Test Browser/1.0
|
|
18
|
+
X-Forwarded-For: 192.168.1.100
|
|
19
|
+
user_reference: {{userKey}}
|
|
20
|
+
Content-Type: application/json
|
|
21
|
+
|
|
22
|
+
{
|
|
23
|
+
"key": "{{loginKey}}",
|
|
24
|
+
"tags": ["test", "login", "multi-consent-test"],
|
|
25
|
+
"attributes": {
|
|
26
|
+
"clientId": "{{clientKey}}",
|
|
27
|
+
"grantType": "authorization_code",
|
|
28
|
+
"scopes": ["{{scopeKey}}"],
|
|
29
|
+
"userName": "{{userKey}}",
|
|
30
|
+
"password": "$argon2id$v=19$m=65536,t=3,p=4$c29tZXNhbHQ$RdescudvJCsgt3ub+b+dWRWJTmaaJObG",
|
|
31
|
+
"deviceId": "{{deviceId}}",
|
|
32
|
+
"loginMethod": "password",
|
|
33
|
+
"ipAddress": "192.168.1.100",
|
|
34
|
+
"userAgent": "Test Browser/1.0",
|
|
35
|
+
"loginTimestamp": "{{$datetime iso8601}}"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
### Get Instance ID
|
|
40
|
+
@instanceId = {{startLogin.response.body.id}}
|
|
41
|
+
|
|
42
|
+
### Get Login State
|
|
43
|
+
# @name getLoginState
|
|
44
|
+
GET {{baseUrl}}/api/{{apiVersion}}/{{domain}}/workflows/user-login/instances/{{instanceId}}/functions/state
|
|
45
|
+
Accept-Language: tr-TR
|
|
46
|
+
X-Request-Id: {{$guid}}
|
|
47
|
+
X-Device-Id: {{deviceId}}
|
|
48
|
+
X-Token-Id: {{$guid}}
|
|
49
|
+
user_reference: {{userKey}}
|
|
50
|
+
|
|
51
|
+
### Get Login Data
|
|
52
|
+
# @name getLoginData
|
|
53
|
+
GET {{baseUrl}}/api/{{apiVersion}}/{{domain}}/workflows/user-login/instances/{{instanceId}}/functions/data
|
|
54
|
+
Accept-Language: tr-TR
|
|
55
|
+
X-Request-Id: {{$guid}}
|
|
56
|
+
X-Device-Id: {{deviceId}}
|
|
57
|
+
X-Token-Id: {{$guid}}
|
|
58
|
+
user_reference: {{userKey}}
|
|
59
|
+
|
|
60
|
+
###############################################################################
|
|
61
|
+
# OTP Flow (if device not registered)
|
|
62
|
+
###############################################################################
|
|
63
|
+
|
|
64
|
+
### Verify OTP
|
|
65
|
+
# @name verifyOtp
|
|
66
|
+
PATCH {{baseUrl}}/api/{{apiVersion}}/{{domain}}/workflows/user-login/instances/{{instanceId}}/transitions/verify-otp?sync=true
|
|
67
|
+
Accept-Language: tr-TR
|
|
68
|
+
X-Request-Id: {{$guid}}
|
|
69
|
+
X-Device-Id: {{deviceId}}
|
|
70
|
+
X-Token-Id: {{$guid}}
|
|
71
|
+
X-Device-Info: Test Browser/1.0
|
|
72
|
+
X-Forwarded-For: 192.168.1.100
|
|
73
|
+
user_reference: {{userKey}}
|
|
74
|
+
Content-Type: application/json
|
|
75
|
+
|
|
76
|
+
{
|
|
77
|
+
"attributes": {
|
|
78
|
+
"otpReference": 745952
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
### Approve Push
|
|
83
|
+
# @name approvePush
|
|
84
|
+
PATCH {{baseUrl}}/api/{{apiVersion}}/{{domain}}/workflows/user-login/instances/{{instanceId}}/transitions/approve-push?sync=true
|
|
85
|
+
Accept-Language: tr-TR
|
|
86
|
+
X-Request-Id: {{$guid}}
|
|
87
|
+
X-Device-Id: {{deviceId}}
|
|
88
|
+
X-Token-Id: {{$guid}}
|
|
89
|
+
user_reference: {{userKey}}
|
|
90
|
+
Content-Type: application/json
|
|
91
|
+
|
|
92
|
+
{
|
|
93
|
+
"attributes": {
|
|
94
|
+
"pushReference": "test-reference"
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
### Redeem authorization code
|
|
100
|
+
# @name redeemAuthorizationCode
|
|
101
|
+
PATCH {{baseUrl}}/api/{{apiVersion}}/{{domain}}/workflows/user-login/instances/{{instanceId}}/transitions/redeem?sync=true
|
|
102
|
+
Accept-Language: tr-TR
|
|
103
|
+
X-Request-Id: {{$guid}}
|
|
104
|
+
X-Device-Id: {{deviceId}}
|
|
105
|
+
X-Token-Id: {{$guid}}
|
|
106
|
+
X-Device-Info: Admin Portal/1.0
|
|
107
|
+
X-Forwarded-For: 192.168.1.100
|
|
108
|
+
user_reference: {{userKey}}
|
|
109
|
+
Content-Type: application/json
|
|
110
|
+
|
|
111
|
+
{
|
|
112
|
+
"attributes": {
|
|
113
|
+
"authorizationCode": "123"
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
###############################################################################
|
|
118
|
+
# Consent Selection Flow - 2 consent olduğundan bu state'e gelmeli
|
|
119
|
+
###############################################################################
|
|
120
|
+
|
|
121
|
+
### Get State Before Consent Selection - Beklenen: consent-selection
|
|
122
|
+
# @name getStateBeforeConsent
|
|
123
|
+
GET {{baseUrl}}/api/{{apiVersion}}/{{domain}}/workflows/user-login/instances/{{instanceId}}/functions/state
|
|
124
|
+
Accept-Language: tr-TR
|
|
125
|
+
X-Request-Id: {{$guid}}
|
|
126
|
+
X-Device-Id: {{deviceId}}
|
|
127
|
+
X-Token-Id: {{$guid}}
|
|
128
|
+
user_reference: {{userKey}}
|
|
129
|
+
|
|
130
|
+
### Select Consent 1 (IbWeb)
|
|
131
|
+
# @name selectConsent1
|
|
132
|
+
PATCH {{baseUrl}}/api/{{apiVersion}}/{{domain}}/workflows/user-login/instances/{{instanceId}}/transitions/select-consent?sync=true
|
|
133
|
+
Accept-Language: tr-TR
|
|
134
|
+
X-Request-Id: {{$guid}}
|
|
135
|
+
X-Device-Id: {{deviceId}}
|
|
136
|
+
X-Token-Id: {{$guid}}
|
|
137
|
+
X-Device-Info: Test Browser/1.0
|
|
138
|
+
X-Forwarded-For: 192.168.1.100
|
|
139
|
+
user_reference: {{userKey}}
|
|
140
|
+
Content-Type: application/json
|
|
141
|
+
|
|
142
|
+
{
|
|
143
|
+
"attributes": {
|
|
144
|
+
"selectedConsentKey": "{{consentKey1}}"
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
### Select Consent 2 (MbApp) - Alternatif olarak
|
|
149
|
+
# @name selectConsent2
|
|
150
|
+
PATCH {{baseUrl}}/api/{{apiVersion}}/{{domain}}/workflows/user-login/instances/{{instanceId}}/transitions/select-consent?sync=true
|
|
151
|
+
Accept-Language: tr-TR
|
|
152
|
+
X-Request-Id: {{$guid}}
|
|
153
|
+
X-Device-Id: {{deviceId}}
|
|
154
|
+
X-Token-Id: {{$guid}}
|
|
155
|
+
X-Device-Info: Test Browser/1.0
|
|
156
|
+
X-Forwarded-For: 192.168.1.100
|
|
157
|
+
user_reference: {{userKey}}
|
|
158
|
+
Content-Type: application/json
|
|
159
|
+
|
|
160
|
+
{
|
|
161
|
+
"attributes": {
|
|
162
|
+
"selectedConsentKey": "{{consentKey2}}"
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
### Get Final State
|
|
167
|
+
# @name getFinalState
|
|
168
|
+
GET {{baseUrl}}/api/{{apiVersion}}/{{domain}}/workflows/user-login/instances/{{instanceId}}/functions/state
|
|
169
|
+
Accept-Language: tr-TR
|
|
170
|
+
X-Request-Id: {{$guid}}
|
|
171
|
+
X-Device-Id: {{deviceId}}
|
|
172
|
+
X-Token-Id: {{$guid}}
|
|
173
|
+
user_reference: {{userKey}}
|
|
174
|
+
|
|
175
|
+
### Get Final Data
|
|
176
|
+
# @name getFinalData
|
|
177
|
+
GET {{baseUrl}}/api/{{apiVersion}}/{{domain}}/workflows/user-login/instances/{{instanceId}}/functions/data
|
|
178
|
+
Accept-Language: tr-TR
|
|
179
|
+
X-Request-Id: {{$guid}}
|
|
180
|
+
X-Device-Id: {{deviceId}}
|
|
181
|
+
X-Token-Id: {{$guid}}
|
|
182
|
+
user_reference: {{userKey}}
|
|
183
|
+
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Test 1234 - Multi Consent Test
|
|
2
|
+
|
|
3
|
+
## Senaryo
|
|
4
|
+
- **Person 1234**: securityQuestion DOLU (array formatında)
|
|
5
|
+
- **User 1234**: Person 1234'e bağlı
|
|
6
|
+
- **Scope**: 1234-1234
|
|
7
|
+
- **Consent 1**: IbWeb client için
|
|
8
|
+
- **Consent 2**: MbApp client için
|
|
9
|
+
- **Device**: test-device-1234
|
|
10
|
+
|
|
11
|
+
## Beklenen Davranış
|
|
12
|
+
1. Login başlatıldığında securityQuestion zaten dolu olduğundan security-question-change state'ine **GİTMEMELİ**
|
|
13
|
+
2. 2 consent olduğundan `consent-selection` state'ine gitmeli
|
|
14
|
+
3. Kullanıcı consent seçimi yapmalı
|
|
15
|
+
|
|
16
|
+
## Kullanım
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# Setup (tüm instance'ları oluşturur)
|
|
20
|
+
./run-setup.sh
|
|
21
|
+
|
|
22
|
+
# Cleanup (veritabanından siler)
|
|
23
|
+
node cleanup.js
|
|
24
|
+
|
|
25
|
+
# Login testi (manuel)
|
|
26
|
+
# 06-user-login.http'den startLogin çalıştır
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Dosyalar
|
|
30
|
+
- `01-person.http` - Person 1234 (securityQuestion dolu)
|
|
31
|
+
- `02-user.http` - User 1234
|
|
32
|
+
- `03-scope.http` - Scope 1234-1234
|
|
33
|
+
- `04-consent-1.http` - Consent IbWeb
|
|
34
|
+
- `04-consent-2.http` - Consent MbApp
|
|
35
|
+
- `05-device.http` - Device
|
|
36
|
+
- `06-user-login.http` - Login test
|
|
37
|
+
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
const { Client } = require('pg');
|
|
2
|
+
|
|
3
|
+
const config = {
|
|
4
|
+
user: process.env.DB_USER || 'postgres',
|
|
5
|
+
host: process.env.DB_HOST || 'localhost',
|
|
6
|
+
database: process.env.DB_NAME || 'Aether_WorkflowDb',
|
|
7
|
+
password: process.env.DB_PASSWORD || 'postgres',
|
|
8
|
+
port: process.env.DB_PORT || 5432,
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const queries = [
|
|
12
|
+
{ name: 'person', sql: `DELETE FROM person."Instances" WHERE "Key" = '1234'` },
|
|
13
|
+
{ name: 'user', sql: `DELETE FROM "user"."Instances" WHERE "Key" = '1234'` },
|
|
14
|
+
{ name: 'scope', sql: `DELETE FROM scope."Instances" WHERE "Key" LIKE '1234-%'` },
|
|
15
|
+
{ name: 'consent', sql: `DELETE FROM consent."Instances" WHERE "Key" LIKE '1234-%'` },
|
|
16
|
+
{ name: 'device', sql: `DELETE FROM device."Instances" WHERE "Key" = 'test-device-1234'` },
|
|
17
|
+
];
|
|
18
|
+
|
|
19
|
+
async function cleanup() {
|
|
20
|
+
const client = new Client(config);
|
|
21
|
+
|
|
22
|
+
try {
|
|
23
|
+
await client.connect();
|
|
24
|
+
console.log('Connected to database');
|
|
25
|
+
|
|
26
|
+
let totalDeleted = 0;
|
|
27
|
+
for (const query of queries) {
|
|
28
|
+
const result = await client.query(query.sql);
|
|
29
|
+
if (result.rowCount > 0) {
|
|
30
|
+
console.log(`${query.name}: ${result.rowCount} deleted`);
|
|
31
|
+
totalDeleted += result.rowCount;
|
|
32
|
+
} else {
|
|
33
|
+
console.log(`${query.name}: nothing to delete`);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
console.log(`\nTotal: ${totalDeleted} rows deleted`);
|
|
37
|
+
|
|
38
|
+
} catch (err) {
|
|
39
|
+
console.error('Database cleanup failed:', err.message);
|
|
40
|
+
process.exit(1);
|
|
41
|
+
} finally {
|
|
42
|
+
await client.end();
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
cleanup();
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Test 123 - Database Cleanup (Node.js version)
|
|
3
|
+
|
|
4
|
+
cd "$(dirname "$0")"
|
|
5
|
+
|
|
6
|
+
# Database settings (edit here or use environment variables)
|
|
7
|
+
export DB_HOST="${DB_HOST:-localhost}"
|
|
8
|
+
export DB_PORT="${DB_PORT:-5432}"
|
|
9
|
+
export DB_NAME="${DB_NAME:-Aether_WorkflowDb}"
|
|
10
|
+
export DB_USER="${DB_USER:-postgres}"
|
|
11
|
+
export DB_PASSWORD="${DB_PASSWORD:-postgres}"
|
|
12
|
+
|
|
13
|
+
# Check if pg is installed
|
|
14
|
+
if ! node -e "require('pg')" 2>/dev/null; then
|
|
15
|
+
echo "Installing pg package..."
|
|
16
|
+
npm install pg --no-save --silent
|
|
17
|
+
fi
|
|
18
|
+
|
|
19
|
+
# Run cleanup
|
|
20
|
+
node cleanup.js
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Test 1234 - Run setup requests
|
|
3
|
+
|
|
4
|
+
cd "$(dirname "$0")"
|
|
5
|
+
|
|
6
|
+
run_request() {
|
|
7
|
+
local file=$1
|
|
8
|
+
local name=$2
|
|
9
|
+
|
|
10
|
+
echo -n "$file ($name): "
|
|
11
|
+
|
|
12
|
+
output=$(npx httpyac "$file" -n "$name" -e dev -o short 2>&1)
|
|
13
|
+
exit_code=$?
|
|
14
|
+
|
|
15
|
+
if [ $exit_code -ne 0 ]; then
|
|
16
|
+
echo "FAILED"
|
|
17
|
+
echo "$output"
|
|
18
|
+
exit 1
|
|
19
|
+
fi
|
|
20
|
+
|
|
21
|
+
if echo "$output" | grep -qE "HTTP/[0-9.]+ [45][0-9]{2}"; then
|
|
22
|
+
echo "HTTP ERROR"
|
|
23
|
+
echo "$output"
|
|
24
|
+
exit 1
|
|
25
|
+
fi
|
|
26
|
+
|
|
27
|
+
echo "OK"
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
echo "Running Test 1234 Setup..."
|
|
31
|
+
echo ""
|
|
32
|
+
|
|
33
|
+
# Create instances
|
|
34
|
+
run_request "01-person.http" "startPerson"
|
|
35
|
+
run_request "02-user.http" "createUser"
|
|
36
|
+
run_request "03-scope.http" "createScope"
|
|
37
|
+
run_request "03-scope-2.http" "createScope2"
|
|
38
|
+
run_request "04-consent-1.http" "createConsent1"
|
|
39
|
+
run_request "04-consent-2.http" "createConsent2"
|
|
40
|
+
run_request "05-device.http" "createDevice"
|
|
41
|
+
|
|
42
|
+
echo ""
|
|
43
|
+
echo "Publishing..."
|
|
44
|
+
echo ""
|
|
45
|
+
|
|
46
|
+
# Publish instances
|
|
47
|
+
run_request "01-person.http" "publishPerson"
|
|
48
|
+
run_request "02-user.http" "publishUser"
|
|
49
|
+
run_request "03-scope.http" "publishScope"
|
|
50
|
+
run_request "03-scope-2.http" "publishScope2"
|
|
51
|
+
|
|
52
|
+
echo ""
|
|
53
|
+
echo "Setup complete. Run 06-user-login.http manually."
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"key": "user-login-push-waiting",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"domain": "morph-idm",
|
|
5
|
+
"flow": "sys-views",
|
|
6
|
+
"flowVersion": "1.0.0",
|
|
7
|
+
"tags": [
|
|
8
|
+
"user-login",
|
|
9
|
+
"authentication",
|
|
10
|
+
"push-notification",
|
|
11
|
+
"waiting"
|
|
12
|
+
],
|
|
13
|
+
"attributes": {
|
|
14
|
+
"type": 1,
|
|
15
|
+
"labels": [
|
|
16
|
+
{
|
|
17
|
+
"language": "en-US",
|
|
18
|
+
"label": "Waiting for Confirmation"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"language": "tr-TR",
|
|
22
|
+
"label": "Onay Bekleniyor"
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"display": "full-page",
|
|
26
|
+
"content": "{}"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"key": "user-login-start",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"domain": "morph-idm",
|
|
5
|
+
"flow": "sys-views",
|
|
6
|
+
"flowVersion": "1.0.0",
|
|
7
|
+
"tags": [
|
|
8
|
+
"user-login",
|
|
9
|
+
"authentication",
|
|
10
|
+
"login-form",
|
|
11
|
+
"start-page"
|
|
12
|
+
],
|
|
13
|
+
"attributes": {
|
|
14
|
+
"type": 1,
|
|
15
|
+
"labels": [
|
|
16
|
+
{
|
|
17
|
+
"language": "en-US",
|
|
18
|
+
"label": "Login"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"language": "tr-TR",
|
|
22
|
+
"label": "Giriş Yap"
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"display": "full-page",
|
|
26
|
+
"content": "{}"
|
|
27
|
+
}
|
|
28
|
+
}
|