From 2692beb4809f663b0e440021b17cd2173d70a792 Mon Sep 17 00:00:00 2001 From: gasmyr Date: Tue, 16 Jul 2024 15:43:17 +0100 Subject: [PATCH 01/32] feat: update project.json From 58fcadf0dc4ad554a86967bd94cb20f1a8839cd0 Mon Sep 17 00:00:00 2001 From: gasmyr Date: Tue, 16 Jul 2024 15:43:19 +0100 Subject: [PATCH 02/32] feat: update org.gluu.agama.totp.main.json --- code/org.gluu.agama.totp.main.json | 70 +++++++++++++++--------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/code/org.gluu.agama.totp.main.json b/code/org.gluu.agama.totp.main.json index 5446b8d..20bb38b 100644 --- a/code/org.gluu.agama.totp.main.json +++ b/code/org.gluu.agama.totp.main.json @@ -302,12 +302,12 @@ } }, { - "width": 210, - "height": 140, + "width": 110, + "height": 60, "id": "Agama-when-Node-c30bebbf-7ce3-4fa3-9743-cf10643dd99c", "position": { - "x": 3254.9147594545157, - "y": 162.0318866153716 + "x": 570.3814261211837, + "y": 15.365219948704919 }, "parentId": "Agama-when-Node-1f6a89df-661b-4baa-9419-78e755ba4b12", "type": "when", @@ -318,8 +318,8 @@ "whenCondition": "WhenFalse", "inRepeatBlock": "", "position": { - "x": 3254.9147594545157, - "y": 162.0318866153716 + "x": 570.3814261211837, + "y": 15.365219948704919 }, "agamaData": { "id": "Agama-when-Node-c30bebbf-7ce3-4fa3-9743-cf10643dd99c", @@ -347,10 +347,10 @@ ], "skake": false }, - "selected": false, + "selected": true, "positionAbsolute": { - "x": 3254.9147594545157, - "y": 162.0318866153716 + "x": 3256.033817132333, + "y": 178.36492622773886 }, "dragging": false }, @@ -790,7 +790,7 @@ }, "skake": false }, - "selected": true, + "selected": false, "positionAbsolute": { "x": 1616, "y": 127 @@ -864,12 +864,12 @@ "dragging": false }, { - "width": 210, - "height": 140, + "width": 110, + "height": 60, "id": "Agama-when-Node-4fa47f26-e1e3-4d4f-b40d-31de2ff74da4", "position": { - "x": 2087.3190576778156, - "y": 174.65209729018272 + "x": 307.3190576778161, + "y": 49.31876395684941 }, "parentId": "Agama-assignment-Node-8fd47c3f-713f-44bd-a54e-23a8c291d312", "type": "when", @@ -880,8 +880,8 @@ "whenCondition": "", "inRepeatBlock": "", "position": { - "x": 2087.3190576778156, - "y": 174.65209729018272 + "x": 307.3190576778161, + "y": 49.31876395684941 }, "agamaData": { "id": "Agama-when-Node-4fa47f26-e1e3-4d4f-b40d-31de2ff74da4", @@ -915,19 +915,19 @@ "selected": false, "dragging": false, "positionAbsolute": { - "x": 2087.3190576778156, - "y": 174.65209729018272 + "x": 2144.319057677816, + "y": 175.3187639568494 }, "whenCondition": "", "inRepeatBlock": "" }, { - "width": 210, - "height": 140, + "width": 110, + "height": 60, "id": "Agama-when-Node-1f6a89df-661b-4baa-9419-78e755ba4b12", "position": { - "x": 2716, - "y": 163.6809423221846 + "x": 541.333333333333, + "y": -12.319057677815465 }, "parentId": "Agama-when-Node-4fa47f26-e1e3-4d4f-b40d-31de2ff74da4", "type": "when", @@ -938,8 +938,8 @@ "whenCondition": "WhenFalse", "inRepeatBlock": "", "position": { - "x": 2716, - "y": 163.6809423221846 + "x": 541.333333333333, + "y": -12.319057677815465 }, "agamaData": { "id": "Agama-when-Node-1f6a89df-661b-4baa-9419-78e755ba4b12", @@ -972,8 +972,8 @@ }, "selected": false, "positionAbsolute": { - "x": 2716, - "y": 163.6809423221846 + "x": 2685.652391011149, + "y": 162.99970627903394 }, "dragging": false }, @@ -1028,8 +1028,8 @@ "height": 124, "id": "Agama-call-Node-c9f0bffa-db46-4080-8661-c51de76a3ef5", "position": { - "x": 1378, - "y": 123 + "x": 245.99999999999977, + "y": 4.333333333333314 }, "type": "call", "data": { @@ -1039,8 +1039,8 @@ "whenCondition": "", "inRepeatBlock": "", "position": { - "x": 1378, - "y": 123 + "x": 245.99999999999977, + "y": 4.333333333333314 }, "agamaData": { "id": "Agama-call-Node-c9f0bffa-db46-4080-8661-c51de76a3ef5", @@ -1067,8 +1067,8 @@ }, "selected": false, "positionAbsolute": { - "x": 1378, - "y": 123 + "x": 1389.1141316191486, + "y": 127.8061593056737 }, "dragging": false, "parentId": "Agama-call-Node-33690a15-4f77-4bb6-b3d3-6331b80904db", @@ -1391,8 +1391,8 @@ } ], "viewport": { - "x": -826, - "y": 57, - "zoom": 1 + "x": -1606.6000000000004, + "y": 98, + "zoom": 0.75 } } \ No newline at end of file From e3984fb835185225edfc6b9825357abbba80c20f Mon Sep 17 00:00:00 2001 From: gasmyr Date: Tue, 16 Jul 2024 15:43:21 +0100 Subject: [PATCH 03/32] feat: update org.gluu.agama.totp.main.flow --- code/org.gluu.agama.totp.main.flow | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/org.gluu.agama.totp.main.flow b/code/org.gluu.agama.totp.main.flow index 1b77b52..f1fc4e7 100644 --- a/code/org.gluu.agama.totp.main.flow +++ b/code/org.gluu.agama.totp.main.flow @@ -36,8 +36,8 @@ When userTOTPSecretKey is not null Log "@debug checkOTPValid check otp " checkOTPValid E When checkOTPValid.success is true // finish with success userId - it_vqgza = {success:true, data: { userId: userId }} - Finish it_vqgza + it_gatbe = {success:true, data: { userId: userId }} + Finish it_gatbe // Login Failed -it_uvtzs = {success:false, error: "login failed"} -Finish it_uvtzs \ No newline at end of file +it_eodba = {success:false, error: "login failed"} +Finish it_eodba \ No newline at end of file From bff14b595658a8d4d8b79692f0a106f053871fa4 Mon Sep 17 00:00:00 2001 From: gasmyr Date: Tue, 16 Jul 2024 15:43:50 +0100 Subject: [PATCH 04/32] feat: update project.json From e817de639ff096d8e07cfc3d4eb96528984e977a Mon Sep 17 00:00:00 2001 From: gasmyr Date: Tue, 16 Jul 2024 15:43:53 +0100 Subject: [PATCH 05/32] feat: update org.gluu.agama.totp.main.json --- code/org.gluu.agama.totp.main.json | 44 +++++++++++++++--------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/code/org.gluu.agama.totp.main.json b/code/org.gluu.agama.totp.main.json index 20bb38b..739a8f3 100644 --- a/code/org.gluu.agama.totp.main.json +++ b/code/org.gluu.agama.totp.main.json @@ -213,8 +213,8 @@ "height": 124, "id": "finish-f6988b05-6a38-40d3-8ef2-b3512d4b681a", "position": { - "x": 3587, - "y": 145 + "x": 3088.3333333333335, + "y": 130.33333333333331 }, "type": "finish", "data": { @@ -228,8 +228,8 @@ "Agama-when-Node-c30bebbf-7ce3-4fa3-9743-cf10643dd99c.SUCCESS" ], "position": { - "x": 3587, - "y": 145 + "x": 3088.3333333333335, + "y": 130.33333333333331 }, "agamaData": { "id": "finish-f6988b05-6a38-40d3-8ef2-b3512d4b681a", @@ -248,10 +248,10 @@ }, "skake": false }, - "selected": false, + "selected": true, "positionAbsolute": { - "x": 3587, - "y": 145 + "x": 3088.3333333333335, + "y": 130.33333333333331 }, "dragging": false }, @@ -306,8 +306,8 @@ "height": 60, "id": "Agama-when-Node-c30bebbf-7ce3-4fa3-9743-cf10643dd99c", "position": { - "x": 570.3814261211837, - "y": 15.365219948704919 + "x": 305.0480927878507, + "y": 0.6985532820382332 }, "parentId": "Agama-when-Node-1f6a89df-661b-4baa-9419-78e755ba4b12", "type": "when", @@ -318,8 +318,8 @@ "whenCondition": "WhenFalse", "inRepeatBlock": "", "position": { - "x": 570.3814261211837, - "y": 15.365219948704919 + "x": 305.0480927878507, + "y": 0.6985532820382332 }, "agamaData": { "id": "Agama-when-Node-c30bebbf-7ce3-4fa3-9743-cf10643dd99c", @@ -347,10 +347,10 @@ ], "skake": false }, - "selected": true, + "selected": false, "positionAbsolute": { - "x": 3256.033817132333, - "y": 178.36492622773886 + "x": 2816.0338171323333, + "y": 185.0315928944055 }, "dragging": false }, @@ -926,8 +926,8 @@ "height": 60, "id": "Agama-when-Node-1f6a89df-661b-4baa-9419-78e755ba4b12", "position": { - "x": 541.333333333333, - "y": -12.319057677815465 + "x": 366.6666666666665, + "y": 9.01427565551785 }, "parentId": "Agama-when-Node-4fa47f26-e1e3-4d4f-b40d-31de2ff74da4", "type": "when", @@ -938,8 +938,8 @@ "whenCondition": "WhenFalse", "inRepeatBlock": "", "position": { - "x": 541.333333333333, - "y": -12.319057677815465 + "x": 366.6666666666665, + "y": 9.01427565551785 }, "agamaData": { "id": "Agama-when-Node-1f6a89df-661b-4baa-9419-78e755ba4b12", @@ -972,8 +972,8 @@ }, "selected": false, "positionAbsolute": { - "x": 2685.652391011149, - "y": 162.99970627903394 + "x": 2510.9857243444826, + "y": 184.33303961236726 }, "dragging": false }, @@ -1391,8 +1391,8 @@ } ], "viewport": { - "x": -1606.6000000000004, - "y": 98, + "x": -921.6000000000004, + "y": 94, "zoom": 0.75 } } \ No newline at end of file From 10c8d10e6f599ca164b13e5000453f3b72006c43 Mon Sep 17 00:00:00 2001 From: gasmyr Date: Tue, 16 Jul 2024 15:43:54 +0100 Subject: [PATCH 06/32] feat: update org.gluu.agama.totp.main.flow --- code/org.gluu.agama.totp.main.flow | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/org.gluu.agama.totp.main.flow b/code/org.gluu.agama.totp.main.flow index f1fc4e7..5223370 100644 --- a/code/org.gluu.agama.totp.main.flow +++ b/code/org.gluu.agama.totp.main.flow @@ -36,8 +36,8 @@ When userTOTPSecretKey is not null Log "@debug checkOTPValid check otp " checkOTPValid E When checkOTPValid.success is true // finish with success userId - it_gatbe = {success:true, data: { userId: userId }} - Finish it_gatbe + it_gvqly = {success:true, data: { userId: userId }} + Finish it_gvqly // Login Failed -it_eodba = {success:false, error: "login failed"} -Finish it_eodba \ No newline at end of file +it_imyht = {success:false, error: "login failed"} +Finish it_imyht \ No newline at end of file From 976b42aff3218b2ce0f533b68257079263022161 Mon Sep 17 00:00:00 2001 From: gasmyr Date: Tue, 16 Jul 2024 15:47:31 +0100 Subject: [PATCH 07/32] Fix corrupted org.gluu.agama.totp.enroll.json Signed-off-by: gasmyr --- code/org.gluu.agama.totp.enroll.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code/org.gluu.agama.totp.enroll.json b/code/org.gluu.agama.totp.enroll.json index 8b0ec01..58b53ea 100644 --- a/code/org.gluu.agama.totp.enroll.json +++ b/code/org.gluu.agama.totp.enroll.json @@ -577,7 +577,6 @@ "x": 920, "y": 66 }, - "parentId": "Agama-log-Node-b48c06a3-3a45-40bd-be8b-30b97c33f7e2", "whenCondition": "", "inRepeatBlock": "" }, @@ -1099,4 +1098,4 @@ "y": 111, "zoom": 1 } -} \ No newline at end of file +} From 533059d93151797fd8c33388d777709a5a319209 Mon Sep 17 00:00:00 2001 From: gasmyr Date: Tue, 16 Jul 2024 15:49:14 +0100 Subject: [PATCH 08/32] feat: update project.json From 298a04f104c5e0d60413a4caf95cc0146174c1ed Mon Sep 17 00:00:00 2001 From: gasmyr Date: Tue, 16 Jul 2024 15:49:16 +0100 Subject: [PATCH 09/32] feat: update org.gluu.agama.totp.enroll.json --- code/org.gluu.agama.totp.enroll.json | 98 ++++++++++++++-------------- 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/code/org.gluu.agama.totp.enroll.json b/code/org.gluu.agama.totp.enroll.json index 58b53ea..cda6995 100644 --- a/code/org.gluu.agama.totp.enroll.json +++ b/code/org.gluu.agama.totp.enroll.json @@ -173,8 +173,8 @@ "height": 124, "id": "Agama-log-Node-441636e3-14cb-468e-bae0-0572444eb30c", "position": { - "x": 1750, - "y": 76 + "x": 1772.666666666667, + "y": 62.666666666666686 }, "type": "log", "data": { @@ -184,8 +184,8 @@ "whenCondition": "", "inRepeatBlock": "", "position": { - "x": 1750, - "y": 76 + "x": 1772.666666666667, + "y": 62.666666666666686 }, "agamaData": { "id": "Agama-log-Node-441636e3-14cb-468e-bae0-0572444eb30c", @@ -205,8 +205,8 @@ "selected": false, "dragging": false, "positionAbsolute": { - "x": 1750, - "y": 76 + "x": 1772.666666666667, + "y": 62.666666666666686 } }, { @@ -388,8 +388,8 @@ "height": 124, "id": "Agama-rrf-Node-2fb5c7e5-ecbf-4c82-8e15-822c5105d11a", "position": { - "x": 1528, - "y": 67 + "x": 248, + "y": 1.6666666666666288 }, "type": "rrf", "data": { @@ -399,8 +399,8 @@ "whenCondition": "", "inRepeatBlock": "", "position": { - "x": 1528, - "y": 67 + "x": 248, + "y": 1.6666666666666288 }, "agamaData": { "id": "Agama-rrf-Node-2fb5c7e5-ecbf-4c82-8e15-822c5105d11a", @@ -427,8 +427,8 @@ "selected": false, "dragging": false, "positionAbsolute": { - "x": 1528, - "y": 67 + "x": 1561, + "y": 73.66666666666663 }, "parentId": "Agama-assignment-Node-04f8c5b3-dd9c-4b9c-b0e2-972fa22afb74", "whenCondition": "", @@ -439,8 +439,8 @@ "height": 124, "id": "Agama-call-Node-267dcb6f-5223-46ae-8c3a-6b55e683a82e", "position": { - "x": 1986, - "y": 73 + "x": 2003.3333333333335, + "y": 67.66666666666669 }, "type": "call", "data": { @@ -450,8 +450,8 @@ "whenCondition": "", "inRepeatBlock": "", "position": { - "x": 1986, - "y": 73 + "x": 2003.3333333333335, + "y": 67.66666666666669 }, "agamaData": { "id": "Agama-call-Node-267dcb6f-5223-46ae-8c3a-6b55e683a82e", @@ -479,8 +479,8 @@ }, "selected": false, "positionAbsolute": { - "x": 1986, - "y": 73 + "x": 2003.3333333333335, + "y": 67.66666666666669 }, "dragging": false }, @@ -489,8 +489,8 @@ "height": 124, "id": "Agama-log-Node-7b87d29e-978e-4ee5-8ca5-a57f34f09340", "position": { - "x": 2206, - "y": 68 + "x": 2210, + "y": 82.66666666666669 }, "type": "log", "data": { @@ -500,8 +500,8 @@ "whenCondition": "", "inRepeatBlock": "", "position": { - "x": 2206, - "y": 68 + "x": 2210, + "y": 82.66666666666669 }, "agamaData": { "id": "Agama-log-Node-7b87d29e-978e-4ee5-8ca5-a57f34f09340", @@ -521,8 +521,8 @@ "selected": false, "dragging": false, "positionAbsolute": { - "x": 2206, - "y": 68 + "x": 2210, + "y": 82.66666666666669 } }, { @@ -581,12 +581,12 @@ "inRepeatBlock": "" }, { - "width": 210, - "height": 140, + "width": 110, + "height": 60, "id": "Agama-when-Node-075b4409-18d1-47bd-85fe-24b4aefbcc20", "position": { - "x": 2475, - "y": 107 + "x": 181.66666666666652, + "y": 29.666666666666686 }, "parentId": "Agama-log-Node-7b87d29e-978e-4ee5-8ca5-a57f34f09340", "type": "when", @@ -597,8 +597,8 @@ "whenCondition": "WhenFalse", "inRepeatBlock": "", "position": { - "x": 2475, - "y": 107 + "x": 181.66666666666652, + "y": 29.666666666666686 }, "agamaData": { "id": "Agama-when-Node-075b4409-18d1-47bd-85fe-24b4aefbcc20", @@ -627,10 +627,10 @@ ], "skake": false }, - "selected": false, + "selected": true, "positionAbsolute": { - "x": 2475, - "y": 107 + "x": 2391.6666666666665, + "y": 112.33333333333337 }, "dragging": false }, @@ -639,8 +639,8 @@ "height": 124, "id": "finish-c68f8f3f-884c-457d-a755-90d87687ab0f", "position": { - "x": 3040.8077193866725, - "y": 54.94464158163652 + "x": 256.80771938667203, + "y": -195.7220250850301 }, "type": "finish", "data": { @@ -651,8 +651,8 @@ "inRepeatBlock": "", "handles": [], "position": { - "x": 3040.8077193866725, - "y": 54.94464158163652 + "x": 256.80771938667203, + "y": -195.7220250850301 }, "agamaData": { "id": "finish-c68f8f3f-884c-457d-a755-90d87687ab0f", @@ -675,8 +675,8 @@ "selected": false, "dragging": false, "positionAbsolute": { - "x": 3040.8077193866725, - "y": 54.94464158163652 + "x": 2648.4743860533385, + "y": -83.38869175169674 }, "parentId": "Agama-when-Node-075b4409-18d1-47bd-85fe-24b4aefbcc20", "whenCondition": "", @@ -733,8 +733,8 @@ "height": 124, "id": "Agama-call-Node-4fc43ccf-0635-4caa-b29f-d19bb783b4a8", "position": { - "x": 722, - "y": 77 + "x": 203.33333333333348, + "y": -8.333333333333371 }, "type": "call", "data": { @@ -744,8 +744,8 @@ "whenCondition": "", "inRepeatBlock": "", "position": { - "x": 722, - "y": 77 + "x": 203.33333333333348, + "y": -8.333333333333371 }, "agamaData": { "id": "Agama-call-Node-4fc43ccf-0635-4caa-b29f-d19bb783b4a8", @@ -780,8 +780,8 @@ "selected": false, "dragging": false, "positionAbsolute": { - "x": 722, - "y": 77 + "x": 704.3333333333335, + "y": 61.66666666666663 }, "parentId": "Agama-call-Node-a9159d77-245e-4962-8d19-9f3a7d8a612a", "whenCondition": "", @@ -1094,8 +1094,8 @@ } ], "viewport": { - "x": -204, - "y": 111, - "zoom": 1 + "x": -216.75, + "y": 289.09717293792414, + "zoom": 0.5 } -} +} \ No newline at end of file From 0d6c3507d3289854daf417148f0766ad8cbc28ab Mon Sep 17 00:00:00 2001 From: gasmyr Date: Tue, 16 Jul 2024 15:49:18 +0100 Subject: [PATCH 10/32] feat: update org.gluu.agama.totp.enroll.flow --- code/org.gluu.agama.totp.enroll.flow | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/org.gluu.agama.totp.enroll.flow b/code/org.gluu.agama.totp.enroll.flow index 70d33cb..fae74ea 100644 --- a/code/org.gluu.agama.totp.enroll.flow +++ b/code/org.gluu.agama.totp.enroll.flow @@ -24,7 +24,7 @@ Log "@debug otp check result " otpCheck E // check otp is valid? then save secretKey to user When otpCheck is true // Save secret key to user - userSavedData | E = Call OTPServiceObj linkUser userId secretKey scanCode.nickName + userSavedData | E = Call OTPServiceObj linkUser userId secretKey // Debug log user save data result Log "@debug user saved data " userSavedData E // Finish with OTP Check Result true or false From 84fc169a7e3cc2aaed3e4be8982f69a7014dd778 Mon Sep 17 00:00:00 2001 From: gasmyr Date: Tue, 16 Jul 2024 15:51:37 +0100 Subject: [PATCH 11/32] fix corrupted org.gluu.agama.totp.otp.json Signed-off-by: gasmyr --- code/org.gluu.agama.totp.otp.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code/org.gluu.agama.totp.otp.json b/code/org.gluu.agama.totp.otp.json index 9f878f2..e34f806 100644 --- a/code/org.gluu.agama.totp.otp.json +++ b/code/org.gluu.agama.totp.otp.json @@ -254,7 +254,6 @@ "x": 547.6644736859095, "y": 71.56310229821389 }, - "parentId": "Agama-assignment-Node-04f8c5b3-dd9c-4b9c-b0e2-972fa22afb74", "whenCondition": "", "inRepeatBlock": "" }, @@ -689,4 +688,4 @@ "y": 15, "zoom": 1 } -} \ No newline at end of file +} From 3187292b6c6b288a03a68fd41be132ec7c1015c8 Mon Sep 17 00:00:00 2001 From: gasmyr Date: Tue, 16 Jul 2024 15:52:25 +0100 Subject: [PATCH 12/32] feat: update project.json From 976d7b9f6da30c9cdae4895bacb4b74cb242c7d3 Mon Sep 17 00:00:00 2001 From: gasmyr Date: Tue, 16 Jul 2024 15:52:27 +0100 Subject: [PATCH 13/32] feat: update org.gluu.agama.totp.otp.json --- code/org.gluu.agama.totp.otp.json | 34 +++++++++++++++---------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/code/org.gluu.agama.totp.otp.json b/code/org.gluu.agama.totp.otp.json index e34f806..1ff9044 100644 --- a/code/org.gluu.agama.totp.otp.json +++ b/code/org.gluu.agama.totp.otp.json @@ -303,8 +303,8 @@ "height": 124, "id": "finish-c68f8f3f-884c-457d-a755-90d87687ab0f", "position": { - "x": 1726.0248332087322, - "y": 69.75620830218304 + "x": 244.02483320873216, + "y": 5.75620830218304 }, "type": "finish", "data": { @@ -315,8 +315,8 @@ "inRepeatBlock": "", "handles": [], "position": { - "x": 1726.0248332087322, - "y": 69.75620830218304 + "x": 244.02483320873216, + "y": 5.75620830218304 }, "agamaData": { "id": "finish-c68f8f3f-884c-457d-a755-90d87687ab0f", @@ -339,8 +339,8 @@ "selected": false, "dragging": false, "positionAbsolute": { - "x": 1726.0248332087322, - "y": 69.75620830218304 + "x": 1705.6720719045647, + "y": 79.19310600396915 }, "parentId": "Agama-log-Node-7b87d29e-978e-4ee5-8ca5-a57f34f09340", "whenCondition": "", @@ -385,7 +385,7 @@ }, "skake": false }, - "selected": true, + "selected": false, "dragging": false, "positionAbsolute": { "x": 1012.267986947503, @@ -397,8 +397,8 @@ "height": 124, "id": "Agama-call-Node-267dcb6f-5223-46ae-8c3a-6b55e683a82e", "position": { - "x": 1228.242380115708, - "y": 75.16774482549462 + "x": 236.2423801157081, + "y": -8.832255174505377 }, "type": "call", "data": { @@ -408,8 +408,8 @@ "whenCondition": "", "inRepeatBlock": "", "position": { - "x": 1228.242380115708, - "y": 75.16774482549462 + "x": 236.2423801157081, + "y": -8.832255174505377 }, "agamaData": { "id": "Agama-call-Node-267dcb6f-5223-46ae-8c3a-6b55e683a82e", @@ -438,8 +438,8 @@ }, "selected": false, "positionAbsolute": { - "x": 1228.242380115708, - "y": 75.16774482549462 + "x": 1248.510367063211, + "y": 64.8621868626461 }, "dragging": false, "parentId": "Agama-call-Node-6f540ec4-1b03-4f0a-9b84-109d48aa2e36", @@ -684,8 +684,8 @@ } ], "viewport": { - "x": 10, - "y": 15, - "zoom": 1 + "x": 104.682334135171, + "y": 340.7166554270739, + "zoom": 0.5 } -} +} \ No newline at end of file From fb4b82cd7b245b33daafb1815250c5f70e552d40 Mon Sep 17 00:00:00 2001 From: gasmyr Date: Tue, 16 Jul 2024 15:52:29 +0100 Subject: [PATCH 14/32] feat: update org.gluu.agama.totp.otp.flow From 2aba02fd15536856fe1a1329a05d85bf625847b9 Mon Sep 17 00:00:00 2001 From: gasmyr Date: Tue, 16 Jul 2024 15:53:09 +0100 Subject: [PATCH 15/32] feat: update project.json From 2c452823e25e92d963586d73271b4bec195936dd Mon Sep 17 00:00:00 2001 From: gasmyr Date: Tue, 16 Jul 2024 15:53:11 +0100 Subject: [PATCH 16/32] feat: update org.gluu.agama.totp.otp.json --- code/org.gluu.agama.totp.otp.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/org.gluu.agama.totp.otp.json b/code/org.gluu.agama.totp.otp.json index 1ff9044..0507505 100644 --- a/code/org.gluu.agama.totp.otp.json +++ b/code/org.gluu.agama.totp.otp.json @@ -421,7 +421,7 @@ "javaClassName": "org.gluu.agama.totp.TOTPUtil", "javaMethodName": "validateTOTP", "javaVariableName": "OTPServiceObj", - "exceptionVariableField": "E", + "exceptionVariableField": "", "callType": "Call method on instance", "whenCondition": "", "inRepeatBlock": "", @@ -436,7 +436,7 @@ }, "skake": false }, - "selected": false, + "selected": true, "positionAbsolute": { "x": 1248.510367063211, "y": 64.8621868626461 From bf5e5702fb51105a23bb9f7f7ce233c6299350f0 Mon Sep 17 00:00:00 2001 From: gasmyr Date: Tue, 16 Jul 2024 15:53:13 +0100 Subject: [PATCH 17/32] feat: update org.gluu.agama.totp.otp.flow --- code/org.gluu.agama.totp.otp.flow | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/org.gluu.agama.totp.otp.flow b/code/org.gluu.agama.totp.otp.flow index cabce02..b5e8fb0 100644 --- a/code/org.gluu.agama.totp.otp.flow +++ b/code/org.gluu.agama.totp.otp.flow @@ -11,7 +11,7 @@ Log "@debug scan code : " scanCode.code // Get Instance TOTPService OTPServiceObj | E = Call org.gluu.agama.totp.TOTPService#getInstance // Call validateTOTP method to check OTP is valid or not -otpCheck | E = Call OTPServiceObj validateTOTP scanCode.code secretKey qrCodeAlg +otpCheck = Call OTPServiceObj validateTOTP scanCode.code secretKey qrCodeAlg // Debug Log : OTP check result Log "@debug otp check result " otpCheck // Return OTP Check result From 553592b48da5b08b8ccd578e601d237049e38cf6 Mon Sep 17 00:00:00 2001 From: gasmyr Date: Tue, 16 Jul 2024 15:53:45 +0100 Subject: [PATCH 18/32] feat: update project.json From 47cf23e0dfeef97b181c37779cb6f249f9fbdb1b Mon Sep 17 00:00:00 2001 From: gasmyr Date: Tue, 16 Jul 2024 15:53:48 +0100 Subject: [PATCH 19/32] feat: update org.gluu.agama.totp.pw.json --- code/org.gluu.agama.totp.pw.json | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/code/org.gluu.agama.totp.pw.json b/code/org.gluu.agama.totp.pw.json index 725215d..3393dab 100644 --- a/code/org.gluu.agama.totp.pw.json +++ b/code/org.gluu.agama.totp.pw.json @@ -189,12 +189,12 @@ "dragging": false }, { - "width": 210, - "height": 140, + "width": 110, + "height": 60, "id": "Agama-when-Node-9cb26c5d-64d4-4f9e-b60f-846c01663919", "position": { - "x": 1809, - "y": 398 + "x": 251.66666666666652, + "y": 59.333333333333485 }, "parentId": "Agama-assignment-Node-f0bd6fb4-5254-427f-ad5a-743441f681c2", "type": "when", @@ -205,8 +205,8 @@ "whenCondition": "", "inRepeatBlock": true, "position": { - "x": 1809, - "y": 388 + "x": 251.66666666666652, + "y": 59.333333333333485 }, "agamaData": { "id": "Agama-when-Node-9cb26c5d-64d4-4f9e-b60f-846c01663919", @@ -239,10 +239,10 @@ ], "skake": false }, - "selected": false, + "selected": true, "positionAbsolute": { - "x": 1809, - "y": 398 + "x": 1804.6666666666665, + "y": 399.3333333333335 }, "dragging": false }, @@ -1118,8 +1118,8 @@ } ], "viewport": { - "x": 10, - "y": 15, - "zoom": 1 + "x": 51.843608498780895, + "y": 241.12295367467783, + "zoom": 0.5163706025774991 } } \ No newline at end of file From ae749b90793d5ec7971494012be10f574fd4f6b0 Mon Sep 17 00:00:00 2001 From: gasmyr Date: Tue, 16 Jul 2024 15:53:49 +0100 Subject: [PATCH 20/32] feat: update org.gluu.agama.totp.pw.flow --- code/org.gluu.agama.totp.pw.flow | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/org.gluu.agama.totp.pw.flow b/code/org.gluu.agama.totp.pw.flow index 1cd31b2..cc1f0d6 100644 --- a/code/org.gluu.agama.totp.pw.flow +++ b/code/org.gluu.agama.totp.pw.flow @@ -17,7 +17,7 @@ Repeat 3 times max authResult.uid = creds.username // authResult.success is true When authResult.success is true - it_eobgl = {success:true, data: {userId: authResult.uid}} - Finish it_eobgl -it_nnynr = {success:false, error: "false"} -Finish it_nnynr \ No newline at end of file + it_rhuqf = {success:true, data: {userId: authResult.uid}} + Finish it_rhuqf +it_arjlf = {success:false, error: "false"} +Finish it_arjlf \ No newline at end of file From 97e5e70521cae3d5ba572ee002928bcd3acb4310 Mon Sep 17 00:00:00 2001 From: Kiran Mali <39133739+kdhttps@users.noreply.github.com> Date: Tue, 19 Nov 2024 18:44:02 +0530 Subject: [PATCH 21/32] feat: update project.json From f0645286f3cd95d674484084e5d3192774e5a921 Mon Sep 17 00:00:00 2001 From: Kiran Mali <39133739+kdhttps@users.noreply.github.com> Date: Tue, 19 Nov 2024 18:44:04 +0530 Subject: [PATCH 22/32] refactor: update org.gluu.agama.totp.main.json --- code/org.gluu.agama.totp.main.json | 1625 ++++++++++------------------ 1 file changed, 584 insertions(+), 1041 deletions(-) diff --git a/code/org.gluu.agama.totp.main.json b/code/org.gluu.agama.totp.main.json index 739a8f3..478b1fe 100644 --- a/code/org.gluu.agama.totp.main.json +++ b/code/org.gluu.agama.totp.main.json @@ -1,830 +1,270 @@ { "nodes": [ { - "width": 270, - "height": 55, - "id": "Agama-note-163dea35-0e83-41a5-aea0-d5b2233a4f7b", - "position": { - "x": 463.4799537674786, - "y": -10.802671507960781 - }, - "type": "notes", "data": { - "id": "Agama-note-163dea35-0e83-41a5-aea0-d5b2233a4f7b", - "type": "Agama-note", - "notes": "Trigger user authn flow, load login.ftlh page, ask to enter username and password", - "position": { - "x": 463.4799537674786, - "y": -10.802671507960781 + "agamaData": { + "isTopLevelFlow": true, + "basepath": "", + "configParams": "{\n \"issuer\": \"your-server-host-name\",\n \"qrCodeLabel\": \"Gluu\",\n \"qrCodeAlg\": \"sha1\",\n \"qrCodeKeyLength\": 20\n}", + "creationDate": "19/11/2024", + "nodeIcon": "material-symbols:line-start-square", + "timeout": "", + "inputs": "", + "configs": "conf", + "flowname": "org.gluu.agama.totp.main", + "displayName": "Gluu Agama TOTP Auth", + "hasComment": true, + "comment": "Main flow to handle all sub flows" }, - "skake": false - }, - "selected": false, - "positionAbsolute": { - "x": 463.4799537674786, - "y": -10.802671507960781 - }, - "dragging": false - }, - { - "width": 270, - "height": 55, - "id": "Agama-note-39660c51-0d9b-435e-8f3b-f9437cfb0ea9", - "position": { - "x": 2843, - "y": 307 - }, - "type": "notes", - "data": { - "id": "Agama-note-39660c51-0d9b-435e-8f3b-f9437cfb0ea9", - "type": "Agama-note", - "notes": "Proceed for OTP check, Load otplogin.ftlh page, ask to enter OTP and check valid OTP", + "id": "startNode-256a016a-8edc-4e1d-8174-66c371176bb7", + "type": "startNode", "position": { - "x": 2843, - "y": 307 - }, - "skake": false - }, - "selected": false, - "positionAbsolute": { - "x": 2843, - "y": 307 + "x": 50, + "y": 200 + } }, - "dragging": false - }, - { - "width": 211, - "height": 30, - "id": "Agama-note-b65aa186-4826-45b6-8189-30bc5388116b", + "type": "startNode", + "id": "startNode-256a016a-8edc-4e1d-8174-66c371176bb7", "position": { - "x": 3245.496810563672, - "y": 118.40080775743363 + "x": 50, + "y": 200 }, - "type": "notes", - "data": { - "id": "Agama-note-b65aa186-4826-45b6-8189-30bc5388116b", - "type": "Agama-note", - "notes": "Check OTP is valid or not", - "position": { - "x": 3245.496810563672, - "y": 118.40080775743363 - }, - "skake": false - }, - "selected": false, - "positionAbsolute": { - "x": 3245.496810563672, - "y": 118.40080775743363 - }, - "dragging": false - }, - { - "width": 270, - "height": 55, - "id": "Agama-note-68b5f719-b714-4342-902a-e09f221a6590", - "position": { - "x": 2638, - "y": 77 - }, - "type": "notes", - "data": { - "id": "Agama-note-68b5f719-b714-4342-902a-e09f221a6590", - "type": "Agama-note", - "notes": "Check if user is already enrolled for TOTP then ask only to enter OTP", - "position": { - "x": 2638, - "y": 77 - }, - "skake": false - }, - "selected": false, - "positionAbsolute": { - "x": 2638, - "y": 77 - }, - "dragging": false - }, - { - "width": 270, - "height": 42, - "id": "Agama-note-241ef01d-e6f3-433d-9c81-f8d3b9986df1", - "position": { - "x": 2228, - "y": 317 - }, - "type": "notes", - "data": { - "id": "Agama-note-241ef01d-e6f3-433d-9c81-f8d3b9986df1", - "type": "Agama-note", - "notes": "Proceed for user TOTP enrolment flow process", - "position": { - "x": 2228, - "y": 317 - }, - "skake": false - }, - "selected": false, - "positionAbsolute": { - "x": 2228, - "y": 317 - }, - "dragging": false + "measured": { + "width": 170, + "height": 124 + } }, { - "width": 270, - "height": 42, - "id": "Agama-note-ec547944-50ce-47ae-ade7-c7cbea4af388", - "position": { - "x": 2042.4493009032726, - "y": 92.40559277382073 - }, - "type": "notes", "data": { - "id": "Agama-note-ec547944-50ce-47ae-ade7-c7cbea4af388", - "type": "Agama-note", - "notes": "Check if user is not enrolled for TOTP 2FA ", - "position": { - "x": 2042.4493009032726, - "y": 92.40559277382073 + "agamaData": { + "nodeIcon": "octicon:log-16", + "displayName": "", + "hasComment": true, + "comment": "Log Proceeding for user authn", + "logMessage": "\"proceeding for user authn\"", + "logLevel": "debug" }, - "skake": false - }, - "selected": false, - "positionAbsolute": { - "x": 2042.4493009032726, - "y": 92.40559277382073 - }, - "dragging": false - }, - { - "width": 270, - "height": 55, - "id": "Agama-note-6375b56f-4095-439a-bba7-e717dbb4f554", - "position": { - "x": 1081, - "y": 17.52061421622301 - }, - "type": "notes", - "data": { - "id": "Agama-note-6375b56f-4095-439a-bba7-e717dbb4f554", - "type": "Agama-note", - "notes": "Fetching User's secretKey to check user is already enrolled or not", + "id": "logNode-e2f7f3db-6944-4eb0-8de3-4ae5f36ab64a", + "type": "logNode", "position": { - "x": 1081, - "y": 17.52061421622301 + "x": 300, + "y": 200 }, - "skake": false - }, - "selected": false, - "positionAbsolute": { - "x": 1081, - "y": 17.52061421622301 + "previousNodeId": "startNode-256a016a-8edc-4e1d-8174-66c371176bb7" }, - "dragging": false - }, - { - "width": 270, - "height": 55, - "id": "Agama-note-997449a3-70bf-4ea2-8831-421068e07b27", + "type": "logNode", + "id": "logNode-e2f7f3db-6944-4eb0-8de3-4ae5f36ab64a", "position": { - "x": 33.33150978085155, - "y": -16.923923970212343 - }, - "type": "notes", - "data": { - "id": "Agama-note-997449a3-70bf-4ea2-8831-421068e07b27", - "type": "Agama-note", - "notes": "This is main flow which handle\n\n1. User authn\n2. User enrollment for TOTP\n3. User OTP validation", - "position": { - "x": 33.33150978085155, - "y": -16.923923970212343 - }, - "skake": false + "x": 300, + "y": 200 }, - "selected": false, - "positionAbsolute": { - "x": 33.33150978085155, - "y": -16.923923970212343 - }, - "dragging": false + "measured": { + "width": 170, + "height": 124 + } }, { - "width": 170, - "height": 124, - "id": "finish-f6988b05-6a38-40d3-8ef2-b3512d4b681a", - "position": { - "x": 3088.3333333333335, - "y": 130.33333333333331 - }, - "type": "finish", "data": { - "id": "finish-f6988b05-6a38-40d3-8ef2-b3512d4b681a", - "type": "Agama-finish-Flow", - "parentId": "Agama-when-Node-c30bebbf-7ce3-4fa3-9743-cf10643dd99c", - "whenCondition": "WhenFalse", - "inRepeatBlock": "", - "handles": [ - "Agama-when-Node-c30bebbf-7ce3-4fa3-9743-cf10643dd99c.FAILURE", - "Agama-when-Node-c30bebbf-7ce3-4fa3-9743-cf10643dd99c.SUCCESS" - ], - "position": { - "x": 3088.3333333333335, - "y": 130.33333333333331 - }, "agamaData": { - "id": "finish-f6988b05-6a38-40d3-8ef2-b3512d4b681a", - "parentId": "Agama-when-Node-c30bebbf-7ce3-4fa3-9743-cf10643dd99c", - "type": "Agama-finish-Flow", - "hasSuccess": false, - "hasFailure": false, - "hasComment": true, - "comment": "Login Failed", - "flowfilename": "", - "returnVariable": "login failed", - "finishMode": "withFailure", - "nodeIcon": "material-symbols:line-end-square-rounded", + "nodeIcon": "fluent-mdl2:trigger-approval", + "nodeColor": "#82dcdc", "displayName": "", - "nodeColor": "#e3a5a5" - }, - "skake": false - }, - "selected": true, - "positionAbsolute": { - "x": 3088.3333333333335, - "y": 130.33333333333331 - }, - "dragging": false - }, - { - "width": 170, - "height": 124, - "id": "finish-079dd42a-f314-4145-9de9-2196d01548c5", - "position": { - "x": 3374, - "y": 427 - }, - "type": "finish", - "data": { - "id": "finish-079dd42a-f314-4145-9de9-2196d01548c5", - "type": "Agama-finish-Flow", - "parentId": "Agama-when-Node-c30bebbf-7ce3-4fa3-9743-cf10643dd99c", - "whenCondition": "WhenTrue", - "inRepeatBlock": "", - "handles": [ - "Agama-when-Node-c30bebbf-7ce3-4fa3-9743-cf10643dd99c.FAILURE", - "Agama-when-Node-c30bebbf-7ce3-4fa3-9743-cf10643dd99c.SUCCESS" - ], - "position": { - "x": 3374, - "y": 427 - }, - "agamaData": { - "id": "finish-079dd42a-f314-4145-9de9-2196d01548c5", - "parentId": "Agama-when-Node-c30bebbf-7ce3-4fa3-9743-cf10643dd99c", - "type": "Agama-finish-Flow", - "hasSuccess": false, - "hasFailure": false, "hasComment": true, - "comment": "finish with success userId", - "flowfilename": "", - "returnVariable": "{ userId: userId }", - "finishMode": "withSuccess", - "nodeIcon": "material-symbols:line-end-square-rounded", - "displayName": "" + "comment": "Trigger User Authn PW ask Username password login", + "flowFileName": "org.gluu.agama.totp.pw", + "arguments": [], + "asssignedVariableName": "user", + "exceptionVariableField": "E" }, - "skake": false - }, - "selected": false, - "dragging": false, - "positionAbsolute": { - "x": 3374, - "y": 427 - } - }, - { - "width": 110, - "height": 60, - "id": "Agama-when-Node-c30bebbf-7ce3-4fa3-9743-cf10643dd99c", - "position": { - "x": 305.0480927878507, - "y": 0.6985532820382332 - }, - "parentId": "Agama-when-Node-1f6a89df-661b-4baa-9419-78e755ba4b12", - "type": "when", - "data": { - "id": "Agama-when-Node-c30bebbf-7ce3-4fa3-9743-cf10643dd99c", - "type": "Agama-when-Node", - "parentId": "Agama-when-Node-1f6a89df-661b-4baa-9419-78e755ba4b12", - "whenCondition": "WhenFalse", - "inRepeatBlock": "", + "id": "triggerNode-a6a86da6-c7f4-414d-b485-455159fe9f9a", + "type": "triggerNode", "position": { - "x": 305.0480927878507, - "y": 0.6985532820382332 + "x": 550, + "y": 200 }, - "agamaData": { - "id": "Agama-when-Node-c30bebbf-7ce3-4fa3-9743-cf10643dd99c", - "parentId": "Agama-when-Node-1f6a89df-661b-4baa-9419-78e755ba4b12", - "type": "Agama-when-Node", - "variableField": "checkOTPValid.success", - "conditionInputField": "is", - "valueField": "true", - "hasComment": true, - "inRepeatBlock": "", - "hasSuccess": true, - "hasFailure": true, - "conditions": [ - { - "variable": "checkOTPValid.success", - "operator": "is", - "dataValue": "true", - "combinator": "none" - } - ] - }, - "handles": [ - "Agama-when-Node-c30bebbf-7ce3-4fa3-9743-cf10643dd99c.FAILURE", - "Agama-when-Node-c30bebbf-7ce3-4fa3-9743-cf10643dd99c.SUCCESS" - ], - "skake": false - }, - "selected": false, - "positionAbsolute": { - "x": 2816.0338171323333, - "y": 185.0315928944055 + "previousNodeId": "logNode-e2f7f3db-6944-4eb0-8de3-4ae5f36ab64a" }, - "dragging": false - }, - { - "width": 170, - "height": 124, - "id": "Agama-log-Node-a2d8e474-a1c6-4bbd-8ff7-0132e5a500f4", + "type": "triggerNode", + "id": "triggerNode-a6a86da6-c7f4-414d-b485-455159fe9f9a", "position": { - "x": 3036, - "y": 400 + "x": 550, + "y": 200 }, - "type": "log", - "data": { - "id": "Agama-log-Node-a2d8e474-a1c6-4bbd-8ff7-0132e5a500f4", - "type": "Agama-log-Node", - "parentId": "Agama-trigger-Node-030c7c0d-f0cc-44f3-ba67-ca99c7a01793", - "whenCondition": "", - "inRepeatBlock": "", - "position": { - "x": 3036, - "y": 400 - }, - "agamaData": { - "id": "Agama-log-Node-a2d8e474-a1c6-4bbd-8ff7-0132e5a500f4", - "parentId": "Agama-trigger-Node-030c7c0d-f0cc-44f3-ba67-ca99c7a01793", - "type": "Agama-log-Node", - "displayName": "", - "hasComment": true, - "comment": "Debug Log: result of OTP Check valid or not", - "whenCondition": "", - "inRepeatBlock": "", - "logMessage": "\"checkOTPValid check otp \" checkOTPValid E", - "logLevel": "debug", - "nodeIcon": "octicon:log-16" - }, - "skake": false - }, - "selected": false, - "dragging": false, - "positionAbsolute": { - "x": 3036, - "y": 400 + "measured": { + "width": 170, + "height": 124 } }, { - "width": 170, - "height": 124, - "id": "Agama-trigger-Node-030c7c0d-f0cc-44f3-ba67-ca99c7a01793", - "position": { - "x": 2836, - "y": 400 - }, - "type": "trigger", "data": { - "id": "Agama-trigger-Node-030c7c0d-f0cc-44f3-ba67-ca99c7a01793", - "type": "Agama-trigger-Node", - "parentId": "Agama-when-Node-1f6a89df-661b-4baa-9419-78e755ba4b12", - "whenCondition": "WhenTrue", - "inRepeatBlock": "", - "position": { - "x": 2836, - "y": 400 - }, "agamaData": { - "id": "Agama-trigger-Node-030c7c0d-f0cc-44f3-ba67-ca99c7a01793", - "parentId": "Agama-when-Node-1f6a89df-661b-4baa-9419-78e755ba4b12", - "type": "Agama-trigger-Node", - "displayName": "", + "nodeIcon": "octicon:log-16", + "displayName": "log user", "hasComment": true, - "comment": "Trigger otp flow", - "whenCondition": "WhenTrue", - "inRepeatBlock": "", - "nodeIcon": "fluent-mdl2:trigger-approval", - "flowFileName": "org.gluu.agama.totp.otp", - "arguments": [ - "userId", - "userTOTPSecretKey", - "qrCodeAlg" - ], - "asssignedVariableName": "checkOTPValid", - "exceptionVariableField": "E", - "nodeColor": "#82dcdc" + "comment": "log authenticated user", + "logMessage": "\"Authn user details \" user", + "logLevel": "debug" }, - "skake": false - }, - "selected": false, - "positionAbsolute": { - "x": 2836, - "y": 400 - }, - "dragging": false - }, - { - "width": 170, - "height": 124, - "id": "Agama-log-Node-16203684-77dd-42fe-9f40-783cb4047118", - "position": { - "x": 2513, - "y": 398 - }, - "type": "log", - "data": { - "id": "Agama-log-Node-16203684-77dd-42fe-9f40-783cb4047118", - "type": "Agama-log-Node", - "parentId": "Agama-trigger-Node-8c3bb0a9-9b1f-4b34-9039-dd6e3463545d", - "whenCondition": "", - "inRepeatBlock": false, + "id": "logNode-4abb6e5b-6a7e-4348-837c-9e2f5e77cc24", + "type": "logNode", "position": { - "x": 2513, - "y": 398 + "x": 800, + "y": 200 }, - "agamaData": { - "id": "Agama-log-Node-16203684-77dd-42fe-9f40-783cb4047118", - "parentId": "Agama-trigger-Node-8c3bb0a9-9b1f-4b34-9039-dd6e3463545d", - "type": "Agama-log-Node", - "displayName": "", - "hasComment": true, - "comment": "Debug Log result of OTP Check valid or not", - "whenCondition": "", - "inRepeatBlock": false, - "logMessage": "\"checkOTPValid enroll \" checkOTPValid E", - "logLevel": "debug", - "nodeIcon": "octicon:log-16" - }, - "skake": false + "previousNodeId": "triggerNode-a6a86da6-c7f4-414d-b485-455159fe9f9a" }, - "selected": false, - "dragging": false, - "positionAbsolute": { - "x": 2513, - "y": 398 - } - }, - { - "width": 170, - "height": 124, - "id": "Agama-trigger-Node-8c3bb0a9-9b1f-4b34-9039-dd6e3463545d", + "type": "logNode", + "id": "logNode-4abb6e5b-6a7e-4348-837c-9e2f5e77cc24", "position": { - "x": 2296, - "y": 396 + "x": 800, + "y": 200 }, - "type": "trigger", - "data": { - "id": "Agama-trigger-Node-8c3bb0a9-9b1f-4b34-9039-dd6e3463545d", - "type": "Agama-trigger-Node", - "parentId": "Agama-when-Node-4fa47f26-e1e3-4d4f-b40d-31de2ff74da4", - "whenCondition": "WhenTrue", - "inRepeatBlock": false, - "position": { - "x": 2296, - "y": 396 - }, - "agamaData": { - "id": "Agama-trigger-Node-8c3bb0a9-9b1f-4b34-9039-dd6e3463545d", - "parentId": "Agama-when-Node-4fa47f26-e1e3-4d4f-b40d-31de2ff74da4", - "type": "Agama-trigger-Node", - "displayName": "", - "hasComment": true, - "comment": "Trigger enrollment flow, Load enroll.ftlh page, ask to scan code, enter code and check OTP is valid or not", - "whenCondition": "WhenTrue", - "inRepeatBlock": false, - "nodeIcon": "fluent-mdl2:trigger-approval", - "flowFileName": "org.gluu.agama.totp.enroll", - "arguments": [ - "userId", - "qrCodeAlg", - "qrCodeKeyLength", - "qrCodeLabel", - "qrCodeIssuer" - ], - "asssignedVariableName": "checkOTPValid", - "exceptionVariableField": "E", - "nodeColor": "#82dcdc" - }, - "skake": false - }, - "selected": false, - "dragging": false, - "positionAbsolute": { - "x": 2296, - "y": 396 + "measured": { + "width": 170, + "height": 124 } }, { - "width": 170, - "height": 124, - "id": "Agama-assignment-Node-991ae6f6-437f-45ef-927e-51659e977511", - "position": { - "x": 899.1141316191488, - "y": 122.47282597234039 - }, - "type": "assignment", "data": { - "id": "Agama-assignment-Node-991ae6f6-437f-45ef-927e-51659e977511", - "type": "Agama-assignment-Node", - "parentId": "Agama-log-Node-9d24eef3-4e4c-4647-a215-407f7fb0b575", - "whenCondition": "", - "inRepeatBlock": false, - "position": { - "x": 899.1141316191488, - "y": 122.47282597234039 - }, "agamaData": { - "id": "Agama-assignment-Node-991ae6f6-437f-45ef-927e-51659e977511", - "parentId": "Agama-log-Node-9d24eef3-4e4c-4647-a215-407f7fb0b575", - "type": "Agama-assignment-Node", + "nodeIcon": "material-symbols:equal", "displayName": "", "hasComment": true, "comment": "Init userId with user.data.userid", - "whenCondition": "", - "inRepeatBlock": false, "assignments": [ { "variableTypeCheck": false, "assignmentExpression": "user.data.userId", "assignedVariableName": "userId" } - ], - "nodeIcon": "material-symbols:equal", - "hasSuccess": "", - "hasFailure": "", - "hasNoRepeat": false, - "hasRepeat": false + ] }, - "skake": false - }, - "selected": false, - "dragging": false, - "positionAbsolute": { - "x": 899.1141316191488, - "y": 122.47282597234039 - } - }, - { - "width": 170, - "height": 124, - "id": "Agama-log-Node-9d24eef3-4e4c-4647-a215-407f7fb0b575", - "position": { - "x": 672, - "y": 120 - }, - "type": "log", - "data": { - "id": "Agama-log-Node-9d24eef3-4e4c-4647-a215-407f7fb0b575", - "type": "Agama-log-Node", - "parentId": "Agama-trigger-Node-e55136b1-e061-4ca6-9a25-05afeb5e2d8b", - "whenCondition": "", - "inRepeatBlock": false, + "id": "assignmentNode-004732ff-e1f4-4193-bf57-1e32bb70882e", + "type": "assignmentNode", "position": { - "x": 672, - "y": 120 + "x": 1050, + "y": 200 }, - "agamaData": { - "id": "Agama-log-Node-9d24eef3-4e4c-4647-a215-407f7fb0b575", - "parentId": "Agama-trigger-Node-e55136b1-e061-4ca6-9a25-05afeb5e2d8b", - "type": "Agama-log-Node", - "displayName": "log user", - "hasComment": true, - "comment": "log authenticated user", - "whenCondition": "", - "inRepeatBlock": false, - "logMessage": "\"Authn user details \" user", - "logLevel": "debug", - "nodeIcon": "octicon:log-16" - }, - "skake": false + "previousNodeId": "logNode-4abb6e5b-6a7e-4348-837c-9e2f5e77cc24" + }, + "type": "assignmentNode", + "id": "assignmentNode-004732ff-e1f4-4193-bf57-1e32bb70882e", + "position": { + "x": 1050, + "y": 200 }, - "selected": false, - "dragging": false, - "positionAbsolute": { - "x": 672, - "y": 120 + "measured": { + "width": 170, + "height": 124 } }, { - "width": 170, - "height": 124, - "id": "Agama-trigger-Node-e55136b1-e061-4ca6-9a25-05afeb5e2d8b", - "position": { - "x": 472, - "y": 120 - }, - "type": "trigger", "data": { - "id": "Agama-trigger-Node-e55136b1-e061-4ca6-9a25-05afeb5e2d8b", - "type": "Agama-trigger-Node", - "parentId": "Agama-log-Node-cb7fc7cb-a84c-4c28-aea3-e9d7bbf1683a", - "whenCondition": "", - "inRepeatBlock": false, - "position": { - "x": 472, - "y": 120 - }, "agamaData": { - "id": "Agama-trigger-Node-e55136b1-e061-4ca6-9a25-05afeb5e2d8b", - "parentId": "Agama-log-Node-cb7fc7cb-a84c-4c28-aea3-e9d7bbf1683a", - "type": "Agama-trigger-Node", + "nodeIcon": "material-symbols:code", "displayName": "", "hasComment": true, - "comment": "Trigger User Authn PW ask Username password login", - "whenCondition": "", - "inRepeatBlock": false, - "nodeIcon": "fluent-mdl2:trigger-approval", - "flowFileName": "org.gluu.agama.totp.pw", - "arguments": [], - "asssignedVariableName": "user", + "comment": "Get Instance TOTPService", + "javaClassName": "org.gluu.agama.totp.TOTPService", + "javaMethodName": "getInstance", + "javaVariableName": "org.gluu.agama.totp", "exceptionVariableField": "E", - "nodeColor": "#82dcdc" + "callType": "Call static method", + "arguments": [], + "asssignedVariableName": "OTPServiceObj" + }, + "id": "callNode-08e265f0-8d42-4f9c-ace8-a97bb5095cc4", + "type": "callNode", + "position": { + "x": 1300, + "y": 200 }, - "skake": false + "previousNodeId": "assignmentNode-004732ff-e1f4-4193-bf57-1e32bb70882e" }, - "selected": false, - "dragging": false, - "positionAbsolute": { - "x": 472, - "y": 120 + "type": "callNode", + "id": "callNode-08e265f0-8d42-4f9c-ace8-a97bb5095cc4", + "position": { + "x": 1300, + "y": 200 + }, + "measured": { + "width": 170, + "height": 124 } }, { - "width": 170, - "height": 124, - "id": "Agama-log-Node-cb7fc7cb-a84c-4c28-aea3-e9d7bbf1683a", - "position": { - "x": 272, - "y": 120 - }, - "type": "log", "data": { - "id": "Agama-log-Node-cb7fc7cb-a84c-4c28-aea3-e9d7bbf1683a", - "type": "Agama-log-Node", - "parentId": "Agama-start-Flow-5e5f716c-d68a-48fe-9ab3-ce1d4292176e", - "whenCondition": "", - "inRepeatBlock": false, - "position": { - "x": 272, - "y": 120 - }, "agamaData": { - "id": "Agama-log-Node-cb7fc7cb-a84c-4c28-aea3-e9d7bbf1683a", - "parentId": "Agama-start-Flow-5e5f716c-d68a-48fe-9ab3-ce1d4292176e", - "type": "Agama-log-Node", + "nodeIcon": "material-symbols:code", + "nodeColor": "#84e1a5", "displayName": "", "hasComment": true, - "comment": "Log Proceeding for user authn", - "whenCondition": "", - "inRepeatBlock": false, - "logMessage": "\"proceeding for user authn\"", - "logLevel": "debug", - "nodeIcon": "octicon:log-16" + "comment": "Get User's TOTP Secret key", + "javaClassName": "org.gluu.agama.totp.IdentityProcessor", + "javaMethodName": "getUserTOTPSecretKey", + "javaVariableName": "OTPServiceObj", + "exceptionVariableField": "E", + "callType": "Call method on instance", + "arguments": [ + "userId" + ], + "asssignedVariableName": "userTOTPSecretKey" }, - "skake": false - }, - "selected": false, - "dragging": false, - "positionAbsolute": { - "x": 272, - "y": 120 - } - }, - { - "width": 170, - "height": 124, - "id": "Agama-start-Flow-5e5f716c-d68a-48fe-9ab3-ce1d4292176e", - "type": "start", - "sourcePosition": "right", - "data": { - "id": "Agama-start-Flow-5e5f716c-d68a-48fe-9ab3-ce1d4292176e", - "type": "Agama-start-Flow", + "id": "callNode-d9aec55a-a089-4177-9e8e-2d213c60fa78", + "type": "callNode", "position": { - "x": 72, - "y": 120 + "x": 1550, + "y": 200 }, - "inRepeatBlock": false, - "agamaData": { - "id": "Agama-start-Flow-5e5f716c-d68a-48fe-9ab3-ce1d4292176e", - "type": "Agama-start-Flow", - "displayName": "Gluu Agama TOTP Auth", - "hasComment": true, - "comment": "Main flow to handle all sub flows", - "isTopLevelFlow": true, - "basepath": "", - "configParams": "{\n \"issuer\": \"your-server-host-name\",\n \"qrCodeLabel\": \"Gluu\",\n \"qrCodeAlg\": \"sha1\",\n \"qrCodeKeyLength\": 20\n}", - "nodeIcon": "material-symbols:line-start-square", - "timeout": "", - "inputs": "", - "configs": "conf", - "flowname": "org.gluu.agama.totp.main" - }, - "skake": false + "previousNodeId": "callNode-08e265f0-8d42-4f9c-ace8-a97bb5095cc4" }, + "type": "callNode", + "id": "callNode-d9aec55a-a089-4177-9e8e-2d213c60fa78", "position": { - "x": 72, - "y": 120 - }, - "selected": false, - "positionAbsolute": { - "x": 72, - "y": 120 + "x": 1550, + "y": 200 }, - "dragging": false + "measured": { + "width": 170, + "height": 124 + } }, { - "width": 170, - "height": 124, - "id": "Agama-log-Node-9e877173-94de-48c1-a807-cde1025de181", - "position": { - "x": 1616, - "y": 127 - }, - "type": "log", "data": { - "id": "Agama-log-Node-9e877173-94de-48c1-a807-cde1025de181", - "type": "Agama-log-Node", - "parentId": "Agama-call-Node-c9f0bffa-db46-4080-8661-c51de76a3ef5", - "whenCondition": "", - "inRepeatBlock": false, - "position": { - "x": 1616, - "y": 127 - }, "agamaData": { - "id": "Agama-log-Node-9e877173-94de-48c1-a807-cde1025de181", - "parentId": "Agama-call-Node-c9f0bffa-db46-4080-8661-c51de76a3ef5", - "type": "Agama-log-Node", + "nodeIcon": "octicon:log-16", "displayName": "", "hasComment": true, "comment": "Debug Log got TOTP key", - "whenCondition": "", - "inRepeatBlock": false, "logMessage": "\"Got secret TOTP key for\" userId E", - "logLevel": "debug", - "nodeIcon": "octicon:log-16", - "hasSuccess": "", - "hasFailure": "", - "hasNoRepeat": false, - "hasRepeat": false + "logLevel": "debug" }, - "skake": false + "id": "logNode-f9c9c957-f7c1-462d-9c00-b53d340cef78", + "type": "logNode", + "position": { + "x": 1800, + "y": 200 + }, + "previousNodeId": "callNode-d9aec55a-a089-4177-9e8e-2d213c60fa78" }, - "selected": false, - "positionAbsolute": { - "x": 1616, - "y": 127 + "type": "logNode", + "id": "logNode-f9c9c957-f7c1-462d-9c00-b53d340cef78", + "position": { + "x": 1800, + "y": 200 }, - "dragging": false + "measured": { + "width": 170, + "height": 124 + } }, { - "width": 170, - "height": 124, - "id": "Agama-assignment-Node-8fd47c3f-713f-44bd-a54e-23a8c291d312", - "position": { - "x": 1837, - "y": 126 - }, - "type": "assignment", "data": { - "id": "Agama-assignment-Node-8fd47c3f-713f-44bd-a54e-23a8c291d312", - "type": "Agama-assignment-Node", - "parentId": "Agama-log-Node-9e877173-94de-48c1-a807-cde1025de181", - "whenCondition": "", - "inRepeatBlock": false, - "position": { - "x": 1837, - "y": 126 - }, "agamaData": { - "id": "Agama-assignment-Node-8fd47c3f-713f-44bd-a54e-23a8c291d312", - "parentId": "Agama-log-Node-9e877173-94de-48c1-a807-cde1025de181", - "type": "Agama-assignment-Node", + "nodeIcon": "material-symbols:equal", "displayName": "", "hasComment": true, "comment": "Declare and map enrollData to easy usage", - "whenCondition": "", - "inRepeatBlock": false, "assignments": [ { "variableTypeCheck": false, @@ -851,52 +291,32 @@ "assignmentExpression": "conf.issuer", "assignedVariableName": "qrCodeIssuer" } - ], - "nodeIcon": "material-symbols:equal" + ] }, - "skake": false + "id": "assignmentNode-2e1ae400-7432-4e6a-ab99-a51be027557e", + "type": "assignmentNode", + "position": { + "x": 2050, + "y": 200 + }, + "previousNodeId": "logNode-f9c9c957-f7c1-462d-9c00-b53d340cef78" }, - "selected": false, - "positionAbsolute": { - "x": 1837, - "y": 126 + "type": "assignmentNode", + "id": "assignmentNode-2e1ae400-7432-4e6a-ab99-a51be027557e", + "position": { + "x": 2050, + "y": 200 }, - "dragging": false + "measured": { + "width": 170, + "height": 124 + } }, { - "width": 110, - "height": 60, - "id": "Agama-when-Node-4fa47f26-e1e3-4d4f-b40d-31de2ff74da4", - "position": { - "x": 307.3190576778161, - "y": 49.31876395684941 - }, - "parentId": "Agama-assignment-Node-8fd47c3f-713f-44bd-a54e-23a8c291d312", - "type": "when", "data": { - "id": "Agama-when-Node-4fa47f26-e1e3-4d4f-b40d-31de2ff74da4", - "type": "Agama-when-Node", - "parentId": "Agama-assignment-Node-8fd47c3f-713f-44bd-a54e-23a8c291d312", - "whenCondition": "", - "inRepeatBlock": "", - "position": { - "x": 307.3190576778161, - "y": 49.31876395684941 - }, "agamaData": { - "id": "Agama-when-Node-4fa47f26-e1e3-4d4f-b40d-31de2ff74da4", - "parentId": "Agama-assignment-Node-8fd47c3f-713f-44bd-a54e-23a8c291d312", - "type": "Agama-when-Node", - "variableField": "userTOTPSecretKey", - "conditionInputField": "is", - "valueField": "null", - "comment": "if no enrollment exist", "hasComment": true, - "inRepeatBlock": "", - "position": { - "x": 1960 - }, - "hasFailure": true, + "comment": "if no enrollment exist", "conditions": [ { "variable": "userTOTPSecretKey", @@ -906,55 +326,98 @@ } ] }, - "handles": [ - "Agama-when-Node-4fa47f26-e1e3-4d4f-b40d-31de2ff74da4.FAILURE", - "Agama-when-Node-4fa47f26-e1e3-4d4f-b40d-31de2ff74da4.SUCCESS" - ], - "skake": false + "id": "whenNode-ecaef5d5-3bf4-4993-8c69-07b8b6f29839", + "type": "whenNode", + "position": { + "x": 2300, + "y": 200 + }, + "previousNodeId": "assignmentNode-2e1ae400-7432-4e6a-ab99-a51be027557e" }, - "selected": false, - "dragging": false, - "positionAbsolute": { - "x": 2144.319057677816, - "y": 175.3187639568494 + "type": "whenNode", + "id": "whenNode-ecaef5d5-3bf4-4993-8c69-07b8b6f29839", + "position": { + "x": 2300, + "y": 200 }, - "whenCondition": "", - "inRepeatBlock": "" + "measured": { + "width": 110, + "height": 59 + } }, { - "width": 110, - "height": 60, - "id": "Agama-when-Node-1f6a89df-661b-4baa-9419-78e755ba4b12", + "data": { + "agamaData": { + "nodeIcon": "fluent-mdl2:trigger-approval", + "nodeColor": "#82dcdc", + "displayName": "", + "hasComment": true, + "comment": "Trigger enrollment flow, Load enroll.ftlh page, ask to scan code, enter code and check OTP is valid or not", + "flowFileName": "org.gluu.agama.totp.enroll", + "arguments": [ + "userId", + "qrCodeAlg", + "qrCodeKeyLength", + "qrCodeLabel", + "qrCodeIssuer" + ], + "asssignedVariableName": "checkOTPValid", + "exceptionVariableField": "E" + }, + "id": "triggerNode-424a955c-526f-4902-be06-bf03d157cad1", + "type": "triggerNode", + "position": { + "x": 2550, + "y": 450 + }, + "previousNodeId": "whenNode-ecaef5d5-3bf4-4993-8c69-07b8b6f29839", + "branching": "success" + }, + "type": "triggerNode", + "id": "triggerNode-424a955c-526f-4902-be06-bf03d157cad1", "position": { - "x": 366.6666666666665, - "y": 9.01427565551785 + "x": 2550, + "y": 450 }, - "parentId": "Agama-when-Node-4fa47f26-e1e3-4d4f-b40d-31de2ff74da4", - "type": "when", + "measured": { + "width": 170, + "height": 124 + } + }, + { "data": { - "id": "Agama-when-Node-1f6a89df-661b-4baa-9419-78e755ba4b12", - "type": "Agama-when-Node", - "parentId": "Agama-when-Node-4fa47f26-e1e3-4d4f-b40d-31de2ff74da4", - "whenCondition": "WhenFalse", - "inRepeatBlock": "", + "agamaData": { + "nodeIcon": "octicon:log-16", + "displayName": "", + "hasComment": true, + "comment": "Debug Log result of OTP Check valid or not", + "logMessage": "\"checkOTPValid enroll \" checkOTPValid E", + "logLevel": "debug" + }, + "id": "logNode-5b106624-c9ae-4d9c-bbf7-ed666afb39e2", + "type": "logNode", "position": { - "x": 366.6666666666665, - "y": 9.01427565551785 + "x": 2800, + "y": 450 }, + "previousNodeId": "triggerNode-424a955c-526f-4902-be06-bf03d157cad1" + }, + "type": "logNode", + "id": "logNode-5b106624-c9ae-4d9c-bbf7-ed666afb39e2", + "position": { + "x": 2800, + "y": 450 + }, + "measured": { + "width": 170, + "height": 124 + } + }, + { + "data": { "agamaData": { - "id": "Agama-when-Node-1f6a89df-661b-4baa-9419-78e755ba4b12", - "parentId": "Agama-when-Node-4fa47f26-e1e3-4d4f-b40d-31de2ff74da4", - "type": "Agama-when-Node", - "hasFailure": true, - "variableField": "userTOTPSecretKey", - "conditionInputField": "is not", - "valueField": "null", - "comment": "if user is already enrolled", "hasComment": true, - "inRepeatBlock": "", - "hasSuccess": "", - "hasNoRepeat": false, - "hasRepeat": false, + "comment": "if user is already enrolled", "conditions": [ { "variable": "userTOTPSecretKey", @@ -964,435 +427,515 @@ } ] }, - "handles": [ - "Agama-when-Node-1f6a89df-661b-4baa-9419-78e755ba4b12.FAILURE", - "Agama-when-Node-1f6a89df-661b-4baa-9419-78e755ba4b12.SUCCESS" - ], - "skake": false + "id": "whenNode-a835b7af-9f6e-43fe-a9c1-37b644a976bb", + "type": "whenNode", + "position": { + "x": 2550, + "y": 200 + }, + "previousNodeId": "whenNode-ecaef5d5-3bf4-4993-8c69-07b8b6f29839", + "branching": "continue" }, - "selected": false, - "positionAbsolute": { - "x": 2510.9857243444826, - "y": 184.33303961236726 + "type": "whenNode", + "id": "whenNode-a835b7af-9f6e-43fe-a9c1-37b644a976bb", + "position": { + "x": 2550, + "y": 200 }, - "dragging": false + "measured": { + "width": 110, + "height": 59 + } }, { - "width": 170, - "height": 124, - "id": "Agama-call-Node-33690a15-4f77-4bb6-b3d3-6331b80904db", - "position": { - "x": 1143.1141316191488, - "y": 123.47282597234039 - }, - "type": "call", "data": { - "id": "Agama-call-Node-33690a15-4f77-4bb6-b3d3-6331b80904db", - "type": "Agama-call-Node", - "parentId": "Agama-assignment-Node-991ae6f6-437f-45ef-927e-51659e977511", - "whenCondition": "", - "inRepeatBlock": false, + "agamaData": { + "hasComment": true, + "conditions": [ + { + "variable": "checkOTPValid.success", + "operator": "is", + "dataValue": "true", + "combinator": "none" + } + ] + }, + "id": "whenNode-5c7c7167-a298-4ffe-9ea0-d7d4711f5b73", + "type": "whenNode", "position": { - "x": 1143.1141316191488, - "y": 123.47282597234039 + "x": 2800, + "y": 200 }, + "previousNodeId": "whenNode-a835b7af-9f6e-43fe-a9c1-37b644a976bb", + "branching": "continue" + }, + "type": "whenNode", + "id": "whenNode-5c7c7167-a298-4ffe-9ea0-d7d4711f5b73", + "position": { + "x": 2800, + "y": 200 + }, + "measured": { + "width": 110, + "height": 59 + } + }, + { + "data": { "agamaData": { - "id": "Agama-call-Node-33690a15-4f77-4bb6-b3d3-6331b80904db", - "parentId": "Agama-assignment-Node-991ae6f6-437f-45ef-927e-51659e977511", - "type": "Agama-call-Node", + "nodeIcon": "material-symbols:line-end-square-rounded", + "nodeColor": "#e3a5a5", "displayName": "", "hasComment": true, - "comment": "Get Instance TOTPService", - "javaClassName": "org.gluu.agama.totp.TOTPService", - "javaMethodName": "getInstance", - "javaVariableName": "org.gluu.agama.totp", - "exceptionVariableField": "E", - "callType": "Call static method", - "whenCondition": "", - "inRepeatBlock": false, - "arguments": [], - "nodeIcon": "material-symbols:code", - "asssignedVariableName": "OTPServiceObj" + "comment": "Login Failed", + "returnVariable": "login failed", + "finishMode": "withFailure" }, - "skake": false + "id": "finishNode-ff2a7315-3e65-4826-9950-432027e5d336", + "type": "finishNode", + "position": { + "x": 3050, + "y": 200 + }, + "previousNodeId": "whenNode-5c7c7167-a298-4ffe-9ea0-d7d4711f5b73", + "branching": "continue" }, - "selected": false, - "positionAbsolute": { - "x": 1143.1141316191488, - "y": 123.47282597234039 + "type": "finishNode", + "id": "finishNode-ff2a7315-3e65-4826-9950-432027e5d336", + "position": { + "x": 3050, + "y": 200 }, - "dragging": false + "measured": { + "width": 170, + "height": 124 + } }, { - "width": 170, - "height": 124, - "id": "Agama-call-Node-c9f0bffa-db46-4080-8661-c51de76a3ef5", - "position": { - "x": 245.99999999999977, - "y": 4.333333333333314 - }, - "type": "call", "data": { - "id": "Agama-call-Node-c9f0bffa-db46-4080-8661-c51de76a3ef5", - "type": "Agama-call-Node", - "parentId": "Agama-call-Node-33690a15-4f77-4bb6-b3d3-6331b80904db", - "whenCondition": "", - "inRepeatBlock": "", + "agamaData": { + "nodeIcon": "material-symbols:line-end-square-rounded", + "displayName": "", + "hasComment": true, + "comment": "finish with success userId", + "returnVariable": "{ userId: userId }", + "finishMode": "withSuccess" + }, + "id": "finishNode-c02eb0c5-51d2-4830-8798-43e4d4de1a5c", + "type": "finishNode", "position": { - "x": 245.99999999999977, - "y": 4.333333333333314 + "x": 3050, + "y": 450 }, + "previousNodeId": "whenNode-5c7c7167-a298-4ffe-9ea0-d7d4711f5b73", + "branching": "success" + }, + "type": "finishNode", + "id": "finishNode-c02eb0c5-51d2-4830-8798-43e4d4de1a5c", + "position": { + "x": 3050, + "y": 450 + }, + "measured": { + "width": 170, + "height": 124 + } + }, + { + "data": { "agamaData": { - "id": "Agama-call-Node-c9f0bffa-db46-4080-8661-c51de76a3ef5", - "parentId": "Agama-assignment-Node-991ae6f6-437f-45ef-927e-51659e977511", - "type": "Agama-call-Node", + "nodeIcon": "fluent-mdl2:trigger-approval", + "nodeColor": "#82dcdc", "displayName": "", "hasComment": true, - "comment": "Get User's TOTP Secret key", - "javaClassName": "org.gluu.agama.totp.IdentityProcessor", - "javaMethodName": "getUserTOTPSecretKey", - "javaVariableName": "OTPServiceObj", - "exceptionVariableField": "E", - "callType": "Call method on instance", - "whenCondition": "", - "inRepeatBlock": false, + "comment": "Trigger otp flow", + "flowFileName": "org.gluu.agama.totp.otp", "arguments": [ - "userId" + "userId", + "userTOTPSecretKey", + "qrCodeAlg" ], - "nodeIcon": "material-symbols:code", - "asssignedVariableName": "userTOTPSecretKey", - "nodeColor": "#84e1a5" + "asssignedVariableName": "checkOTPValid", + "exceptionVariableField": "E" + }, + "id": "triggerNode-d0570ca8-2cd5-4329-9cf2-74d307f5a9b4", + "type": "triggerNode", + "position": { + "x": 2800, + "y": 450 + }, + "previousNodeId": "whenNode-a835b7af-9f6e-43fe-a9c1-37b644a976bb", + "branching": "success" + }, + "type": "triggerNode", + "id": "triggerNode-d0570ca8-2cd5-4329-9cf2-74d307f5a9b4", + "position": { + "x": 2800, + "y": 450 + }, + "measured": { + "width": 170, + "height": 124 + } + }, + { + "data": { + "agamaData": { + "nodeIcon": "octicon:log-16", + "displayName": "", + "hasComment": true, + "comment": "Debug Log: result of OTP Check valid or not", + "logMessage": "\"checkOTPValid check otp \" checkOTPValid E", + "logLevel": "debug" + }, + "id": "logNode-03a6300a-bff6-4c66-8935-f111bbd57ea3", + "type": "logNode", + "position": { + "x": 3050, + "y": 450 }, - "skake": false + "previousNodeId": "triggerNode-d0570ca8-2cd5-4329-9cf2-74d307f5a9b4" }, - "selected": false, - "positionAbsolute": { - "x": 1389.1141316191486, - "y": 127.8061593056737 + "type": "logNode", + "id": "logNode-03a6300a-bff6-4c66-8935-f111bbd57ea3", + "position": { + "x": 3050, + "y": 450 }, - "dragging": false, - "parentId": "Agama-call-Node-33690a15-4f77-4bb6-b3d3-6331b80904db", - "whenCondition": "", - "inRepeatBlock": "" + "measured": { + "width": 170, + "height": 124 + } } ], "edges": [ { - "id": "Agama-start-Flow-5e5f716c-d68a-48fe-9ab3-ce1d4292176e-Agama-log-Node-cb7fc7cb-a84c-4c28-aea3-e9d7bbf1683a-268e49ad-90e8-43df-8170-a036e93bdde6", - "type": "straight", - "source": "Agama-start-Flow-5e5f716c-d68a-48fe-9ab3-ce1d4292176e", - "target": "Agama-log-Node-cb7fc7cb-a84c-4c28-aea3-e9d7bbf1683a", - "label": "", + "id": "startNode-256a016a-8edc-4e1d-8174-66c371176bb7-logNode-e2f7f3db-6944-4eb0-8de3-4ae5f36ab64a", + "type": "default", + "source": "startNode-256a016a-8edc-4e1d-8174-66c371176bb7", + "target": "logNode-e2f7f3db-6944-4eb0-8de3-4ae5f36ab64a", "labelBgPadding": [ 8, 4 ], "labelBgBorderRadius": 4, - "labelBgStyle": { - "fill": "#FFCC00", - "color": "#fff", - "fillOpacity": 0.7 - } - }, - { - "id": "Agama-log-Node-cb7fc7cb-a84c-4c28-aea3-e9d7bbf1683a-Agama-trigger-Node-e55136b1-e061-4ca6-9a25-05afeb5e2d8b-40284e17-518c-4a8e-850f-9a2528d70c19", - "type": "straight", - "source": "Agama-log-Node-cb7fc7cb-a84c-4c28-aea3-e9d7bbf1683a", - "target": "Agama-trigger-Node-e55136b1-e061-4ca6-9a25-05afeb5e2d8b", "label": "", - "labelBgPadding": [ - 8, - 4 - ], - "labelBgBorderRadius": 4, "labelBgStyle": { - "fill": "#FFCC00", - "color": "#fff", + "fill": "#009688", + "color": "#ffffff", "fillOpacity": 0.7 - } + }, + "labelShowBg": true, + "sourceHandle": "source_startNode-256a016a-8edc-4e1d-8174-66c371176bb7" }, { - "id": "Agama-trigger-Node-e55136b1-e061-4ca6-9a25-05afeb5e2d8b-Agama-log-Node-9d24eef3-4e4c-4647-a215-407f7fb0b575-9faceb8c-8b66-4610-9ef9-a7b9afe9f8bd", - "type": "straight", - "source": "Agama-trigger-Node-e55136b1-e061-4ca6-9a25-05afeb5e2d8b", - "target": "Agama-log-Node-9d24eef3-4e4c-4647-a215-407f7fb0b575", - "label": "", + "id": "logNode-e2f7f3db-6944-4eb0-8de3-4ae5f36ab64a-triggerNode-a6a86da6-c7f4-414d-b485-455159fe9f9a", + "type": "default", + "source": "logNode-e2f7f3db-6944-4eb0-8de3-4ae5f36ab64a", + "target": "triggerNode-a6a86da6-c7f4-414d-b485-455159fe9f9a", "labelBgPadding": [ 8, 4 ], "labelBgBorderRadius": 4, + "label": "", "labelBgStyle": { - "fill": "#FFCC00", - "color": "#fff", + "fill": "#009688", + "color": "#ffffff", "fillOpacity": 0.7 - } + }, + "labelShowBg": true, + "sourceHandle": "source_logNode-e2f7f3db-6944-4eb0-8de3-4ae5f36ab64a" }, { - "id": "Agama-log-Node-9d24eef3-4e4c-4647-a215-407f7fb0b575-Agama-assignment-Node-991ae6f6-437f-45ef-927e-51659e977511-8fba0726-bde4-489f-a4e7-91b8b29a756c", - "type": "straight", - "source": "Agama-log-Node-9d24eef3-4e4c-4647-a215-407f7fb0b575", - "target": "Agama-assignment-Node-991ae6f6-437f-45ef-927e-51659e977511", - "label": "", + "id": "triggerNode-a6a86da6-c7f4-414d-b485-455159fe9f9a-logNode-4abb6e5b-6a7e-4348-837c-9e2f5e77cc24", + "type": "default", + "source": "triggerNode-a6a86da6-c7f4-414d-b485-455159fe9f9a", + "target": "logNode-4abb6e5b-6a7e-4348-837c-9e2f5e77cc24", "labelBgPadding": [ 8, 4 ], "labelBgBorderRadius": 4, + "label": "", "labelBgStyle": { - "fill": "#FFCC00", - "color": "#fff", + "fill": "#009688", + "color": "#ffffff", "fillOpacity": 0.7 - } + }, + "labelShowBg": true, + "sourceHandle": "source_triggerNode-a6a86da6-c7f4-414d-b485-455159fe9f9a" }, { - "id": "Agama-log-Node-2b76cda3-0e65-41ad-936b-0c9b32cf705c-Agama-call-Node-c9f0bffa-db46-4080-8661-c51de76a3ef5-be2b7fb6-c92c-427d-9972-ac2d2177d617", - "type": "straight", - "source": "Agama-log-Node-2b76cda3-0e65-41ad-936b-0c9b32cf705c", - "target": "Agama-call-Node-c9f0bffa-db46-4080-8661-c51de76a3ef5", - "label": "", + "id": "logNode-4abb6e5b-6a7e-4348-837c-9e2f5e77cc24-assignmentNode-004732ff-e1f4-4193-bf57-1e32bb70882e", + "type": "default", + "source": "logNode-4abb6e5b-6a7e-4348-837c-9e2f5e77cc24", + "target": "assignmentNode-004732ff-e1f4-4193-bf57-1e32bb70882e", "labelBgPadding": [ 8, 4 ], "labelBgBorderRadius": 4, + "label": "", "labelBgStyle": { - "fill": "#FFCC00", - "color": "#fff", + "fill": "#009688", + "color": "#ffffff", "fillOpacity": 0.7 - } + }, + "labelShowBg": true, + "sourceHandle": "source_logNode-4abb6e5b-6a7e-4348-837c-9e2f5e77cc24" }, { - "id": "Agama-call-Node-c9f0bffa-db46-4080-8661-c51de76a3ef5-Agama-log-Node-9e877173-94de-48c1-a807-cde1025de181-fa5bc755-0472-47a9-82a5-b8bf55dcc05d", - "type": "straight", - "source": "Agama-call-Node-c9f0bffa-db46-4080-8661-c51de76a3ef5", - "target": "Agama-log-Node-9e877173-94de-48c1-a807-cde1025de181", - "label": "", + "id": "assignmentNode-004732ff-e1f4-4193-bf57-1e32bb70882e-callNode-08e265f0-8d42-4f9c-ace8-a97bb5095cc4", + "type": "default", + "source": "assignmentNode-004732ff-e1f4-4193-bf57-1e32bb70882e", + "target": "callNode-08e265f0-8d42-4f9c-ace8-a97bb5095cc4", "labelBgPadding": [ 8, 4 ], "labelBgBorderRadius": 4, + "label": "", "labelBgStyle": { - "fill": "#FFCC00", - "color": "#fff", + "fill": "#009688", + "color": "#ffffff", "fillOpacity": 0.7 - } + }, + "labelShowBg": true, + "sourceHandle": "source_assignmentNode-004732ff-e1f4-4193-bf57-1e32bb70882e" }, { - "id": "Agama-when-Node-4fa47f26-e1e3-4d4f-b40d-31de2ff74da4-Agama-trigger-Node-8c3bb0a9-9b1f-4b34-9039-dd6e3463545d-a524dd71-c69a-4e9d-bf6d-654b0bfc1126", - "type": "straight", - "source": "Agama-when-Node-4fa47f26-e1e3-4d4f-b40d-31de2ff74da4", - "target": "Agama-trigger-Node-8c3bb0a9-9b1f-4b34-9039-dd6e3463545d", - "label": "Condition met", + "id": "callNode-08e265f0-8d42-4f9c-ace8-a97bb5095cc4-callNode-d9aec55a-a089-4177-9e8e-2d213c60fa78", + "type": "default", + "source": "callNode-08e265f0-8d42-4f9c-ace8-a97bb5095cc4", + "target": "callNode-d9aec55a-a089-4177-9e8e-2d213c60fa78", "labelBgPadding": [ 8, 4 ], "labelBgBorderRadius": 4, + "label": "", "labelBgStyle": { - "fill": "#FFCC00", - "color": "#fff", + "fill": "#009688", + "color": "#ffffff", "fillOpacity": 0.7 }, - "sourceHandle": "Agama-when-Node-4fa47f26-e1e3-4d4f-b40d-31de2ff74da4.SUCCESS" + "labelShowBg": true, + "sourceHandle": "source_callNode-08e265f0-8d42-4f9c-ace8-a97bb5095cc4" }, { - "id": "Agama-trigger-Node-8c3bb0a9-9b1f-4b34-9039-dd6e3463545d-Agama-log-Node-16203684-77dd-42fe-9f40-783cb4047118-d1ef50cc-ec39-443b-9cee-05afec9452eb", - "type": "straight", - "source": "Agama-trigger-Node-8c3bb0a9-9b1f-4b34-9039-dd6e3463545d", - "target": "Agama-log-Node-16203684-77dd-42fe-9f40-783cb4047118", - "label": "", + "id": "callNode-d9aec55a-a089-4177-9e8e-2d213c60fa78-logNode-f9c9c957-f7c1-462d-9c00-b53d340cef78", + "type": "default", + "source": "callNode-d9aec55a-a089-4177-9e8e-2d213c60fa78", + "target": "logNode-f9c9c957-f7c1-462d-9c00-b53d340cef78", "labelBgPadding": [ 8, 4 ], "labelBgBorderRadius": 4, + "label": "", "labelBgStyle": { - "fill": "#FFCC00", - "color": "#fff", + "fill": "#009688", + "color": "#ffffff", "fillOpacity": 0.7 - } + }, + "labelShowBg": true, + "sourceHandle": "source_callNode-d9aec55a-a089-4177-9e8e-2d213c60fa78" }, { - "id": "Agama-log-Node-9e877173-94de-48c1-a807-cde1025de181-Agama-assignment-Node-8fd47c3f-713f-44bd-a54e-23a8c291d312-d74b5ede-da3d-4374-9c61-48b547291131", - "type": "straight", - "source": "Agama-log-Node-9e877173-94de-48c1-a807-cde1025de181", - "target": "Agama-assignment-Node-8fd47c3f-713f-44bd-a54e-23a8c291d312", - "label": "", + "id": "logNode-f9c9c957-f7c1-462d-9c00-b53d340cef78-assignmentNode-2e1ae400-7432-4e6a-ab99-a51be027557e", + "type": "default", + "source": "logNode-f9c9c957-f7c1-462d-9c00-b53d340cef78", + "target": "assignmentNode-2e1ae400-7432-4e6a-ab99-a51be027557e", "labelBgPadding": [ 8, 4 ], "labelBgBorderRadius": 4, + "label": "", "labelBgStyle": { - "fill": "#FFCC00", - "color": "#fff", + "fill": "#009688", + "color": "#ffffff", "fillOpacity": 0.7 - } + }, + "labelShowBg": true, + "sourceHandle": "source_logNode-f9c9c957-f7c1-462d-9c00-b53d340cef78" }, { - "id": "Agama-assignment-Node-8fd47c3f-713f-44bd-a54e-23a8c291d312-Agama-when-Node-4fa47f26-e1e3-4d4f-b40d-31de2ff74da4-36693941-878e-48b1-b1e7-f4fd159410c6", - "type": "straight", - "source": "Agama-assignment-Node-8fd47c3f-713f-44bd-a54e-23a8c291d312", - "target": "Agama-when-Node-4fa47f26-e1e3-4d4f-b40d-31de2ff74da4", - "label": "", + "id": "assignmentNode-2e1ae400-7432-4e6a-ab99-a51be027557e-whenNode-ecaef5d5-3bf4-4993-8c69-07b8b6f29839", + "type": "default", + "source": "assignmentNode-2e1ae400-7432-4e6a-ab99-a51be027557e", + "target": "whenNode-ecaef5d5-3bf4-4993-8c69-07b8b6f29839", "labelBgPadding": [ 8, 4 ], "labelBgBorderRadius": 4, + "label": "", "labelBgStyle": { - "fill": "#FFCC00", - "color": "#fff", + "fill": "#009688", + "color": "#ffffff", "fillOpacity": 0.7 - } + }, + "labelShowBg": true, + "sourceHandle": "source_assignmentNode-2e1ae400-7432-4e6a-ab99-a51be027557e" }, { - "id": "Agama-when-Node-4fa47f26-e1e3-4d4f-b40d-31de2ff74da4-Agama-when-Node-1f6a89df-661b-4baa-9419-78e755ba4b12-aa08173f-928f-4b11-ad6d-aa5b8104d31a", - "type": "straight", - "source": "Agama-when-Node-4fa47f26-e1e3-4d4f-b40d-31de2ff74da4", - "target": "Agama-when-Node-1f6a89df-661b-4baa-9419-78e755ba4b12", - "label": "", + "id": "whenNode-ecaef5d5-3bf4-4993-8c69-07b8b6f29839-triggerNode-424a955c-526f-4902-be06-bf03d157cad1", + "type": "default", + "source": "whenNode-ecaef5d5-3bf4-4993-8c69-07b8b6f29839", + "target": "triggerNode-424a955c-526f-4902-be06-bf03d157cad1", "labelBgPadding": [ 8, 4 ], "labelBgBorderRadius": 4, + "label": "Condition met", "labelBgStyle": { - "fill": "#FFCC00", - "color": "#fff", + "fill": "#009688", + "color": "#ffffff", "fillOpacity": 0.7 }, - "sourceHandle": "Agama-when-Node-4fa47f26-e1e3-4d4f-b40d-31de2ff74da4.FAILURE" + "labelShowBg": true, + "sourceHandle": "source_whenNode-ecaef5d5-3bf4-4993-8c69-07b8b6f29839_success" }, { - "id": "Agama-when-Node-1f6a89df-661b-4baa-9419-78e755ba4b12-Agama-trigger-Node-030c7c0d-f0cc-44f3-ba67-ca99c7a01793-5f8f094b-27d9-4828-8ca7-83b79ef0a604", - "type": "straight", - "source": "Agama-when-Node-1f6a89df-661b-4baa-9419-78e755ba4b12", - "target": "Agama-trigger-Node-030c7c0d-f0cc-44f3-ba67-ca99c7a01793", - "label": "Condition met", + "id": "triggerNode-424a955c-526f-4902-be06-bf03d157cad1-logNode-5b106624-c9ae-4d9c-bbf7-ed666afb39e2", + "type": "default", + "source": "triggerNode-424a955c-526f-4902-be06-bf03d157cad1", + "target": "logNode-5b106624-c9ae-4d9c-bbf7-ed666afb39e2", "labelBgPadding": [ 8, 4 ], "labelBgBorderRadius": 4, + "label": "", "labelBgStyle": { - "fill": "#FFCC00", - "color": "#fff", + "fill": "#009688", + "color": "#ffffff", "fillOpacity": 0.7 }, - "sourceHandle": "Agama-when-Node-1f6a89df-661b-4baa-9419-78e755ba4b12.SUCCESS" + "labelShowBg": true, + "sourceHandle": "source_triggerNode-424a955c-526f-4902-be06-bf03d157cad1" }, { - "id": "Agama-trigger-Node-030c7c0d-f0cc-44f3-ba67-ca99c7a01793-Agama-log-Node-a2d8e474-a1c6-4bbd-8ff7-0132e5a500f4-139d3f51-0254-4973-ad51-212b6b8b6dd5", - "type": "straight", - "source": "Agama-trigger-Node-030c7c0d-f0cc-44f3-ba67-ca99c7a01793", - "target": "Agama-log-Node-a2d8e474-a1c6-4bbd-8ff7-0132e5a500f4", - "label": "", + "id": "whenNode-ecaef5d5-3bf4-4993-8c69-07b8b6f29839-whenNode-a835b7af-9f6e-43fe-a9c1-37b644a976bb", + "type": "default", + "source": "whenNode-ecaef5d5-3bf4-4993-8c69-07b8b6f29839", + "target": "whenNode-a835b7af-9f6e-43fe-a9c1-37b644a976bb", "labelBgPadding": [ 8, 4 ], "labelBgBorderRadius": 4, + "label": "continue", "labelBgStyle": { - "fill": "#FFCC00", - "color": "#fff", + "fill": "#009688", + "color": "#ffffff", "fillOpacity": 0.7 - } + }, + "labelShowBg": true, + "sourceHandle": "source_whenNode-ecaef5d5-3bf4-4993-8c69-07b8b6f29839_continue" }, { - "id": "Agama-when-Node-1f6a89df-661b-4baa-9419-78e755ba4b12-Agama-when-Node-c30bebbf-7ce3-4fa3-9743-cf10643dd99c-6191657b-875f-44d5-987a-0d20085b4736", - "type": "straight", - "source": "Agama-when-Node-1f6a89df-661b-4baa-9419-78e755ba4b12", - "target": "Agama-when-Node-c30bebbf-7ce3-4fa3-9743-cf10643dd99c", - "label": "", + "id": "whenNode-a835b7af-9f6e-43fe-a9c1-37b644a976bb-whenNode-5c7c7167-a298-4ffe-9ea0-d7d4711f5b73", + "type": "default", + "source": "whenNode-a835b7af-9f6e-43fe-a9c1-37b644a976bb", + "target": "whenNode-5c7c7167-a298-4ffe-9ea0-d7d4711f5b73", "labelBgPadding": [ 8, 4 ], "labelBgBorderRadius": 4, + "label": "continue", "labelBgStyle": { - "fill": "#FFCC00", - "color": "#fff", + "fill": "#009688", + "color": "#ffffff", "fillOpacity": 0.7 }, - "sourceHandle": "Agama-when-Node-1f6a89df-661b-4baa-9419-78e755ba4b12.FAILURE" + "labelShowBg": true, + "sourceHandle": "source_whenNode-a835b7af-9f6e-43fe-a9c1-37b644a976bb_continue" }, { - "id": "Agama-when-Node-c30bebbf-7ce3-4fa3-9743-cf10643dd99c-finish-079dd42a-f314-4145-9de9-2196d01548c5-dd800ea5-0e55-4ce3-98c9-4072affe14e7", - "type": "straight", - "source": "Agama-when-Node-c30bebbf-7ce3-4fa3-9743-cf10643dd99c", - "target": "finish-079dd42a-f314-4145-9de9-2196d01548c5", - "label": "Condition met", + "id": "whenNode-5c7c7167-a298-4ffe-9ea0-d7d4711f5b73-finishNode-ff2a7315-3e65-4826-9950-432027e5d336", + "type": "default", + "source": "whenNode-5c7c7167-a298-4ffe-9ea0-d7d4711f5b73", + "target": "finishNode-ff2a7315-3e65-4826-9950-432027e5d336", "labelBgPadding": [ 8, 4 ], "labelBgBorderRadius": 4, + "label": "continue", "labelBgStyle": { - "fill": "#FFCC00", - "color": "#fff", + "fill": "#009688", + "color": "#ffffff", "fillOpacity": 0.7 }, - "sourceHandle": "Agama-when-Node-c30bebbf-7ce3-4fa3-9743-cf10643dd99c.SUCCESS" + "labelShowBg": true, + "sourceHandle": "source_whenNode-5c7c7167-a298-4ffe-9ea0-d7d4711f5b73_continue" }, { - "id": "Agama-when-Node-c30bebbf-7ce3-4fa3-9743-cf10643dd99c-finish-f6988b05-6a38-40d3-8ef2-b3512d4b681a-56cd7e42-5235-4113-a2d9-0e38d2c9b069", - "type": "straight", - "source": "Agama-when-Node-c30bebbf-7ce3-4fa3-9743-cf10643dd99c", - "target": "finish-f6988b05-6a38-40d3-8ef2-b3512d4b681a", - "label": "", + "id": "whenNode-5c7c7167-a298-4ffe-9ea0-d7d4711f5b73-finishNode-c02eb0c5-51d2-4830-8798-43e4d4de1a5c", + "type": "default", + "source": "whenNode-5c7c7167-a298-4ffe-9ea0-d7d4711f5b73", + "target": "finishNode-c02eb0c5-51d2-4830-8798-43e4d4de1a5c", "labelBgPadding": [ 8, 4 ], "labelBgBorderRadius": 4, + "label": "Condition met", "labelBgStyle": { - "fill": "#FFCC00", - "color": "#fff", + "fill": "#009688", + "color": "#ffffff", "fillOpacity": 0.7 }, - "sourceHandle": "Agama-when-Node-c30bebbf-7ce3-4fa3-9743-cf10643dd99c.FAILURE" + "labelShowBg": true, + "sourceHandle": "source_whenNode-5c7c7167-a298-4ffe-9ea0-d7d4711f5b73_success" }, { - "id": "Agama-assignment-Node-991ae6f6-437f-45ef-927e-51659e977511-Agama-call-Node-33690a15-4f77-4bb6-b3d3-6331b80904db-4de281c5-3721-4be3-8c90-5a897e675661", - "type": "straight", - "source": "Agama-assignment-Node-991ae6f6-437f-45ef-927e-51659e977511", - "target": "Agama-call-Node-33690a15-4f77-4bb6-b3d3-6331b80904db", - "label": "", + "id": "whenNode-a835b7af-9f6e-43fe-a9c1-37b644a976bb-triggerNode-d0570ca8-2cd5-4329-9cf2-74d307f5a9b4", + "type": "default", + "source": "whenNode-a835b7af-9f6e-43fe-a9c1-37b644a976bb", + "target": "triggerNode-d0570ca8-2cd5-4329-9cf2-74d307f5a9b4", "labelBgPadding": [ 8, 4 ], "labelBgBorderRadius": 4, + "label": "Condition met", "labelBgStyle": { - "fill": "#FFCC00", - "color": "#fff", + "fill": "#009688", + "color": "#ffffff", "fillOpacity": 0.7 - } + }, + "labelShowBg": true, + "sourceHandle": "source_whenNode-a835b7af-9f6e-43fe-a9c1-37b644a976bb_success" }, { - "id": "Agama-call-Node-33690a15-4f77-4bb6-b3d3-6331b80904db-Agama-call-Node-c9f0bffa-db46-4080-8661-c51de76a3ef5-76870bc9-3ed5-4620-b07a-8d823bbc419e", - "type": "straight", - "source": "Agama-call-Node-33690a15-4f77-4bb6-b3d3-6331b80904db", - "target": "Agama-call-Node-c9f0bffa-db46-4080-8661-c51de76a3ef5", - "label": "", + "id": "triggerNode-d0570ca8-2cd5-4329-9cf2-74d307f5a9b4-logNode-03a6300a-bff6-4c66-8935-f111bbd57ea3", + "type": "default", + "source": "triggerNode-d0570ca8-2cd5-4329-9cf2-74d307f5a9b4", + "target": "logNode-03a6300a-bff6-4c66-8935-f111bbd57ea3", "labelBgPadding": [ 8, 4 ], "labelBgBorderRadius": 4, + "label": "", "labelBgStyle": { - "fill": "#FFCC00", - "color": "#fff", + "fill": "#009688", + "color": "#ffffff", "fillOpacity": 0.7 - } + }, + "labelShowBg": true, + "sourceHandle": "source_triggerNode-d0570ca8-2cd5-4329-9cf2-74d307f5a9b4" } ], "viewport": { - "x": -921.6000000000004, - "y": 94, - "zoom": 0.75 + "x": 0, + "y": 0, + "zoom": 1 } } \ No newline at end of file From 60ea618084a29f9f78f14813cee951ed2937ad87 Mon Sep 17 00:00:00 2001 From: Kiran Mali <39133739+kdhttps@users.noreply.github.com> Date: Tue, 19 Nov 2024 18:44:06 +0530 Subject: [PATCH 23/32] refactor: update org.gluu.agama.totp.main.flow --- code/org.gluu.agama.totp.main.flow | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/org.gluu.agama.totp.main.flow b/code/org.gluu.agama.totp.main.flow index 5223370..1b77312 100644 --- a/code/org.gluu.agama.totp.main.flow +++ b/code/org.gluu.agama.totp.main.flow @@ -36,8 +36,8 @@ When userTOTPSecretKey is not null Log "@debug checkOTPValid check otp " checkOTPValid E When checkOTPValid.success is true // finish with success userId - it_gvqly = {success:true, data: { userId: userId }} - Finish it_gvqly + it_cinem = {success:true, data: { userId: userId }} + Finish it_cinem // Login Failed -it_imyht = {success:false, error: "login failed"} -Finish it_imyht \ No newline at end of file +it_togug = {success:false, error: "login failed"} +Finish it_togug \ No newline at end of file From 2da9ce5acba5dd17acaf78bbb632bd192e167e1a Mon Sep 17 00:00:00 2001 From: Kiran Mali <39133739+kdhttps@users.noreply.github.com> Date: Tue, 19 Nov 2024 18:49:59 +0530 Subject: [PATCH 24/32] feat: update project.json From b946fb6078f4986d8d1a6525fb831131e2611828 Mon Sep 17 00:00:00 2001 From: Kiran Mali <39133739+kdhttps@users.noreply.github.com> Date: Tue, 19 Nov 2024 18:50:02 +0530 Subject: [PATCH 25/32] refactor: update org.gluu.agama.totp.enroll.json --- code/org.gluu.agama.totp.enroll.json | 1258 ++++++++++---------------- 1 file changed, 463 insertions(+), 795 deletions(-) diff --git a/code/org.gluu.agama.totp.enroll.json b/code/org.gluu.agama.totp.enroll.json index cda6995..e640af6 100644 --- a/code/org.gluu.agama.totp.enroll.json +++ b/code/org.gluu.agama.totp.enroll.json @@ -1,462 +1,305 @@ { "nodes": [ { - "width": 270, - "height": 42, - "id": "Agama-note-0a4e2063-088d-458a-98b1-a5ebe715e024", - "position": { - "x": 2155.2228507664195, - "y": 351.48403188743856 - }, - "type": "notes", "data": { - "id": "Agama-note-0a4e2063-088d-458a-98b1-a5ebe715e024", - "type": "Agama-note", - "notes": "If OTP is valid then save SecretKey into User jansExtUid", - "position": { - "x": 2155.2228507664195, - "y": 351.48403188743856 + "agamaData": { + "isTopLevelFlow": false, + "basepath": "", + "configParams": "{}", + "creationDate": "19/11/2024", + "nodeIcon": "material-symbols:line-start-square", + "timeout": "", + "inputs": "userId qrCodeAlg qrCodeKeyLength qrCodeLabel qrCodeIssuer", + "configs": "", + "flowname": "org.gluu.agama.totp.enroll", + "displayName": "gluu agama otp enroll", + "hasComment": true, + "comment": "" }, - "skake": false - }, - "selected": false, - "positionAbsolute": { - "x": 2155.2228507664195, - "y": 351.48403188743856 - }, - "dragging": false - }, - { - "width": 270, - "height": 55, - "id": "Agama-note-96f603aa-f195-4936-b99c-59a8015f3c70", - "position": { - "x": 2283.9085937500004, - "y": -20 - }, - "type": "notes", - "data": { - "id": "Agama-note-96f603aa-f195-4936-b99c-59a8015f3c70", - "type": "Agama-note", - "notes": "Condition to check OTP is valid or not. If valid then only save SecretKey to user", + "id": "startNode-955462a4-7aa9-43e2-9c49-0a34648c9289", + "type": "startNode", "position": { - "x": 2283.9085937500004, - "y": -20 - }, - "skake": false + "x": 50, + "y": 200 + } }, - "selected": false, - "positionAbsolute": { - "x": 2283.9085937500004, - "y": -20 + "type": "startNode", + "id": "startNode-955462a4-7aa9-43e2-9c49-0a34648c9289", + "position": { + "x": 50, + "y": 200 }, - "dragging": false + "measured": { + "width": 170, + "height": 124 + } }, { - "width": 270, - "height": 42, - "id": "Agama-note-59cb6a8d-e4d5-47e1-bb4a-d1dca0682a4a", - "position": { - "x": 53, - "y": -15 - }, - "type": "notes", "data": { - "id": "Agama-note-59cb6a8d-e4d5-47e1-bb4a-d1dca0682a4a", - "type": "Agama-note", - "notes": "Flow to enroll user for TOTP 2FA authentication", + "agamaData": { + "nodeIcon": "octicon:log-16", + "displayName": "", + "hasComment": true, + "comment": "Starting otp enrollment flow", + "logMessage": "\"otp enrollment for user \" userId", + "logLevel": "debug" + }, + "id": "logNode-684c4bdf-6911-41ef-bf22-1996899bc390", + "type": "logNode", "position": { - "x": 53, - "y": -15 + "x": 300, + "y": 200 }, - "skake": false + "previousNodeId": "startNode-955462a4-7aa9-43e2-9c49-0a34648c9289" }, - "selected": false, - "positionAbsolute": { - "x": 53, - "y": -15 + "type": "logNode", + "id": "logNode-684c4bdf-6911-41ef-bf22-1996899bc390", + "position": { + "x": 300, + "y": 200 }, - "dragging": false + "measured": { + "width": 170, + "height": 124 + } }, { - "width": 170, - "height": 124, - "id": "Agama-log-Node-6d5003bb-7835-4d3e-999d-8906ec1bd2aa", - "position": { - "x": 2788, - "y": 337 - }, - "type": "log", "data": { - "id": "Agama-log-Node-6d5003bb-7835-4d3e-999d-8906ec1bd2aa", - "type": "Agama-log-Node", - "parentId": "Agama-call-Node-0dd8b848-b129-4534-a25a-c15c92d00be0", - "whenCondition": "", - "inRepeatBlock": "", - "position": { - "x": 2788, - "y": 337 - }, "agamaData": { - "id": "Agama-log-Node-6d5003bb-7835-4d3e-999d-8906ec1bd2aa", - "parentId": "Agama-call-Node-0dd8b848-b129-4534-a25a-c15c92d00be0", - "type": "Agama-log-Node", + "nodeIcon": "material-symbols:code", "displayName": "", "hasComment": true, - "comment": "Debug log user save data result", - "whenCondition": "", - "inRepeatBlock": "", - "logMessage": "\"user saved data \" userSavedData E", - "logLevel": "debug", - "nodeIcon": "octicon:log-16" + "comment": "Get Instance TOTPService", + "javaClassName": "org.gluu.agama.totp.TOTPService", + "javaMethodName": "getInstance", + "javaVariableName": "", + "exceptionVariableField": "E", + "callType": "Call static method", + "arguments": [], + "asssignedVariableName": "OTPServiceObj" }, - "skake": false + "id": "callNode-de4c8647-dda3-4736-941c-0300a9d549a7", + "type": "callNode", + "position": { + "x": 550, + "y": 200 + }, + "previousNodeId": "logNode-684c4bdf-6911-41ef-bf22-1996899bc390" + }, + "type": "callNode", + "id": "callNode-de4c8647-dda3-4736-941c-0300a9d549a7", + "position": { + "x": 550, + "y": 200 }, - "selected": false, - "dragging": false, - "positionAbsolute": { - "x": 2788, - "y": 337 + "measured": { + "width": 170, + "height": 124 } }, { - "width": 170, - "height": 124, - "id": "Agama-call-Node-0dd8b848-b129-4534-a25a-c15c92d00be0", - "position": { - "x": 2588, - "y": 337 - }, - "type": "call", "data": { - "id": "Agama-call-Node-0dd8b848-b129-4534-a25a-c15c92d00be0", - "type": "Agama-call-Node", - "parentId": "Agama-when-Node-075b4409-18d1-47bd-85fe-24b4aefbcc20", - "whenCondition": "WhenTrue", - "inRepeatBlock": "", - "position": { - "x": 2588, - "y": 337 - }, "agamaData": { - "id": "Agama-call-Node-0dd8b848-b129-4534-a25a-c15c92d00be0", - "parentId": "Agama-when-Node-075b4409-18d1-47bd-85fe-24b4aefbcc20", - "type": "Agama-call-Node", + "nodeIcon": "material-symbols:code", + "nodeColor": "#92e8a3", "displayName": "", "hasComment": true, - "comment": "Save secret key to user", - "javaClassName": "org.gluu.agama.totp.IdentityProcessor", - "javaMethodName": "linkUser", + "comment": "Generate secret key ", + "javaClassName": "org.gluu.agama.totp.TOTPUtil", + "javaMethodName": "generateSecretKey", "javaVariableName": "OTPServiceObj", - "exceptionVariableField": "E", + "exceptionVariableField": "", "callType": "Call method on instance", - "whenCondition": "WhenTrue", - "inRepeatBlock": "", "arguments": [ - "userId", - "secretKey" + "qrCodeKeyLength" ], - "nodeIcon": "material-symbols:code", - "asssignedVariableName": "userSavedData" + "asssignedVariableName": "secretKey" }, - "skake": false - }, - "selected": false, - "dragging": false, - "positionAbsolute": { - "x": 2588, - "y": 337 - } - }, - { - "width": 170, - "height": 124, - "id": "Agama-log-Node-441636e3-14cb-468e-bae0-0572444eb30c", - "position": { - "x": 1772.666666666667, - "y": 62.666666666666686 - }, - "type": "log", - "data": { - "id": "Agama-log-Node-441636e3-14cb-468e-bae0-0572444eb30c", - "type": "Agama-log-Node", - "parentId": "Agama-rrf-Node-2fb5c7e5-ecbf-4c82-8e15-822c5105d11a", - "whenCondition": "", - "inRepeatBlock": "", + "id": "callNode-8119ce51-3568-4ba5-95f7-0d0030548a79", + "type": "callNode", "position": { - "x": 1772.666666666667, - "y": 62.666666666666686 - }, - "agamaData": { - "id": "Agama-log-Node-441636e3-14cb-468e-bae0-0572444eb30c", - "parentId": "Agama-rrf-Node-2fb5c7e5-ecbf-4c82-8e15-822c5105d11a", - "type": "Agama-log-Node", - "displayName": "", - "hasComment": true, - "comment": "Debug Log OTP code entered by user", - "whenCondition": "", - "inRepeatBlock": "", - "logMessage": "\"scan code : \" scanCode.code", - "logLevel": "debug", - "nodeIcon": "octicon:log-16" + "x": 800, + "y": 200 }, - "skake": false + "previousNodeId": "callNode-de4c8647-dda3-4736-941c-0300a9d549a7" + }, + "type": "callNode", + "id": "callNode-8119ce51-3568-4ba5-95f7-0d0030548a79", + "position": { + "x": 800, + "y": 200 }, - "selected": false, - "dragging": false, - "positionAbsolute": { - "x": 1772.666666666667, - "y": 62.666666666666686 + "measured": { + "width": 170, + "height": 124 } }, { - "width": 170, - "height": 124, - "id": "Agama-log-Node-dc952936-0fc5-48dd-b663-a6eb20014b90", - "position": { - "x": 273, - "y": 76 - }, - "type": "log", "data": { - "id": "Agama-log-Node-dc952936-0fc5-48dd-b663-a6eb20014b90", - "type": "Agama-log-Node", - "parentId": "Agama-start-Flow-5e5f716c-d68a-48fe-9ab3-ce1d4292176e", - "whenCondition": "", - "inRepeatBlock": false, - "position": { - "x": 273, - "y": 76 - }, "agamaData": { - "id": "Agama-log-Node-dc952936-0fc5-48dd-b663-a6eb20014b90", - "parentId": "Agama-start-Flow-5e5f716c-d68a-48fe-9ab3-ce1d4292176e", - "type": "Agama-log-Node", + "nodeIcon": "material-symbols:code", "displayName": "", "hasComment": true, - "comment": "Starting otp enrollment flow", - "whenCondition": "", - "inRepeatBlock": false, - "logMessage": "\"otp enrollment for user \" userId", - "logLevel": "debug", - "nodeIcon": "octicon:log-16", - "hasSuccess": "", - "hasFailure": "", - "hasNoRepeat": false, - "hasRepeat": false + "comment": "Generate Secret code URI for QR Code", + "javaClassName": "org.gluu.agama.totp.TOTPUtil", + "javaMethodName": "generateTotpSecretKeyUri", + "javaVariableName": "OTPServiceObj", + "exceptionVariableField": "E", + "callType": "Call method on instance", + "arguments": [ + "secretKey", + "qrCodeIssuer", + "userId" + ], + "asssignedVariableName": "secretKeyUri" }, - "skake": false - }, - "selected": false, - "dragging": false, - "positionAbsolute": { - "x": 273, - "y": 76 - } - }, - { - "width": 170, - "height": 124, - "id": "Agama-start-Flow-5e5f716c-d68a-48fe-9ab3-ce1d4292176e", - "type": "start", - "sourcePosition": "right", - "data": { - "id": "Agama-start-Flow-5e5f716c-d68a-48fe-9ab3-ce1d4292176e", - "type": "Agama-start-Flow", + "id": "callNode-6b8bb87b-4d30-4364-a98c-db4d4eb4b0b2", + "type": "callNode", "position": { - "x": 73, - "y": 76 - }, - "inRepeatBlock": false, - "agamaData": { - "id": "Agama-start-Flow-5e5f716c-d68a-48fe-9ab3-ce1d4292176e", - "type": "Agama-start-Flow", - "displayName": "gluu agama otp enroll", - "hasComment": true, - "comment": "", - "isTopLevelFlow": false, - "basepath": "", - "configParams": "{}", - "nodeIcon": "material-symbols:line-start-square", - "timeout": "", - "inputs": "userId qrCodeAlg qrCodeKeyLength qrCodeLabel qrCodeIssuer", - "configs": "", - "flowname": "org.gluu.agama.totp.enroll" + "x": 1050, + "y": 200 }, - "skake": false + "previousNodeId": "callNode-8119ce51-3568-4ba5-95f7-0d0030548a79" }, + "type": "callNode", + "id": "callNode-6b8bb87b-4d30-4364-a98c-db4d4eb4b0b2", "position": { - "x": 73, - "y": 76 - }, - "selected": false, - "positionAbsolute": { - "x": 73, - "y": 76 + "x": 1050, + "y": 200 }, - "dragging": false + "measured": { + "width": 170, + "height": 124 + } }, { - "width": 170, - "height": 124, - "id": "Agama-log-Node-d7a640f7-f1cd-4c0a-9808-daff3b9fb0ea", - "position": { - "x": 1114.9999999999998, - "y": 70 - }, - "type": "log", "data": { - "id": "Agama-log-Node-d7a640f7-f1cd-4c0a-9808-daff3b9fb0ea", - "type": "Agama-log-Node", - "parentId": "Agama-call-Node-c688f0d8-21d7-46cd-9e05-8f7ec0401036", - "whenCondition": "", - "inRepeatBlock": false, - "position": { - "x": 1114.9999999999998, - "y": 70 - }, "agamaData": { - "id": "Agama-log-Node-d7a640f7-f1cd-4c0a-9808-daff3b9fb0ea", - "parentId": "Agama-call-Node-c688f0d8-21d7-46cd-9e05-8f7ec0401036", - "type": "Agama-log-Node", + "nodeIcon": "octicon:log-16", "displayName": "", "hasComment": true, "comment": "Debug log secret key URI", - "whenCondition": "", - "inRepeatBlock": false, "logMessage": "\"secretKeyUri generation\" E", - "logLevel": "debug", - "nodeIcon": "octicon:log-16" + "logLevel": "debug" + }, + "id": "logNode-6cc3dfdb-482e-4297-992b-28b270b5379f", + "type": "logNode", + "position": { + "x": 1300, + "y": 200 }, - "skake": false + "previousNodeId": "callNode-6b8bb87b-4d30-4364-a98c-db4d4eb4b0b2" + }, + "type": "logNode", + "id": "logNode-6cc3dfdb-482e-4297-992b-28b270b5379f", + "position": { + "x": 1300, + "y": 200 }, - "selected": false, - "dragging": false, - "positionAbsolute": { - "x": 1114.9999999999998, - "y": 70 + "measured": { + "width": 170, + "height": 124 } }, { - "width": 170, - "height": 124, - "id": "Agama-assignment-Node-04f8c5b3-dd9c-4b9c-b0e2-972fa22afb74", - "position": { - "x": 1313, - "y": 72 - }, - "type": "assignment", "data": { - "id": "Agama-assignment-Node-04f8c5b3-dd9c-4b9c-b0e2-972fa22afb74", - "type": "Agama-assignment-Node", - "parentId": "Agama-log-Node-d7a640f7-f1cd-4c0a-9808-daff3b9fb0ea", - "whenCondition": "", - "inRepeatBlock": false, - "position": { - "x": 1313, - "y": 72 - }, "agamaData": { - "id": "Agama-assignment-Node-04f8c5b3-dd9c-4b9c-b0e2-972fa22afb74", - "parentId": "Agama-log-Node-d7a640f7-f1cd-4c0a-9808-daff3b9fb0ea", - "type": "Agama-assignment-Node", + "nodeIcon": "material-symbols:equal", "displayName": "", "hasComment": true, "comment": "Map Obj(secretKeyUri, qrCodeLabel) for enroll.ftlh RRF page", - "whenCondition": "", - "inRepeatBlock": false, "assignments": [ { "variableTypeCheck": false, "assignmentExpression": "{ secretKeyUri : secretKeyUri, qrCodeLabel: qrCodeLabel }", "assignedVariableName": "obj" } - ], - "nodeIcon": "material-symbols:equal" + ] + }, + "id": "assignmentNode-4b48eb0b-027e-4c89-8e83-1ab118f10834", + "type": "assignmentNode", + "position": { + "x": 1550, + "y": 200 }, - "skake": false + "previousNodeId": "logNode-6cc3dfdb-482e-4297-992b-28b270b5379f" }, - "selected": false, - "dragging": false, - "positionAbsolute": { - "x": 1313, - "y": 72 + "type": "assignmentNode", + "id": "assignmentNode-4b48eb0b-027e-4c89-8e83-1ab118f10834", + "position": { + "x": 1550, + "y": 200 + }, + "measured": { + "width": 170, + "height": 124 } }, { - "width": 170, - "height": 124, - "id": "Agama-rrf-Node-2fb5c7e5-ecbf-4c82-8e15-822c5105d11a", - "position": { - "x": 248, - "y": 1.6666666666666288 - }, - "type": "rrf", "data": { - "id": "Agama-rrf-Node-2fb5c7e5-ecbf-4c82-8e15-822c5105d11a", - "type": "Agama-rrf-Node", - "parentId": "Agama-assignment-Node-04f8c5b3-dd9c-4b9c-b0e2-972fa22afb74", - "whenCondition": "", - "inRepeatBlock": "", - "position": { - "x": 248, - "y": 1.6666666666666288 - }, "agamaData": { - "id": "Agama-rrf-Node-2fb5c7e5-ecbf-4c82-8e15-822c5105d11a", - "parentId": "Agama-log-Node-d7a640f7-f1cd-4c0a-9808-daff3b9fb0ea", - "type": "Agama-rrf-Node", + "nodeIcon": "ph:globe-simple", "displayName": "", "hasComment": true, "comment": "Load enroll.ftlh page and pass obj", - "whenCondition": "", - "inRepeatBlock": false, - "assignments": [], - "nodeIcon": "ph:globe-simple", - "templatePath": "enroll.ftlh", - "asssignedVariableName": "scanCode", "arguments": [ "obj" ], - "position": { - "x": 1023 - } + "templatePath": "enroll.ftlh", + "asssignedVariableName": "scanCode" + }, + "id": "rrfNode-083bf9bd-2d46-45bf-a16c-00afdbc7fc72", + "type": "rrfNode", + "position": { + "x": 1800, + "y": 200 }, - "skake": false + "previousNodeId": "assignmentNode-4b48eb0b-027e-4c89-8e83-1ab118f10834" }, - "selected": false, - "dragging": false, - "positionAbsolute": { - "x": 1561, - "y": 73.66666666666663 + "type": "rrfNode", + "id": "rrfNode-083bf9bd-2d46-45bf-a16c-00afdbc7fc72", + "position": { + "x": 1800, + "y": 200 }, - "parentId": "Agama-assignment-Node-04f8c5b3-dd9c-4b9c-b0e2-972fa22afb74", - "whenCondition": "", - "inRepeatBlock": "" + "measured": { + "width": 170, + "height": 124 + } }, { - "width": 170, - "height": 124, - "id": "Agama-call-Node-267dcb6f-5223-46ae-8c3a-6b55e683a82e", - "position": { - "x": 2003.3333333333335, - "y": 67.66666666666669 - }, - "type": "call", "data": { - "id": "Agama-call-Node-267dcb6f-5223-46ae-8c3a-6b55e683a82e", - "type": "Agama-call-Node", - "parentId": "Agama-log-Node-441636e3-14cb-468e-bae0-0572444eb30c", - "whenCondition": "", - "inRepeatBlock": "", + "agamaData": { + "nodeIcon": "octicon:log-16", + "displayName": "", + "hasComment": true, + "comment": "Debug Log OTP code entered by user", + "logMessage": "\"scan code : \" scanCode.code", + "logLevel": "debug" + }, + "id": "logNode-1ba1545b-1229-45fb-9b0b-f4b895553bfc", + "type": "logNode", "position": { - "x": 2003.3333333333335, - "y": 67.66666666666669 + "x": 2050, + "y": 200 }, + "previousNodeId": "rrfNode-083bf9bd-2d46-45bf-a16c-00afdbc7fc72" + }, + "type": "logNode", + "id": "logNode-1ba1545b-1229-45fb-9b0b-f4b895553bfc", + "position": { + "x": 2050, + "y": 200 + }, + "measured": { + "width": 170, + "height": 124 + } + }, + { + "data": { "agamaData": { - "id": "Agama-call-Node-267dcb6f-5223-46ae-8c3a-6b55e683a82e", - "parentId": "Agama-log-Node-441636e3-14cb-468e-bae0-0572444eb30c", - "type": "Agama-call-Node", + "nodeIcon": "material-symbols:code", "displayName": "", "hasComment": true, "comment": "Call TOTPUtil.validateTOTP to validate OTP", @@ -465,153 +308,66 @@ "javaVariableName": "OTPServiceObj", "exceptionVariableField": "E", "callType": "Call method on instance", - "whenCondition": "", - "inRepeatBlock": "", "arguments": [ "scanCode.code", "secretKey", "qrCodeAlg" ], - "nodeIcon": "material-symbols:code", "asssignedVariableName": "otpCheck" }, - "skake": false + "id": "callNode-3a45fa74-55bc-45eb-a174-871251aeb92f", + "type": "callNode", + "position": { + "x": 2300, + "y": 200 + }, + "previousNodeId": "logNode-1ba1545b-1229-45fb-9b0b-f4b895553bfc" }, - "selected": false, - "positionAbsolute": { - "x": 2003.3333333333335, - "y": 67.66666666666669 + "type": "callNode", + "id": "callNode-3a45fa74-55bc-45eb-a174-871251aeb92f", + "position": { + "x": 2300, + "y": 200 }, - "dragging": false + "measured": { + "width": 170, + "height": 124 + } }, { - "width": 170, - "height": 124, - "id": "Agama-log-Node-7b87d29e-978e-4ee5-8ca5-a57f34f09340", - "position": { - "x": 2210, - "y": 82.66666666666669 - }, - "type": "log", "data": { - "id": "Agama-log-Node-7b87d29e-978e-4ee5-8ca5-a57f34f09340", - "type": "Agama-log-Node", - "parentId": "Agama-call-Node-267dcb6f-5223-46ae-8c3a-6b55e683a82e", - "whenCondition": "", - "inRepeatBlock": "", - "position": { - "x": 2210, - "y": 82.66666666666669 - }, "agamaData": { - "id": "Agama-log-Node-7b87d29e-978e-4ee5-8ca5-a57f34f09340", - "parentId": "Agama-call-Node-267dcb6f-5223-46ae-8c3a-6b55e683a82e", - "type": "Agama-log-Node", + "nodeIcon": "octicon:log-16", "displayName": "", "hasComment": true, "comment": "Debug Log OTP check result", - "whenCondition": "", - "inRepeatBlock": "", "logMessage": "\"otp check result \" otpCheck E", - "logLevel": "debug", - "nodeIcon": "octicon:log-16" + "logLevel": "debug" }, - "skake": false - }, - "selected": false, - "dragging": false, - "positionAbsolute": { - "x": 2210, - "y": 82.66666666666669 - } - }, - { - "width": 170, - "height": 124, - "id": "Agama-call-Node-c688f0d8-21d7-46cd-9e05-8f7ec0401036", - "position": { - "x": 920, - "y": 66 - }, - "type": "call", - "data": { - "id": "Agama-call-Node-c688f0d8-21d7-46cd-9e05-8f7ec0401036", - "type": "Agama-call-Node", - "parentId": "Agama-call-Node-4fc43ccf-0635-4caa-b29f-d19bb783b4a8", - "whenCondition": "", - "inRepeatBlock": "", + "id": "logNode-2777ff9e-6e92-48a6-9d24-3dfab580215d", + "type": "logNode", "position": { - "x": 920, - "y": 66 + "x": 2550, + "y": 200 }, - "agamaData": { - "id": "Agama-call-Node-c688f0d8-21d7-46cd-9e05-8f7ec0401036", - "parentId": "Agama-call-Node-4fc43ccf-0635-4caa-b29f-d19bb783b4a8", - "type": "Agama-call-Node", - "displayName": "", - "hasComment": true, - "comment": "Generate Secret code URI for QR Code", - "javaClassName": "org.gluu.agama.totp.TOTPUtil", - "javaMethodName": "generateTotpSecretKeyUri", - "javaVariableName": "OTPServiceObj", - "exceptionVariableField": "E", - "callType": "Call method on instance", - "whenCondition": "", - "inRepeatBlock": false, - "arguments": [ - "secretKey", - "qrCodeIssuer", - "userId" - ], - "nodeIcon": "material-symbols:code", - "asssignedVariableName": "secretKeyUri", - "position": { - "x": 1001 - } - }, - "skake": false + "previousNodeId": "callNode-3a45fa74-55bc-45eb-a174-871251aeb92f" }, - "selected": false, - "dragging": false, - "positionAbsolute": { - "x": 920, - "y": 66 + "type": "logNode", + "id": "logNode-2777ff9e-6e92-48a6-9d24-3dfab580215d", + "position": { + "x": 2550, + "y": 200 }, - "whenCondition": "", - "inRepeatBlock": "" + "measured": { + "width": 170, + "height": 124 + } }, { - "width": 110, - "height": 60, - "id": "Agama-when-Node-075b4409-18d1-47bd-85fe-24b4aefbcc20", - "position": { - "x": 181.66666666666652, - "y": 29.666666666666686 - }, - "parentId": "Agama-log-Node-7b87d29e-978e-4ee5-8ca5-a57f34f09340", - "type": "when", "data": { - "id": "Agama-when-Node-075b4409-18d1-47bd-85fe-24b4aefbcc20", - "type": "Agama-when-Node", - "parentId": "Agama-log-Node-7b87d29e-978e-4ee5-8ca5-a57f34f09340", - "whenCondition": "WhenFalse", - "inRepeatBlock": "", - "position": { - "x": 181.66666666666652, - "y": 29.666666666666686 - }, "agamaData": { - "id": "Agama-when-Node-075b4409-18d1-47bd-85fe-24b4aefbcc20", - "parentId": "Agama-log-Node-7b87d29e-978e-4ee5-8ca5-a57f34f09340", - "type": "Agama-when-Node", - "hasFailure": true, - "variableField": "otpCheck", - "conditionInputField": "is", - "valueField": "true", - "comment": "check otp is valid? then save secretKey to user", "hasComment": true, - "inRepeatBlock": "", - "hasSuccess": true, + "comment": "check otp is valid? then save secretKey to user", "conditions": [ { "variable": "otpCheck", @@ -621,481 +377,393 @@ } ] }, - "handles": [ - "Agama-when-Node-075b4409-18d1-47bd-85fe-24b4aefbcc20.FAILURE", - "Agama-when-Node-075b4409-18d1-47bd-85fe-24b4aefbcc20.SUCCESS" - ], - "skake": false + "id": "whenNode-8d469259-8bba-410b-9813-bd7e499cb01a", + "type": "whenNode", + "position": { + "x": 2800, + "y": 200 + }, + "previousNodeId": "logNode-2777ff9e-6e92-48a6-9d24-3dfab580215d" }, - "selected": true, - "positionAbsolute": { - "x": 2391.6666666666665, - "y": 112.33333333333337 + "type": "whenNode", + "id": "whenNode-8d469259-8bba-410b-9813-bd7e499cb01a", + "position": { + "x": 2800, + "y": 200 }, - "dragging": false + "measured": { + "width": 110, + "height": 59 + } }, { - "width": 170, - "height": 124, - "id": "finish-c68f8f3f-884c-457d-a755-90d87687ab0f", - "position": { - "x": 256.80771938667203, - "y": -195.7220250850301 - }, - "type": "finish", "data": { - "id": "finish-c68f8f3f-884c-457d-a755-90d87687ab0f", - "type": "Agama-finish-Flow", - "parentId": "Agama-when-Node-075b4409-18d1-47bd-85fe-24b4aefbcc20", - "whenCondition": "", - "inRepeatBlock": "", - "handles": [], - "position": { - "x": 256.80771938667203, - "y": -195.7220250850301 - }, "agamaData": { - "id": "finish-c68f8f3f-884c-457d-a755-90d87687ab0f", - "parentId": "Agama-when-Node-075b4409-18d1-47bd-85fe-24b4aefbcc20", - "type": "Agama-finish-Flow", - "hasSuccess": false, - "hasFailure": false, + "nodeIcon": "material-symbols:code", + "displayName": "", "hasComment": true, - "comment": "Finish with OTP Check Result true or false", - "flowfilename": "", - "returnVariable": "otpCheck", - "finishMode": "withVariable", - "nodeIcon": "material-symbols:line-end-square-rounded", - "position": { - "x": 2525.4734375 - } + "comment": "Save secret key to user", + "javaClassName": "org.gluu.agama.totp.IdentityProcessor", + "javaMethodName": "linkUser", + "javaVariableName": "OTPServiceObj", + "exceptionVariableField": "E", + "callType": "Call method on instance", + "arguments": [ + "userId", + "secretKey" + ], + "asssignedVariableName": "userSavedData" + }, + "id": "callNode-5aed7e30-5810-4ef2-9d7f-c0da7f1d558e", + "type": "callNode", + "position": { + "x": 3050, + "y": 450 }, - "skake": false + "previousNodeId": "whenNode-8d469259-8bba-410b-9813-bd7e499cb01a", + "branching": "success" }, - "selected": false, - "dragging": false, - "positionAbsolute": { - "x": 2648.4743860533385, - "y": -83.38869175169674 + "type": "callNode", + "id": "callNode-5aed7e30-5810-4ef2-9d7f-c0da7f1d558e", + "position": { + "x": 3050, + "y": 450 }, - "parentId": "Agama-when-Node-075b4409-18d1-47bd-85fe-24b4aefbcc20", - "whenCondition": "", - "inRepeatBlock": "" + "measured": { + "width": 170, + "height": 124 + } }, { - "width": 170, - "height": 124, - "id": "Agama-call-Node-a9159d77-245e-4962-8d19-9f3a7d8a612a", - "position": { - "x": 501, - "y": 70 - }, - "type": "call", "data": { - "id": "Agama-call-Node-a9159d77-245e-4962-8d19-9f3a7d8a612a", - "type": "Agama-call-Node", - "parentId": "Agama-log-Node-dc952936-0fc5-48dd-b663-a6eb20014b90", - "whenCondition": "", - "inRepeatBlock": false, - "position": { - "x": 501, - "y": 70 - }, "agamaData": { - "id": "Agama-call-Node-a9159d77-245e-4962-8d19-9f3a7d8a612a", - "parentId": "Agama-log-Node-dc952936-0fc5-48dd-b663-a6eb20014b90", - "type": "Agama-call-Node", + "nodeIcon": "octicon:log-16", "displayName": "", "hasComment": true, - "comment": "Get Instance TOTPService", - "javaClassName": "org.gluu.agama.totp.TOTPService", - "javaMethodName": "getInstance", - "javaVariableName": "", - "exceptionVariableField": "E", - "callType": "Call static method", - "whenCondition": "", - "inRepeatBlock": false, - "arguments": [], - "nodeIcon": "material-symbols:code", - "asssignedVariableName": "OTPServiceObj" + "comment": "Debug log user save data result", + "logMessage": "\"user saved data \" userSavedData E", + "logLevel": "debug" }, - "skake": false + "id": "logNode-6ce91012-a0ce-4026-825d-4133f4a674d6", + "type": "logNode", + "position": { + "x": 3300, + "y": 450 + }, + "previousNodeId": "callNode-5aed7e30-5810-4ef2-9d7f-c0da7f1d558e" }, - "selected": false, - "positionAbsolute": { - "x": 501, - "y": 70 + "type": "logNode", + "id": "logNode-6ce91012-a0ce-4026-825d-4133f4a674d6", + "position": { + "x": 3300, + "y": 450 }, - "dragging": false + "measured": { + "width": 170, + "height": 124 + } }, { - "width": 170, - "height": 124, - "id": "Agama-call-Node-4fc43ccf-0635-4caa-b29f-d19bb783b4a8", - "position": { - "x": 203.33333333333348, - "y": -8.333333333333371 - }, - "type": "call", "data": { - "id": "Agama-call-Node-4fc43ccf-0635-4caa-b29f-d19bb783b4a8", - "type": "Agama-call-Node", - "parentId": "Agama-call-Node-a9159d77-245e-4962-8d19-9f3a7d8a612a", - "whenCondition": "", - "inRepeatBlock": "", - "position": { - "x": 203.33333333333348, - "y": -8.333333333333371 - }, "agamaData": { - "id": "Agama-call-Node-4fc43ccf-0635-4caa-b29f-d19bb783b4a8", - "parentId": "Agama-log-Node-dc952936-0fc5-48dd-b663-a6eb20014b90", - "type": "Agama-call-Node", - "displayName": "", + "nodeIcon": "material-symbols:line-end-square-rounded", "hasComment": true, - "comment": "Generate secret key ", - "javaClassName": "org.gluu.agama.totp.TOTPUtil", - "javaMethodName": "generateSecretKey", - "javaVariableName": "OTPServiceObj", - "exceptionVariableField": "", - "callType": "Call method on instance", - "whenCondition": "", - "inRepeatBlock": false, - "arguments": [ - "qrCodeKeyLength" - ], - "nodeIcon": "material-symbols:code", - "asssignedVariableName": "secretKey", - "position": { - "x": 623 - }, - "hasSuccess": "", - "hasFailure": "", - "hasNoRepeat": false, - "hasRepeat": false, - "nodeColor": "#92e8a3" + "comment": "Finish with OTP Check Result true or false", + "returnVariable": "otpCheck", + "finishMode": "withVariable" + }, + "id": "finishNode-b7705a37-6fb3-4c87-8cf2-7df6708a6870", + "type": "finishNode", + "position": { + "x": 3050, + "y": 200 }, - "skake": false + "previousNodeId": "whenNode-8d469259-8bba-410b-9813-bd7e499cb01a", + "branching": "continue" }, - "selected": false, - "dragging": false, - "positionAbsolute": { - "x": 704.3333333333335, - "y": 61.66666666666663 + "type": "finishNode", + "id": "finishNode-b7705a37-6fb3-4c87-8cf2-7df6708a6870", + "position": { + "x": 3050, + "y": 200 }, - "parentId": "Agama-call-Node-a9159d77-245e-4962-8d19-9f3a7d8a612a", - "whenCondition": "", - "inRepeatBlock": "" + "measured": { + "width": 170, + "height": 124 + } } ], "edges": [ { - "id": "Agama-start-Flow-5e5f716c-d68a-48fe-9ab3-ce1d4292176e-Agama-log-Node-dc952936-0fc5-48dd-b663-a6eb20014b90-04ea698c-e86e-4b5c-9dd5-93b11a4b4848", - "type": "straight", - "source": "Agama-start-Flow-5e5f716c-d68a-48fe-9ab3-ce1d4292176e", - "target": "Agama-log-Node-dc952936-0fc5-48dd-b663-a6eb20014b90", - "label": "", + "id": "startNode-955462a4-7aa9-43e2-9c49-0a34648c9289-logNode-684c4bdf-6911-41ef-bf22-1996899bc390", + "type": "default", + "source": "startNode-955462a4-7aa9-43e2-9c49-0a34648c9289", + "target": "logNode-684c4bdf-6911-41ef-bf22-1996899bc390", "labelBgPadding": [ 8, 4 ], "labelBgBorderRadius": 4, - "labelBgStyle": { - "fill": "#FFCC00", - "color": "#fff", - "fillOpacity": 0.7 - } - }, - { - "id": "Agama-call-Node-c688f0d8-21d7-46cd-9e05-8f7ec0401036-Agama-log-Node-d7a640f7-f1cd-4c0a-9808-daff3b9fb0ea-9aa38763-426a-4c46-8a00-4d7c8f88553d", - "type": "straight", - "source": "Agama-call-Node-c688f0d8-21d7-46cd-9e05-8f7ec0401036", - "target": "Agama-log-Node-d7a640f7-f1cd-4c0a-9808-daff3b9fb0ea", "label": "", - "labelBgPadding": [ - 8, - 4 - ], - "labelBgBorderRadius": 4, "labelBgStyle": { - "fill": "#FFCC00", - "color": "#fff", + "fill": "#009688", + "color": "#ffffff", "fillOpacity": 0.7 - } + }, + "labelShowBg": true, + "sourceHandle": "source_startNode-955462a4-7aa9-43e2-9c49-0a34648c9289" }, { - "id": "Agama-rrf-Node-f3a22102-38e5-424b-9873-17d16d452886-Agama-call-Node-4fc43ccf-0635-4caa-b29f-d19bb783b4a8-4807901b-71bb-4a83-9951-e16becf58018", - "type": "straight", - "source": "Agama-rrf-Node-f3a22102-38e5-424b-9873-17d16d452886", - "target": "Agama-call-Node-4fc43ccf-0635-4caa-b29f-d19bb783b4a8", - "label": "", + "id": "logNode-684c4bdf-6911-41ef-bf22-1996899bc390-callNode-de4c8647-dda3-4736-941c-0300a9d549a7", + "type": "default", + "source": "logNode-684c4bdf-6911-41ef-bf22-1996899bc390", + "target": "callNode-de4c8647-dda3-4736-941c-0300a9d549a7", "labelBgPadding": [ 8, 4 ], "labelBgBorderRadius": 4, - "labelBgStyle": { - "fill": "#FFCC00", - "color": "#fff", - "fillOpacity": 0.7 - } - }, - { - "id": "Agama-rrf-Node-2fb5c7e5-ecbf-4c82-8e15-822c5105d11a-Agama-log-Node-441636e3-14cb-468e-bae0-0572444eb30c-2b7d93ed-4f1e-4ee1-9f0a-513729eb49b5", - "type": "straight", - "source": "Agama-rrf-Node-2fb5c7e5-ecbf-4c82-8e15-822c5105d11a", - "target": "Agama-log-Node-441636e3-14cb-468e-bae0-0572444eb30c", "label": "", - "labelBgPadding": [ - 8, - 4 - ], - "labelBgBorderRadius": 4, "labelBgStyle": { - "fill": "#FFCC00", - "color": "#fff", + "fill": "#009688", + "color": "#ffffff", "fillOpacity": 0.7 - } + }, + "labelShowBg": true, + "sourceHandle": "source_logNode-684c4bdf-6911-41ef-bf22-1996899bc390" }, { - "id": "Agama-log-Node-d7a640f7-f1cd-4c0a-9808-daff3b9fb0ea-Agama-assignment-Node-04f8c5b3-dd9c-4b9c-b0e2-972fa22afb74-2cd6f745-5118-4ea4-a668-0a2ca992d283", - "type": "straight", - "source": "Agama-log-Node-d7a640f7-f1cd-4c0a-9808-daff3b9fb0ea", - "target": "Agama-assignment-Node-04f8c5b3-dd9c-4b9c-b0e2-972fa22afb74", - "label": "", + "id": "callNode-de4c8647-dda3-4736-941c-0300a9d549a7-callNode-8119ce51-3568-4ba5-95f7-0d0030548a79", + "type": "default", + "source": "callNode-de4c8647-dda3-4736-941c-0300a9d549a7", + "target": "callNode-8119ce51-3568-4ba5-95f7-0d0030548a79", "labelBgPadding": [ 8, 4 ], "labelBgBorderRadius": 4, - "labelBgStyle": { - "fill": "#FFCC00", - "color": "#fff", - "fillOpacity": 0.7 - } - }, - { - "id": "Agama-assignment-Node-04f8c5b3-dd9c-4b9c-b0e2-972fa22afb74-Agama-rrf-Node-2fb5c7e5-ecbf-4c82-8e15-822c5105d11a-e366671b-17b5-439b-999b-021d58b6f54e", - "type": "straight", - "source": "Agama-assignment-Node-04f8c5b3-dd9c-4b9c-b0e2-972fa22afb74", - "target": "Agama-rrf-Node-2fb5c7e5-ecbf-4c82-8e15-822c5105d11a", "label": "", - "labelBgPadding": [ - 8, - 4 - ], - "labelBgBorderRadius": 4, "labelBgStyle": { - "fill": "#FFCC00", - "color": "#fff", + "fill": "#009688", + "color": "#ffffff", "fillOpacity": 0.7 - } + }, + "labelShowBg": true, + "sourceHandle": "source_callNode-de4c8647-dda3-4736-941c-0300a9d549a7" }, { - "id": "Agama-log-Node-441636e3-14cb-468e-bae0-0572444eb30c-Agama-call-Node-267dcb6f-5223-46ae-8c3a-6b55e683a82e-fb8184d3-ead8-4121-9548-bdaa3bbdddf3", - "type": "straight", - "source": "Agama-log-Node-441636e3-14cb-468e-bae0-0572444eb30c", - "target": "Agama-call-Node-267dcb6f-5223-46ae-8c3a-6b55e683a82e", - "label": "", + "id": "callNode-8119ce51-3568-4ba5-95f7-0d0030548a79-callNode-6b8bb87b-4d30-4364-a98c-db4d4eb4b0b2", + "type": "default", + "source": "callNode-8119ce51-3568-4ba5-95f7-0d0030548a79", + "target": "callNode-6b8bb87b-4d30-4364-a98c-db4d4eb4b0b2", "labelBgPadding": [ 8, 4 ], "labelBgBorderRadius": 4, + "label": "", "labelBgStyle": { - "fill": "#FFCC00", - "color": "#fff", + "fill": "#009688", + "color": "#ffffff", "fillOpacity": 0.7 - } + }, + "labelShowBg": true, + "sourceHandle": "source_callNode-8119ce51-3568-4ba5-95f7-0d0030548a79" }, { - "id": "Agama-call-Node-267dcb6f-5223-46ae-8c3a-6b55e683a82e-Agama-log-Node-7b87d29e-978e-4ee5-8ca5-a57f34f09340-f78ed591-6f94-4379-9a44-9551c94e12b4", - "type": "straight", - "source": "Agama-call-Node-267dcb6f-5223-46ae-8c3a-6b55e683a82e", - "target": "Agama-log-Node-7b87d29e-978e-4ee5-8ca5-a57f34f09340", - "label": "", + "id": "callNode-6b8bb87b-4d30-4364-a98c-db4d4eb4b0b2-logNode-6cc3dfdb-482e-4297-992b-28b270b5379f", + "type": "default", + "source": "callNode-6b8bb87b-4d30-4364-a98c-db4d4eb4b0b2", + "target": "logNode-6cc3dfdb-482e-4297-992b-28b270b5379f", "labelBgPadding": [ 8, 4 ], "labelBgBorderRadius": 4, + "label": "", "labelBgStyle": { - "fill": "#FFCC00", - "color": "#fff", + "fill": "#009688", + "color": "#ffffff", "fillOpacity": 0.7 - } + }, + "labelShowBg": true, + "sourceHandle": "source_callNode-6b8bb87b-4d30-4364-a98c-db4d4eb4b0b2" }, { - "id": "Agama-call-Node-4fc43ccf-0635-4caa-b29f-d19bb783b4a8-Agama-call-Node-78490adc-8bf4-434e-91dd-2088efd6c051-98cc668e-46d8-4067-8e52-4c9e87fd9cbe", - "type": "straight", - "source": "Agama-call-Node-4fc43ccf-0635-4caa-b29f-d19bb783b4a8", - "target": "Agama-call-Node-78490adc-8bf4-434e-91dd-2088efd6c051", - "label": "", + "id": "logNode-6cc3dfdb-482e-4297-992b-28b270b5379f-assignmentNode-4b48eb0b-027e-4c89-8e83-1ab118f10834", + "type": "default", + "source": "logNode-6cc3dfdb-482e-4297-992b-28b270b5379f", + "target": "assignmentNode-4b48eb0b-027e-4c89-8e83-1ab118f10834", "labelBgPadding": [ 8, 4 ], "labelBgBorderRadius": 4, + "label": "", "labelBgStyle": { - "fill": "#FFCC00", - "color": "#fff", + "fill": "#009688", + "color": "#ffffff", "fillOpacity": 0.7 - } + }, + "labelShowBg": true, + "sourceHandle": "source_logNode-6cc3dfdb-482e-4297-992b-28b270b5379f" }, { - "id": "Agama-call-Node-78490adc-8bf4-434e-91dd-2088efd6c051-Agama-log-Node-b48c06a3-3a45-40bd-be8b-30b97c33f7e2-094eed80-e8ca-49dc-8e63-af186c754373", - "type": "straight", - "source": "Agama-call-Node-78490adc-8bf4-434e-91dd-2088efd6c051", - "target": "Agama-log-Node-b48c06a3-3a45-40bd-be8b-30b97c33f7e2", - "label": "", + "id": "assignmentNode-4b48eb0b-027e-4c89-8e83-1ab118f10834-rrfNode-083bf9bd-2d46-45bf-a16c-00afdbc7fc72", + "type": "default", + "source": "assignmentNode-4b48eb0b-027e-4c89-8e83-1ab118f10834", + "target": "rrfNode-083bf9bd-2d46-45bf-a16c-00afdbc7fc72", "labelBgPadding": [ 8, 4 ], "labelBgBorderRadius": 4, + "label": "", "labelBgStyle": { - "fill": "#FFCC00", - "color": "#fff", + "fill": "#009688", + "color": "#ffffff", "fillOpacity": 0.7 - } + }, + "labelShowBg": true, + "sourceHandle": "source_assignmentNode-4b48eb0b-027e-4c89-8e83-1ab118f10834" }, { - "id": "Agama-log-Node-b48c06a3-3a45-40bd-be8b-30b97c33f7e2-Agama-call-Node-c688f0d8-21d7-46cd-9e05-8f7ec0401036-58acb70f-f990-4e5a-b454-54577377580c", - "type": "straight", - "source": "Agama-log-Node-b48c06a3-3a45-40bd-be8b-30b97c33f7e2", - "target": "Agama-call-Node-c688f0d8-21d7-46cd-9e05-8f7ec0401036", - "label": "", + "id": "rrfNode-083bf9bd-2d46-45bf-a16c-00afdbc7fc72-logNode-1ba1545b-1229-45fb-9b0b-f4b895553bfc", + "type": "default", + "source": "rrfNode-083bf9bd-2d46-45bf-a16c-00afdbc7fc72", + "target": "logNode-1ba1545b-1229-45fb-9b0b-f4b895553bfc", "labelBgPadding": [ 8, 4 ], "labelBgBorderRadius": 4, + "label": "", "labelBgStyle": { - "fill": "#FFCC00", - "color": "#fff", + "fill": "#009688", + "color": "#ffffff", "fillOpacity": 0.7 - } - }, - { - "id": "Agama-call-Node-4fc43ccf-0635-4caa-b29f-d19bb783b4a8-Agama-log-Node-b48c06a3-3a45-40bd-be8b-30b97c33f7e2-bbc4dce1-388f-46b8-bc42-2f87fea2c145", - "type": "straight", - "source": "Agama-call-Node-4fc43ccf-0635-4caa-b29f-d19bb783b4a8", - "target": "Agama-log-Node-b48c06a3-3a45-40bd-be8b-30b97c33f7e2" - }, - { - "id": "Agama-call-Node-4fc43ccf-0635-4caa-b29f-d19bb783b4a8-Agama-call-Node-c688f0d8-21d7-46cd-9e05-8f7ec0401036-92efbbbe-9ddc-4d6a-9189-debefcf9d683", - "type": "straight", - "source": "Agama-call-Node-4fc43ccf-0635-4caa-b29f-d19bb783b4a8", - "target": "Agama-call-Node-c688f0d8-21d7-46cd-9e05-8f7ec0401036" + }, + "labelShowBg": true, + "sourceHandle": "source_rrfNode-083bf9bd-2d46-45bf-a16c-00afdbc7fc72" }, { - "id": "Agama-log-Node-7b87d29e-978e-4ee5-8ca5-a57f34f09340-Agama-when-Node-075b4409-18d1-47bd-85fe-24b4aefbcc20-e78c0d18-a8c4-45fd-9095-40f7c9017de2", - "type": "straight", - "source": "Agama-log-Node-7b87d29e-978e-4ee5-8ca5-a57f34f09340", - "target": "Agama-when-Node-075b4409-18d1-47bd-85fe-24b4aefbcc20", - "label": "", + "id": "logNode-1ba1545b-1229-45fb-9b0b-f4b895553bfc-callNode-3a45fa74-55bc-45eb-a174-871251aeb92f", + "type": "default", + "source": "logNode-1ba1545b-1229-45fb-9b0b-f4b895553bfc", + "target": "callNode-3a45fa74-55bc-45eb-a174-871251aeb92f", "labelBgPadding": [ 8, 4 ], "labelBgBorderRadius": 4, + "label": "", "labelBgStyle": { - "fill": "#FFCC00", - "color": "#fff", + "fill": "#009688", + "color": "#ffffff", "fillOpacity": 0.7 - } + }, + "labelShowBg": true, + "sourceHandle": "source_logNode-1ba1545b-1229-45fb-9b0b-f4b895553bfc" }, { - "id": "Agama-when-Node-075b4409-18d1-47bd-85fe-24b4aefbcc20-finish-c68f8f3f-884c-457d-a755-90d87687ab0f-8ca9bb56-602d-4459-a6a7-3ae03ecdf29e", - "type": "straight", - "source": "Agama-when-Node-075b4409-18d1-47bd-85fe-24b4aefbcc20", - "target": "finish-c68f8f3f-884c-457d-a755-90d87687ab0f", - "label": "", + "id": "callNode-3a45fa74-55bc-45eb-a174-871251aeb92f-logNode-2777ff9e-6e92-48a6-9d24-3dfab580215d", + "type": "default", + "source": "callNode-3a45fa74-55bc-45eb-a174-871251aeb92f", + "target": "logNode-2777ff9e-6e92-48a6-9d24-3dfab580215d", "labelBgPadding": [ 8, 4 ], "labelBgBorderRadius": 4, + "label": "", "labelBgStyle": { - "fill": "#FFCC00", - "color": "#fff", + "fill": "#009688", + "color": "#ffffff", "fillOpacity": 0.7 }, - "sourceHandle": "Agama-when-Node-075b4409-18d1-47bd-85fe-24b4aefbcc20.FAILURE" + "labelShowBg": true, + "sourceHandle": "source_callNode-3a45fa74-55bc-45eb-a174-871251aeb92f" }, { - "id": "Agama-when-Node-075b4409-18d1-47bd-85fe-24b4aefbcc20-Agama-call-Node-0dd8b848-b129-4534-a25a-c15c92d00be0-9664f3c4-7395-4c62-90f8-4be6b6a0ca4c", - "type": "straight", - "source": "Agama-when-Node-075b4409-18d1-47bd-85fe-24b4aefbcc20", - "target": "Agama-call-Node-0dd8b848-b129-4534-a25a-c15c92d00be0", - "label": "Condition met", + "id": "logNode-2777ff9e-6e92-48a6-9d24-3dfab580215d-whenNode-8d469259-8bba-410b-9813-bd7e499cb01a", + "type": "default", + "source": "logNode-2777ff9e-6e92-48a6-9d24-3dfab580215d", + "target": "whenNode-8d469259-8bba-410b-9813-bd7e499cb01a", "labelBgPadding": [ 8, 4 ], "labelBgBorderRadius": 4, + "label": "", "labelBgStyle": { - "fill": "#FFCC00", - "color": "#fff", + "fill": "#009688", + "color": "#ffffff", "fillOpacity": 0.7 }, - "sourceHandle": "Agama-when-Node-075b4409-18d1-47bd-85fe-24b4aefbcc20.SUCCESS" + "labelShowBg": true, + "sourceHandle": "source_logNode-2777ff9e-6e92-48a6-9d24-3dfab580215d" }, { - "id": "Agama-call-Node-0dd8b848-b129-4534-a25a-c15c92d00be0-Agama-log-Node-6d5003bb-7835-4d3e-999d-8906ec1bd2aa-b52b4a4a-fa34-4b9c-b8a8-83c6db1938d3", - "type": "straight", - "source": "Agama-call-Node-0dd8b848-b129-4534-a25a-c15c92d00be0", - "target": "Agama-log-Node-6d5003bb-7835-4d3e-999d-8906ec1bd2aa", - "label": "", + "id": "whenNode-8d469259-8bba-410b-9813-bd7e499cb01a-callNode-5aed7e30-5810-4ef2-9d7f-c0da7f1d558e", + "type": "default", + "source": "whenNode-8d469259-8bba-410b-9813-bd7e499cb01a", + "target": "callNode-5aed7e30-5810-4ef2-9d7f-c0da7f1d558e", "labelBgPadding": [ 8, 4 ], "labelBgBorderRadius": 4, + "label": "Condition met", "labelBgStyle": { - "fill": "#FFCC00", - "color": "#fff", + "fill": "#009688", + "color": "#ffffff", "fillOpacity": 0.7 - } + }, + "labelShowBg": true, + "sourceHandle": "source_whenNode-8d469259-8bba-410b-9813-bd7e499cb01a_success" }, { - "id": "Agama-log-Node-dc952936-0fc5-48dd-b663-a6eb20014b90-Agama-call-Node-a9159d77-245e-4962-8d19-9f3a7d8a612a-21b6cae6-20f4-4aef-b47e-e90566823c59", - "type": "straight", - "source": "Agama-log-Node-dc952936-0fc5-48dd-b663-a6eb20014b90", - "target": "Agama-call-Node-a9159d77-245e-4962-8d19-9f3a7d8a612a", - "label": "", + "id": "callNode-5aed7e30-5810-4ef2-9d7f-c0da7f1d558e-logNode-6ce91012-a0ce-4026-825d-4133f4a674d6", + "type": "default", + "source": "callNode-5aed7e30-5810-4ef2-9d7f-c0da7f1d558e", + "target": "logNode-6ce91012-a0ce-4026-825d-4133f4a674d6", "labelBgPadding": [ 8, 4 ], "labelBgBorderRadius": 4, + "label": "", "labelBgStyle": { - "fill": "#FFCC00", - "color": "#fff", + "fill": "#009688", + "color": "#ffffff", "fillOpacity": 0.7 - } + }, + "labelShowBg": true, + "sourceHandle": "source_callNode-5aed7e30-5810-4ef2-9d7f-c0da7f1d558e" }, { - "id": "Agama-call-Node-a9159d77-245e-4962-8d19-9f3a7d8a612a-Agama-call-Node-4fc43ccf-0635-4caa-b29f-d19bb783b4a8-7984206a-986f-41d4-9bd8-ea811f5b90e6", - "type": "straight", - "source": "Agama-call-Node-a9159d77-245e-4962-8d19-9f3a7d8a612a", - "target": "Agama-call-Node-4fc43ccf-0635-4caa-b29f-d19bb783b4a8", - "label": "", + "id": "whenNode-8d469259-8bba-410b-9813-bd7e499cb01a-finishNode-b7705a37-6fb3-4c87-8cf2-7df6708a6870", + "type": "default", + "source": "whenNode-8d469259-8bba-410b-9813-bd7e499cb01a", + "target": "finishNode-b7705a37-6fb3-4c87-8cf2-7df6708a6870", "labelBgPadding": [ 8, 4 ], "labelBgBorderRadius": 4, + "label": "continue", "labelBgStyle": { - "fill": "#FFCC00", - "color": "#fff", + "fill": "#009688", + "color": "#ffffff", "fillOpacity": 0.7 - } + }, + "labelShowBg": true, + "sourceHandle": "source_whenNode-8d469259-8bba-410b-9813-bd7e499cb01a_continue" } ], "viewport": { - "x": -216.75, - "y": 289.09717293792414, - "zoom": 0.5 + "x": 0, + "y": 0, + "zoom": 1 } } \ No newline at end of file From ed7bef0410d7fd5d5502dc1e17d9ec9b27729211 Mon Sep 17 00:00:00 2001 From: Kiran Mali <39133739+kdhttps@users.noreply.github.com> Date: Tue, 19 Nov 2024 18:50:04 +0530 Subject: [PATCH 26/32] refactor: update org.gluu.agama.totp.enroll.flow From b47d5be299eb259266bc84d85b5ef269995184e1 Mon Sep 17 00:00:00 2001 From: Kiran Mali <39133739+kdhttps@users.noreply.github.com> Date: Tue, 19 Nov 2024 18:50:21 +0530 Subject: [PATCH 27/32] feat: update project.json From 23f879d44dc40c59bb6ee4e62d6fc275bc0aab9c Mon Sep 17 00:00:00 2001 From: Kiran Mali <39133739+kdhttps@users.noreply.github.com> Date: Tue, 19 Nov 2024 18:50:23 +0530 Subject: [PATCH 28/32] refactor: update org.gluu.agama.totp.otp.json --- code/org.gluu.agama.totp.otp.json | 768 +++++++++--------------------- 1 file changed, 238 insertions(+), 530 deletions(-) diff --git a/code/org.gluu.agama.totp.otp.json b/code/org.gluu.agama.totp.otp.json index 0507505..7ba5ef2 100644 --- a/code/org.gluu.agama.totp.otp.json +++ b/code/org.gluu.agama.totp.otp.json @@ -1,374 +1,134 @@ { "nodes": [ { - "width": 270, - "height": 42, - "id": "Agama-note-05034f1b-a1b3-4c47-8730-599e96148000", - "position": { - "x": 1126.8348426758134, - "y": -17.72880857094151 - }, - "type": "notes", - "data": { - "id": "Agama-note-05034f1b-a1b3-4c47-8730-599e96148000", - "type": "Agama-note", - "notes": "Call validateTOTP method to check OTP is valid or not", - "position": { - "x": 1126.8348426758134, - "y": -17.72880857094151 - }, - "skake": false - }, - "selected": false, - "positionAbsolute": { - "x": 1126.8348426758134, - "y": -17.72880857094151 - }, - "dragging": false - }, - { - "width": 195, - "height": 30, - "id": "Agama-note-4bb4ac85-fd6f-41c5-8261-a917566ed657", - "position": { - "x": 529.6117494392946, - "y": -7.880374345843791 - }, - "type": "notes", - "data": { - "id": "Agama-note-4bb4ac85-fd6f-41c5-8261-a917566ed657", - "type": "Agama-note", - "notes": "Load otplogin.ftlh page", - "position": { - "x": 529.6117494392946, - "y": -7.880374345843791 - }, - "skake": false - }, - "selected": false, - "positionAbsolute": { - "x": 529.6117494392946, - "y": -7.880374345843791 - }, - "dragging": false - }, - { - "width": 270, - "height": 55, - "id": "Agama-note-1542780a-2943-43f2-9152-537cee85a99b", - "position": { - "x": 35.598591554751465, - "y": -12.518995546637598 - }, - "type": "notes", "data": { - "id": "Agama-note-1542780a-2943-43f2-9152-537cee85a99b", - "type": "Agama-note", - "notes": "This flow present otplogin.ftlh page and ask user to enter OTP and return result", - "position": { - "x": 35.598591554751465, - "y": -12.518995546637598 - }, - "skake": false - }, - "selected": false, - "positionAbsolute": { - "x": 35.598591554751465, - "y": -12.518995546637598 - }, - "dragging": false - }, - { - "width": 170, - "height": 124, - "id": "Agama-log-Node-441636e3-14cb-468e-bae0-0572444eb30c", - "position": { - "x": 783.9168828787649, - "y": 70.31931060039693 - }, - "type": "log", - "data": { - "id": "Agama-log-Node-441636e3-14cb-468e-bae0-0572444eb30c", - "type": "Agama-log-Node", - "parentId": "Agama-rrf-Node-2fb5c7e5-ecbf-4c82-8e15-822c5105d11a", - "whenCondition": "", - "inRepeatBlock": "", - "position": { - "x": 783.9168828787649, - "y": 70.31931060039693 - }, "agamaData": { - "id": "Agama-log-Node-441636e3-14cb-468e-bae0-0572444eb30c", - "parentId": "Agama-rrf-Node-2fb5c7e5-ecbf-4c82-8e15-822c5105d11a", - "type": "Agama-log-Node", + "isTopLevelFlow": true, + "basepath": "", + "configParams": "{}", + "creationDate": "19/11/2024", + "nodeIcon": "material-symbols:line-start-square", + "timeout": "", + "inputs": "userId secretKey qrCodeAlg", + "configs": "", + "flowname": "org.gluu.agama.totp.otp", "displayName": "", "hasComment": true, - "comment": "Debug Log: Log OTP which is entered by User", - "whenCondition": "", - "inRepeatBlock": "", - "logMessage": "\"scan code : \" scanCode.code", - "logLevel": "debug", - "nodeIcon": "octicon:log-16" + "comment": "Check OTP flow" }, - "skake": false + "id": "startNode-62103db5-a3a8-48cd-929f-48073d9ed298", + "type": "startNode", + "position": { + "x": 50, + "y": 200 + } }, - "selected": false, - "dragging": false, - "positionAbsolute": { - "x": 783.9168828787649, - "y": 70.31931060039693 + "type": "startNode", + "id": "startNode-62103db5-a3a8-48cd-929f-48073d9ed298", + "position": { + "x": 50, + "y": 200 + }, + "measured": { + "width": 170, + "height": 124 } }, { - "width": 170, - "height": 124, - "id": "Agama-log-Node-dc952936-0fc5-48dd-b663-a6eb20014b90", - "position": { - "x": 311.105866804505, - "y": 69.70502908836932 - }, - "type": "log", "data": { - "id": "Agama-log-Node-dc952936-0fc5-48dd-b663-a6eb20014b90", - "type": "Agama-log-Node", - "parentId": "Agama-start-Flow-5e5f716c-d68a-48fe-9ab3-ce1d4292176e", - "whenCondition": "", - "inRepeatBlock": false, - "position": { - "x": 311.105866804505, - "y": 69.70502908836932 - }, "agamaData": { - "id": "Agama-log-Node-dc952936-0fc5-48dd-b663-a6eb20014b90", - "parentId": "Agama-start-Flow-5e5f716c-d68a-48fe-9ab3-ce1d4292176e", - "type": "Agama-log-Node", + "nodeIcon": "octicon:log-16", "displayName": "", "hasComment": true, "comment": "otp enrollment", - "whenCondition": "", - "inRepeatBlock": false, "logMessage": "\"otp enrollment for user \" userId secretKey", - "logLevel": "debug", - "nodeIcon": "octicon:log-16", - "hasSuccess": "", - "hasFailure": "", - "hasNoRepeat": false, - "hasRepeat": false + "logLevel": "debug" }, - "skake": false - }, - "selected": false, - "dragging": false, - "positionAbsolute": { - "x": 311.105866804505, - "y": 69.70502908836932 - } - }, - { - "width": 170, - "height": 124, - "id": "Agama-start-Flow-5e5f716c-d68a-48fe-9ab3-ce1d4292176e", - "type": "start", - "sourcePosition": "right", - "data": { - "id": "Agama-start-Flow-5e5f716c-d68a-48fe-9ab3-ce1d4292176e", - "type": "Agama-start-Flow", + "id": "logNode-ebba8087-752c-4442-b259-3532a0c809d8", + "type": "logNode", "position": { - "x": 73, - "y": 76 - }, - "inRepeatBlock": false, - "agamaData": { - "id": "Agama-start-Flow-5e5f716c-d68a-48fe-9ab3-ce1d4292176e", - "type": "Agama-start-Flow", - "displayName": "", - "hasComment": true, - "comment": "Check OTP flow", - "isTopLevelFlow": true, - "basepath": "", - "configParams": "{}", - "nodeIcon": "material-symbols:line-start-square", - "timeout": "", - "inputs": "userId secretKey qrCodeAlg", - "configs": "", - "flowname": "org.gluu.agama.totp.otp" + "x": 300, + "y": 200 }, - "skake": false + "previousNodeId": "startNode-62103db5-a3a8-48cd-929f-48073d9ed298" }, + "type": "logNode", + "id": "logNode-ebba8087-752c-4442-b259-3532a0c809d8", "position": { - "x": 73, - "y": 76 + "x": 300, + "y": 200 }, - "selected": false, - "positionAbsolute": { - "x": 73, - "y": 76 - }, - "dragging": false + "measured": { + "width": 170, + "height": 124 + } }, { - "width": 170, - "height": 124, - "id": "Agama-rrf-Node-2fb5c7e5-ecbf-4c82-8e15-822c5105d11a", - "position": { - "x": 547.6644736859095, - "y": 71.56310229821389 - }, - "type": "rrf", "data": { - "id": "Agama-rrf-Node-2fb5c7e5-ecbf-4c82-8e15-822c5105d11a", - "type": "Agama-rrf-Node", - "parentId": "Agama-log-Node-dc952936-0fc5-48dd-b663-a6eb20014b90", - "whenCondition": "", - "inRepeatBlock": "", - "position": { - "x": 547.6644736859095, - "y": 71.56310229821389 - }, "agamaData": { - "id": "Agama-rrf-Node-2fb5c7e5-ecbf-4c82-8e15-822c5105d11a", - "parentId": "Agama-log-Node-dc952936-0fc5-48dd-b663-a6eb20014b90", - "type": "Agama-rrf-Node", + "nodeIcon": "ph:globe-simple", + "nodeColor": "#78dcdc", "displayName": "", "hasComment": true, "comment": "Load OTP login page", - "whenCondition": "", - "inRepeatBlock": false, - "assignments": [], - "nodeIcon": "ph:globe-simple", - "templatePath": "otplogin.ftlh", - "asssignedVariableName": "scanCode", "arguments": [ "" ], - "position": { - "x": 1023 - }, - "nodeColor": "#78dcdc" + "templatePath": "otplogin.ftlh", + "asssignedVariableName": "scanCode" + }, + "id": "rrfNode-e0c25dad-14cc-46e4-9de1-61ef90e77280", + "type": "rrfNode", + "position": { + "x": 550, + "y": 200 }, - "skake": false + "previousNodeId": "logNode-ebba8087-752c-4442-b259-3532a0c809d8" }, - "selected": false, - "dragging": false, - "positionAbsolute": { - "x": 547.6644736859095, - "y": 71.56310229821389 + "type": "rrfNode", + "id": "rrfNode-e0c25dad-14cc-46e4-9de1-61ef90e77280", + "position": { + "x": 550, + "y": 200 }, - "whenCondition": "", - "inRepeatBlock": "" + "measured": { + "width": 170, + "height": 124 + } }, { - "width": 170, - "height": 124, - "id": "Agama-log-Node-7b87d29e-978e-4ee5-8ca5-a57f34f09340", - "position": { - "x": 1461.6472386958326, - "y": 73.43689770178611 - }, - "type": "log", "data": { - "id": "Agama-log-Node-7b87d29e-978e-4ee5-8ca5-a57f34f09340", - "type": "Agama-log-Node", - "parentId": "Agama-call-Node-267dcb6f-5223-46ae-8c3a-6b55e683a82e", - "whenCondition": "", - "inRepeatBlock": "", - "position": { - "x": 1461.6472386958326, - "y": 73.43689770178611 - }, "agamaData": { - "id": "Agama-log-Node-7b87d29e-978e-4ee5-8ca5-a57f34f09340", - "parentId": "Agama-call-Node-267dcb6f-5223-46ae-8c3a-6b55e683a82e", - "type": "Agama-log-Node", + "nodeIcon": "octicon:log-16", "displayName": "", "hasComment": true, - "comment": "Debug Log : OTP check result", - "whenCondition": "", - "inRepeatBlock": "", - "logMessage": "\"otp check result \" otpCheck", - "logLevel": "debug", - "nodeIcon": "octicon:log-16" + "comment": "Debug Log: Log OTP which is entered by User", + "logMessage": "\"scan code : \" scanCode.code", + "logLevel": "debug" }, - "skake": false - }, - "selected": false, - "dragging": false, - "positionAbsolute": { - "x": 1461.6472386958326, - "y": 73.43689770178611 - } - }, - { - "width": 170, - "height": 124, - "id": "finish-c68f8f3f-884c-457d-a755-90d87687ab0f", - "position": { - "x": 244.02483320873216, - "y": 5.75620830218304 - }, - "type": "finish", - "data": { - "id": "finish-c68f8f3f-884c-457d-a755-90d87687ab0f", - "type": "Agama-finish-Flow", - "parentId": "Agama-log-Node-7b87d29e-978e-4ee5-8ca5-a57f34f09340", - "whenCondition": "", - "inRepeatBlock": "", - "handles": [], + "id": "logNode-6a8c5fdf-4fb8-4ed7-a3a5-a8180c127bb6", + "type": "logNode", "position": { - "x": 244.02483320873216, - "y": 5.75620830218304 + "x": 800, + "y": 200 }, - "agamaData": { - "id": "finish-c68f8f3f-884c-457d-a755-90d87687ab0f", - "parentId": "Agama-log-Node-7b87d29e-978e-4ee5-8ca5-a57f34f09340", - "type": "Agama-finish-Flow", - "hasSuccess": false, - "hasFailure": false, - "hasComment": true, - "comment": "Return OTP Check result", - "flowfilename": "", - "returnVariable": "otpCheck", - "finishMode": "withVariable", - "nodeIcon": "material-symbols:line-end-square-rounded", - "position": { - "x": 2125 - } - }, - "skake": false + "previousNodeId": "rrfNode-e0c25dad-14cc-46e4-9de1-61ef90e77280" }, - "selected": false, - "dragging": false, - "positionAbsolute": { - "x": 1705.6720719045647, - "y": 79.19310600396915 + "type": "logNode", + "id": "logNode-6a8c5fdf-4fb8-4ed7-a3a5-a8180c127bb6", + "position": { + "x": 800, + "y": 200 }, - "parentId": "Agama-log-Node-7b87d29e-978e-4ee5-8ca5-a57f34f09340", - "whenCondition": "", - "inRepeatBlock": "" + "measured": { + "width": 170, + "height": 124 + } }, { - "width": 170, - "height": 124, - "id": "Agama-call-Node-6f540ec4-1b03-4f0a-9b84-109d48aa2e36", - "position": { - "x": 1012.267986947503, - "y": 73.69444203715148 - }, - "type": "call", "data": { - "id": "Agama-call-Node-6f540ec4-1b03-4f0a-9b84-109d48aa2e36", - "type": "Agama-call-Node", - "parentId": "Agama-log-Node-441636e3-14cb-468e-bae0-0572444eb30c", - "whenCondition": "", - "inRepeatBlock": "", - "position": { - "x": 1012.267986947503, - "y": 73.69444203715148 - }, "agamaData": { - "id": "Agama-call-Node-6f540ec4-1b03-4f0a-9b84-109d48aa2e36", - "parentId": "Agama-log-Node-441636e3-14cb-468e-bae0-0572444eb30c", - "type": "Agama-call-Node", + "nodeIcon": "material-symbols:code", "displayName": "", "hasComment": true, "comment": "Get Instance TOTPService", @@ -377,44 +137,33 @@ "javaVariableName": "", "exceptionVariableField": "E", "callType": "Call static method", - "whenCondition": "", - "inRepeatBlock": "", "arguments": [], - "nodeIcon": "material-symbols:code", "asssignedVariableName": "OTPServiceObj" }, - "skake": false + "id": "callNode-87deb26e-ed39-48d8-b288-61d22d4feaea", + "type": "callNode", + "position": { + "x": 1050, + "y": 200 + }, + "previousNodeId": "logNode-6a8c5fdf-4fb8-4ed7-a3a5-a8180c127bb6" }, - "selected": false, - "dragging": false, - "positionAbsolute": { - "x": 1012.267986947503, - "y": 73.69444203715148 + "type": "callNode", + "id": "callNode-87deb26e-ed39-48d8-b288-61d22d4feaea", + "position": { + "x": 1050, + "y": 200 + }, + "measured": { + "width": 170, + "height": 124 } }, { - "width": 170, - "height": 124, - "id": "Agama-call-Node-267dcb6f-5223-46ae-8c3a-6b55e683a82e", - "position": { - "x": 236.2423801157081, - "y": -8.832255174505377 - }, - "type": "call", "data": { - "id": "Agama-call-Node-267dcb6f-5223-46ae-8c3a-6b55e683a82e", - "type": "Agama-call-Node", - "parentId": "Agama-call-Node-6f540ec4-1b03-4f0a-9b84-109d48aa2e36", - "whenCondition": "", - "inRepeatBlock": "", - "position": { - "x": 236.2423801157081, - "y": -8.832255174505377 - }, "agamaData": { - "id": "Agama-call-Node-267dcb6f-5223-46ae-8c3a-6b55e683a82e", - "parentId": "Agama-log-Node-441636e3-14cb-468e-bae0-0572444eb30c", - "type": "Agama-call-Node", + "nodeIcon": "material-symbols:code", + "nodeColor": "#a6d9a9", "displayName": "", "hasComment": true, "comment": "Call validateTOTP method to check OTP is valid or not", @@ -423,269 +172,228 @@ "javaVariableName": "OTPServiceObj", "exceptionVariableField": "", "callType": "Call method on instance", - "whenCondition": "", - "inRepeatBlock": "", "arguments": [ "scanCode.code", "secretKey", "qrCodeAlg" ], - "nodeIcon": "material-symbols:code", - "asssignedVariableName": "otpCheck", - "nodeColor": "#a6d9a9" + "asssignedVariableName": "otpCheck" + }, + "id": "callNode-ecd5585c-d6b0-476a-af73-8336f92ebd28", + "type": "callNode", + "position": { + "x": 1300, + "y": 200 }, - "skake": false + "previousNodeId": "callNode-87deb26e-ed39-48d8-b288-61d22d4feaea" }, - "selected": true, - "positionAbsolute": { - "x": 1248.510367063211, - "y": 64.8621868626461 + "type": "callNode", + "id": "callNode-ecd5585c-d6b0-476a-af73-8336f92ebd28", + "position": { + "x": 1300, + "y": 200 }, - "dragging": false, - "parentId": "Agama-call-Node-6f540ec4-1b03-4f0a-9b84-109d48aa2e36", - "whenCondition": "", - "inRepeatBlock": "" - } - ], - "edges": [ - { - "id": "Agama-start-Flow-5e5f716c-d68a-48fe-9ab3-ce1d4292176e-Agama-log-Node-dc952936-0fc5-48dd-b663-a6eb20014b90-04ea698c-e86e-4b5c-9dd5-93b11a4b4848", - "type": "straight", - "source": "Agama-start-Flow-5e5f716c-d68a-48fe-9ab3-ce1d4292176e", - "target": "Agama-log-Node-dc952936-0fc5-48dd-b663-a6eb20014b90", - "label": "", - "labelBgPadding": [ - 8, - 4 - ], - "labelBgBorderRadius": 4, - "labelBgStyle": { - "fill": "#FFCC00", - "color": "#fff", - "fillOpacity": 0.7 + "measured": { + "width": 170, + "height": 124 } }, { - "id": "Agama-call-Node-4fc43ccf-0635-4caa-b29f-d19bb783b4a8-Agama-call-Node-c688f0d8-21d7-46cd-9e05-8f7ec0401036-a1c8161d-4210-4309-91de-2e5dd9db0243", - "type": "straight", - "source": "Agama-call-Node-4fc43ccf-0635-4caa-b29f-d19bb783b4a8", - "target": "Agama-call-Node-c688f0d8-21d7-46cd-9e05-8f7ec0401036", - "label": "", - "labelBgPadding": [ - 8, - 4 - ], - "labelBgBorderRadius": 4, - "labelBgStyle": { - "fill": "#FFCC00", - "color": "#fff", - "fillOpacity": 0.7 + "data": { + "agamaData": { + "nodeIcon": "octicon:log-16", + "displayName": "", + "hasComment": true, + "comment": "Debug Log : OTP check result", + "logMessage": "\"otp check result \" otpCheck", + "logLevel": "debug" + }, + "id": "logNode-943c6de8-1cde-4451-8856-e757589be0af", + "type": "logNode", + "position": { + "x": 1550, + "y": 200 + }, + "previousNodeId": "callNode-ecd5585c-d6b0-476a-af73-8336f92ebd28" + }, + "type": "logNode", + "id": "logNode-943c6de8-1cde-4451-8856-e757589be0af", + "position": { + "x": 1550, + "y": 200 + }, + "measured": { + "width": 170, + "height": 124 } }, { - "id": "Agama-call-Node-c688f0d8-21d7-46cd-9e05-8f7ec0401036-Agama-log-Node-d7a640f7-f1cd-4c0a-9808-daff3b9fb0ea-9aa38763-426a-4c46-8a00-4d7c8f88553d", - "type": "straight", - "source": "Agama-call-Node-c688f0d8-21d7-46cd-9e05-8f7ec0401036", - "target": "Agama-log-Node-d7a640f7-f1cd-4c0a-9808-daff3b9fb0ea", - "label": "", - "labelBgPadding": [ - 8, - 4 - ], - "labelBgBorderRadius": 4, - "labelBgStyle": { - "fill": "#FFCC00", - "color": "#fff", - "fillOpacity": 0.7 + "data": { + "agamaData": { + "nodeIcon": "material-symbols:line-end-square-rounded", + "hasComment": true, + "comment": "Return OTP Check result", + "returnVariable": "otpCheck", + "finishMode": "withVariable" + }, + "id": "finishNode-42ae2c00-219e-469c-8d6d-ba73408e9833", + "type": "finishNode", + "position": { + "x": 1800, + "y": 200 + }, + "previousNodeId": "logNode-943c6de8-1cde-4451-8856-e757589be0af" + }, + "type": "finishNode", + "id": "finishNode-42ae2c00-219e-469c-8d6d-ba73408e9833", + "position": { + "x": 1800, + "y": 200 + }, + "measured": { + "width": 170, + "height": 124 } - }, + } + ], + "edges": [ { - "id": "Agama-log-Node-dc952936-0fc5-48dd-b663-a6eb20014b90-Agama-rrf-Node-f3a22102-38e5-424b-9873-17d16d452886-1fdef53e-3152-47a1-84b6-2a0dec04de3b", - "type": "straight", - "source": "Agama-log-Node-dc952936-0fc5-48dd-b663-a6eb20014b90", - "target": "Agama-rrf-Node-f3a22102-38e5-424b-9873-17d16d452886", - "label": "", + "id": "startNode-62103db5-a3a8-48cd-929f-48073d9ed298-logNode-ebba8087-752c-4442-b259-3532a0c809d8", + "type": "default", + "source": "startNode-62103db5-a3a8-48cd-929f-48073d9ed298", + "target": "logNode-ebba8087-752c-4442-b259-3532a0c809d8", "labelBgPadding": [ 8, 4 ], "labelBgBorderRadius": 4, - "labelBgStyle": { - "fill": "#FFCC00", - "color": "#fff", - "fillOpacity": 0.7 - } - }, - { - "id": "Agama-rrf-Node-f3a22102-38e5-424b-9873-17d16d452886-Agama-call-Node-4fc43ccf-0635-4caa-b29f-d19bb783b4a8-4807901b-71bb-4a83-9951-e16becf58018", - "type": "straight", - "source": "Agama-rrf-Node-f3a22102-38e5-424b-9873-17d16d452886", - "target": "Agama-call-Node-4fc43ccf-0635-4caa-b29f-d19bb783b4a8", "label": "", - "labelBgPadding": [ - 8, - 4 - ], - "labelBgBorderRadius": 4, "labelBgStyle": { - "fill": "#FFCC00", - "color": "#fff", + "fill": "#009688", + "color": "#ffffff", "fillOpacity": 0.7 - } - }, - { - "id": "Agama-log-Node-dc952936-0fc5-48dd-b663-a6eb20014b90-Agama-call-Node-4fc43ccf-0635-4caa-b29f-d19bb783b4a8-4c9be067-0e39-4e6c-9645-65559b079357", - "type": "straight", - "source": "Agama-log-Node-dc952936-0fc5-48dd-b663-a6eb20014b90", - "target": "Agama-call-Node-4fc43ccf-0635-4caa-b29f-d19bb783b4a8" + }, + "labelShowBg": true, + "sourceHandle": "source_startNode-62103db5-a3a8-48cd-929f-48073d9ed298" }, { - "id": "Agama-rrf-Node-2fb5c7e5-ecbf-4c82-8e15-822c5105d11a-Agama-log-Node-441636e3-14cb-468e-bae0-0572444eb30c-2b7d93ed-4f1e-4ee1-9f0a-513729eb49b5", - "type": "straight", - "source": "Agama-rrf-Node-2fb5c7e5-ecbf-4c82-8e15-822c5105d11a", - "target": "Agama-log-Node-441636e3-14cb-468e-bae0-0572444eb30c", - "label": "", + "id": "logNode-ebba8087-752c-4442-b259-3532a0c809d8-rrfNode-e0c25dad-14cc-46e4-9de1-61ef90e77280", + "type": "default", + "source": "logNode-ebba8087-752c-4442-b259-3532a0c809d8", + "target": "rrfNode-e0c25dad-14cc-46e4-9de1-61ef90e77280", "labelBgPadding": [ 8, 4 ], "labelBgBorderRadius": 4, - "labelBgStyle": { - "fill": "#FFCC00", - "color": "#fff", - "fillOpacity": 0.7 - } - }, - { - "id": "Agama-log-Node-d7a640f7-f1cd-4c0a-9808-daff3b9fb0ea-Agama-assignment-Node-04f8c5b3-dd9c-4b9c-b0e2-972fa22afb74-2cd6f745-5118-4ea4-a668-0a2ca992d283", - "type": "straight", - "source": "Agama-log-Node-d7a640f7-f1cd-4c0a-9808-daff3b9fb0ea", - "target": "Agama-assignment-Node-04f8c5b3-dd9c-4b9c-b0e2-972fa22afb74", "label": "", - "labelBgPadding": [ - 8, - 4 - ], - "labelBgBorderRadius": 4, "labelBgStyle": { - "fill": "#FFCC00", - "color": "#fff", + "fill": "#009688", + "color": "#ffffff", "fillOpacity": 0.7 - } + }, + "labelShowBg": true, + "sourceHandle": "source_logNode-ebba8087-752c-4442-b259-3532a0c809d8" }, { - "id": "Agama-assignment-Node-04f8c5b3-dd9c-4b9c-b0e2-972fa22afb74-Agama-rrf-Node-2fb5c7e5-ecbf-4c82-8e15-822c5105d11a-e366671b-17b5-439b-999b-021d58b6f54e", - "type": "straight", - "source": "Agama-assignment-Node-04f8c5b3-dd9c-4b9c-b0e2-972fa22afb74", - "target": "Agama-rrf-Node-2fb5c7e5-ecbf-4c82-8e15-822c5105d11a", - "label": "", + "id": "rrfNode-e0c25dad-14cc-46e4-9de1-61ef90e77280-logNode-6a8c5fdf-4fb8-4ed7-a3a5-a8180c127bb6", + "type": "default", + "source": "rrfNode-e0c25dad-14cc-46e4-9de1-61ef90e77280", + "target": "logNode-6a8c5fdf-4fb8-4ed7-a3a5-a8180c127bb6", "labelBgPadding": [ 8, 4 ], "labelBgBorderRadius": 4, + "label": "", "labelBgStyle": { - "fill": "#FFCC00", - "color": "#fff", + "fill": "#009688", + "color": "#ffffff", "fillOpacity": 0.7 - } + }, + "labelShowBg": true, + "sourceHandle": "source_rrfNode-e0c25dad-14cc-46e4-9de1-61ef90e77280" }, { - "id": "Agama-call-Node-267dcb6f-5223-46ae-8c3a-6b55e683a82e-Agama-log-Node-7b87d29e-978e-4ee5-8ca5-a57f34f09340-f78ed591-6f94-4379-9a44-9551c94e12b4", - "type": "straight", - "source": "Agama-call-Node-267dcb6f-5223-46ae-8c3a-6b55e683a82e", - "target": "Agama-log-Node-7b87d29e-978e-4ee5-8ca5-a57f34f09340", - "label": "", + "id": "logNode-6a8c5fdf-4fb8-4ed7-a3a5-a8180c127bb6-callNode-87deb26e-ed39-48d8-b288-61d22d4feaea", + "type": "default", + "source": "logNode-6a8c5fdf-4fb8-4ed7-a3a5-a8180c127bb6", + "target": "callNode-87deb26e-ed39-48d8-b288-61d22d4feaea", "labelBgPadding": [ 8, 4 ], "labelBgBorderRadius": 4, + "label": "", "labelBgStyle": { - "fill": "#FFCC00", - "color": "#fff", + "fill": "#009688", + "color": "#ffffff", "fillOpacity": 0.7 - } + }, + "labelShowBg": true, + "sourceHandle": "source_logNode-6a8c5fdf-4fb8-4ed7-a3a5-a8180c127bb6" }, { - "id": "Agama-log-Node-7b87d29e-978e-4ee5-8ca5-a57f34f09340-finish-c68f8f3f-884c-457d-a755-90d87687ab0f-d4d104a5-5508-40b2-a123-cea697afdfb2", - "type": "straight", - "source": "Agama-log-Node-7b87d29e-978e-4ee5-8ca5-a57f34f09340", - "target": "finish-c68f8f3f-884c-457d-a755-90d87687ab0f", - "label": "", + "id": "callNode-87deb26e-ed39-48d8-b288-61d22d4feaea-callNode-ecd5585c-d6b0-476a-af73-8336f92ebd28", + "type": "default", + "source": "callNode-87deb26e-ed39-48d8-b288-61d22d4feaea", + "target": "callNode-ecd5585c-d6b0-476a-af73-8336f92ebd28", "labelBgPadding": [ 8, 4 ], "labelBgBorderRadius": 4, + "label": "", "labelBgStyle": { - "fill": "#FFCC00", - "color": "#fff", + "fill": "#009688", + "color": "#ffffff", "fillOpacity": 0.7 - } - }, - { - "id": "Agama-log-Node-dc952936-0fc5-48dd-b663-a6eb20014b90-Agama-call-Node-c688f0d8-21d7-46cd-9e05-8f7ec0401036-271366bf-8634-4abc-baee-2b133c692721", - "type": "straight", - "source": "Agama-log-Node-dc952936-0fc5-48dd-b663-a6eb20014b90", - "target": "Agama-call-Node-c688f0d8-21d7-46cd-9e05-8f7ec0401036" - }, - { - "id": "Agama-log-Node-dc952936-0fc5-48dd-b663-a6eb20014b90-Agama-log-Node-d7a640f7-f1cd-4c0a-9808-daff3b9fb0ea-fc4dde14-fd78-4688-a4c1-80b393309de9", - "type": "straight", - "source": "Agama-log-Node-dc952936-0fc5-48dd-b663-a6eb20014b90", - "target": "Agama-log-Node-d7a640f7-f1cd-4c0a-9808-daff3b9fb0ea" - }, - { - "id": "Agama-log-Node-d7a640f7-f1cd-4c0a-9808-daff3b9fb0ea-Agama-rrf-Node-2fb5c7e5-ecbf-4c82-8e15-822c5105d11a-1e568933-e933-4126-b5a2-f700371a1279", - "type": "straight", - "source": "Agama-log-Node-d7a640f7-f1cd-4c0a-9808-daff3b9fb0ea", - "target": "Agama-rrf-Node-2fb5c7e5-ecbf-4c82-8e15-822c5105d11a" - }, - { - "id": "Agama-log-Node-dc952936-0fc5-48dd-b663-a6eb20014b90-Agama-rrf-Node-2fb5c7e5-ecbf-4c82-8e15-822c5105d11a-7a2e2489-7bde-465c-a14b-7b83eb1ba87e", - "type": "straight", - "source": "Agama-log-Node-dc952936-0fc5-48dd-b663-a6eb20014b90", - "target": "Agama-rrf-Node-2fb5c7e5-ecbf-4c82-8e15-822c5105d11a" + }, + "labelShowBg": true, + "sourceHandle": "source_callNode-87deb26e-ed39-48d8-b288-61d22d4feaea" }, { - "id": "Agama-log-Node-441636e3-14cb-468e-bae0-0572444eb30c-Agama-call-Node-6f540ec4-1b03-4f0a-9b84-109d48aa2e36-e4dead6f-94aa-46f0-8e58-e9370bb2f17c", - "type": "straight", - "source": "Agama-log-Node-441636e3-14cb-468e-bae0-0572444eb30c", - "target": "Agama-call-Node-6f540ec4-1b03-4f0a-9b84-109d48aa2e36", - "label": "", + "id": "callNode-ecd5585c-d6b0-476a-af73-8336f92ebd28-logNode-943c6de8-1cde-4451-8856-e757589be0af", + "type": "default", + "source": "callNode-ecd5585c-d6b0-476a-af73-8336f92ebd28", + "target": "logNode-943c6de8-1cde-4451-8856-e757589be0af", "labelBgPadding": [ 8, 4 ], "labelBgBorderRadius": 4, + "label": "", "labelBgStyle": { - "fill": "#FFCC00", - "color": "#fff", + "fill": "#009688", + "color": "#ffffff", "fillOpacity": 0.7 - } + }, + "labelShowBg": true, + "sourceHandle": "source_callNode-ecd5585c-d6b0-476a-af73-8336f92ebd28" }, { - "id": "Agama-call-Node-6f540ec4-1b03-4f0a-9b84-109d48aa2e36-Agama-call-Node-267dcb6f-5223-46ae-8c3a-6b55e683a82e-e7a521ae-09d5-4d8d-a9c5-f6c3ba36c49d", - "type": "straight", - "source": "Agama-call-Node-6f540ec4-1b03-4f0a-9b84-109d48aa2e36", - "target": "Agama-call-Node-267dcb6f-5223-46ae-8c3a-6b55e683a82e", - "label": "", + "id": "logNode-943c6de8-1cde-4451-8856-e757589be0af-finishNode-42ae2c00-219e-469c-8d6d-ba73408e9833", + "type": "default", + "source": "logNode-943c6de8-1cde-4451-8856-e757589be0af", + "target": "finishNode-42ae2c00-219e-469c-8d6d-ba73408e9833", "labelBgPadding": [ 8, 4 ], "labelBgBorderRadius": 4, + "label": "", "labelBgStyle": { - "fill": "#FFCC00", - "color": "#fff", + "fill": "#009688", + "color": "#ffffff", "fillOpacity": 0.7 - } + }, + "labelShowBg": true, + "sourceHandle": "source_logNode-943c6de8-1cde-4451-8856-e757589be0af" } ], "viewport": { - "x": 104.682334135171, - "y": 340.7166554270739, - "zoom": 0.5 + "x": 0, + "y": 0, + "zoom": 1 } } \ No newline at end of file From 988584e68689a6e3eebdf1a4f08296c1ceb1b466 Mon Sep 17 00:00:00 2001 From: Kiran Mali <39133739+kdhttps@users.noreply.github.com> Date: Tue, 19 Nov 2024 18:50:25 +0530 Subject: [PATCH 29/32] refactor: update org.gluu.agama.totp.otp.flow From daf24517b4b43318068d419af5953e05215ee48a Mon Sep 17 00:00:00 2001 From: Kiran Mali <39133739+kdhttps@users.noreply.github.com> Date: Tue, 19 Nov 2024 18:58:25 +0530 Subject: [PATCH 30/32] feat: update project.json From 01751a0fccc35bb6e8bfb754a57387a1fc13b39c Mon Sep 17 00:00:00 2001 From: Kiran Mali <39133739+kdhttps@users.noreply.github.com> Date: Tue, 19 Nov 2024 18:58:27 +0530 Subject: [PATCH 31/32] refactor: update org.gluu.agama.totp.pw.json --- code/org.gluu.agama.totp.pw.json | 1294 +++++++++--------------------- 1 file changed, 393 insertions(+), 901 deletions(-) diff --git a/code/org.gluu.agama.totp.pw.json b/code/org.gluu.agama.totp.pw.json index 3393dab..d37c908 100644 --- a/code/org.gluu.agama.totp.pw.json +++ b/code/org.gluu.agama.totp.pw.json @@ -1,1125 +1,617 @@ { "nodes": [ { - "width": 270, - "height": 68, - "id": "Agama-note-28f805fe-8d5a-4bdc-b040-b5adf9c704a9", + "data": { + "agamaData": { + "isTopLevelFlow": false, + "basepath": "", + "configParams": "{}", + "creationDate": "19/11/2024", + "nodeColor": "", + "timeout": "", + "inputs": "", + "flowname": "org.gluu.agama.totp.pw", + "displayName": "gluu agama pw", + "hasComment": true, + "comment": "" + }, + "id": "startNode-cc15e5ab-60e6-4788-8840-4bfbdc448e58", + "type": "startNode", + "position": { + "x": 50, + "y": 200 + } + }, + "type": "startNode", + "id": "startNode-cc15e5ab-60e6-4788-8840-4bfbdc448e58", "position": { - "x": 4, - "y": -24 + "x": 50, + "y": 200 }, - "type": "notes", + "measured": { + "width": 170, + "height": 124 + } + }, + { "data": { - "id": "Agama-note-28f805fe-8d5a-4bdc-b040-b5adf9c704a9", - "type": "Agama-note", - "notes": "Simple flow for user authn. Load login page , ask user to enter username password, and validate credentials ", + "agamaData": { + "nodeIcon": "octicon:log-16", + "nodeColor": "", + "displayName": "Init objects", + "hasComment": true, + "comment": "", + "logMessage": "\"init objects\"", + "logLevel": "info" + }, + "id": "logNode-8d9d5359-4b23-4edb-8bb8-92061986aa2f", + "type": "logNode", "position": { - "x": 4, - "y": -24 + "x": 300, + "y": 200 }, - "skake": false + "previousNodeId": "startNode-cc15e5ab-60e6-4788-8840-4bfbdc448e58" }, - "selected": false, - "positionAbsolute": { - "x": 4, - "y": -24 + "type": "logNode", + "id": "logNode-8d9d5359-4b23-4edb-8bb8-92061986aa2f", + "position": { + "x": 300, + "y": 200 }, - "dragging": false + "measured": { + "width": 170, + "height": 124 + } }, { - "width": 170, - "height": 124, - "id": "finish-4dae67b1-1c40-4881-9df0-0abe9a652103", - "position": { - "x": 1301, - "y": 80 - }, - "type": "finish", "data": { - "id": "finish-4dae67b1-1c40-4881-9df0-0abe9a652103", - "type": "Agama-finish-Flow", - "parentId": "Agama-repeat-Node-5a8c1743-6bea-463a-a391-263b09b95d76", - "whenCondition": "", - "inRepeatBlock": false, - "handles": [ - "Agama-repeat-Node-5a8c1743-6bea-463a-a391-263b09b95d76.InFlow", - "Agama-repeat-Node-5a8c1743-6bea-463a-a391-263b09b95d76.InRepeatBlock" - ], - "position": { - "x": 1301, - "y": 80 - }, "agamaData": { - "id": "finish-4dae67b1-1c40-4881-9df0-0abe9a652103", - "type": "Agama-finish-Flow", - "hasSuccess": false, - "hasFailure": false, - "hasRepeat": false, + "nodeIcon": "material-symbols:code", + "nodeColor": "", + "displayName": "Init authService", "hasComment": true, - "hasNoRepeat": false, - "isTopLevelFlow": true, - "whenCondition": "", - "inRepeatBlock": false, - "parentId": "Agama-repeat-Node-5a8c1743-6bea-463a-a391-263b09b95d76", - "name": "", - "basepath": "", - "comment": "", - "notes": "", - "flowfilename": "", - "assignments": [ - { - "variableTypeCheck": true, - "assignmentExpression": "", - "assignedVariableName": "" - } - ], - "callType": "Call static method", - "arguments": "", - "logMessage": "", - "templatePath": "", - "maxIteration": "", - "idpAuthEndpoint": "", - "variableField": "", - "conditionInputField": "", - "valueField": "", - "returnVariable": "false", - "javaClassName": "", - "javaMethodName": "", + "comment": "initialize auth server", + "javaClassName": "io.jans.as.server.service.AuthenticationService", + "javaMethodName": "class", "javaVariableName": "", - "maxIterationVariableName": "", - "logLevel": "", - "assignCallbackResult": "", - "displayName": "", - "nodeColor": "", "exceptionVariableField": "", - "finishMode": "withFailure", - "hasExtraData": false, - "configParams": "{}", - "nodeIcon": "material-symbols:line-end-square-rounded" + "callType": "Call static method", + "arguments": "", + "asssignedVariableName": "authService" + }, + "id": "callNode-a536496a-6026-4d8f-850a-43f54d02aa43", + "type": "callNode", + "position": { + "x": 550, + "y": 200 }, - "skake": false + "previousNodeId": "logNode-8d9d5359-4b23-4edb-8bb8-92061986aa2f" }, - "selected": false, - "dragging": false, - "positionAbsolute": { - "x": 1301, - "y": 80 + "type": "callNode", + "id": "callNode-a536496a-6026-4d8f-850a-43f54d02aa43", + "position": { + "x": 550, + "y": 200 + }, + "measured": { + "width": 170, + "height": 124 } }, { - "width": 170, - "height": 124, - "id": "finish-a56f6ed5-78a2-4dff-afa5-73caccea6213", - "position": { - "x": 1922, - "y": 618 - }, - "type": "finish", "data": { - "id": "finish-a56f6ed5-78a2-4dff-afa5-73caccea6213", - "type": "Agama-finish-Flow", - "parentId": "Agama-when-Node-9cb26c5d-64d4-4f9e-b60f-846c01663919", - "whenCondition": "WhenTrue", - "inRepeatBlock": true, - "handles": [ - "Agama-when-Node-9cb26c5d-64d4-4f9e-b60f-846c01663919.FAILURE", - "Agama-when-Node-9cb26c5d-64d4-4f9e-b60f-846c01663919.SUCCESS" - ], - "position": { - "x": 1922, - "y": 618 - }, "agamaData": { - "id": "finish-a56f6ed5-78a2-4dff-afa5-73caccea6213", - "type": "Agama-finish-Flow", - "hasSuccess": false, - "hasFailure": false, - "hasRepeat": false, + "nodeIcon": "material-symbols:code", + "nodeColor": "", + "displayName": "Init CdiUtils", "hasComment": true, - "hasNoRepeat": false, - "isTopLevelFlow": true, - "whenCondition": "WhenTrue", - "inRepeatBlock": true, - "parentId": "Agama-when-Node-9cb26c5d-64d4-4f9e-b60f-846c01663919", - "name": "", - "basepath": "", - "comment": "", - "notes": "", - "flowfilename": "", - "assignments": [ - { - "variableTypeCheck": true, - "assignmentExpression": "", - "assignedVariableName": "" - } - ], - "callType": "Call static method", - "arguments": [ - "" - ], - "logMessage": "", - "templatePath": "", - "maxIteration": "", - "idpAuthEndpoint": "", - "variableField": "", - "conditionInputField": "", - "valueField": "", - "returnVariable": "{userId: authResult.uid}", - "javaClassName": "", - "javaMethodName": "", + "comment": "Initialize CdiUtils", + "javaClassName": "io.jans.service.cdi.util.CdiUtil", + "javaMethodName": "bean", "javaVariableName": "", - "maxIterationVariableName": "", - "logLevel": "", - "assignCallbackResult": "", - "displayName": "", - "nodeColor": "", "exceptionVariableField": "", - "hasExtraData": false, - "configParams": "{}", - "nodeIcon": "material-symbols:line-end-square-rounded", - "finishMode": "withSuccess" + "callType": "Call static method", + "arguments": "authService", + "asssignedVariableName": "cdiUtil" }, - "skake": false + "id": "callNode-fd17bbad-310b-4ef3-a2d1-3aee344efb77", + "type": "callNode", + "position": { + "x": 800, + "y": 200 + }, + "previousNodeId": "callNode-a536496a-6026-4d8f-850a-43f54d02aa43" }, - "positionAbsolute": { - "x": 1922, - "y": 618 + "type": "callNode", + "id": "callNode-fd17bbad-310b-4ef3-a2d1-3aee344efb77", + "position": { + "x": 800, + "y": 200 }, - "selected": false, - "dragging": false + "measured": { + "width": 170, + "height": 124 + } }, { - "width": 110, - "height": 60, - "id": "Agama-when-Node-9cb26c5d-64d4-4f9e-b60f-846c01663919", - "position": { - "x": 251.66666666666652, - "y": 59.333333333333485 - }, - "parentId": "Agama-assignment-Node-f0bd6fb4-5254-427f-ad5a-743441f681c2", - "type": "when", "data": { - "id": "Agama-when-Node-9cb26c5d-64d4-4f9e-b60f-846c01663919", - "type": "Agama-when-Node", - "parentId": "Agama-assignment-Node-f0bd6fb4-5254-427f-ad5a-743441f681c2", - "whenCondition": "", - "inRepeatBlock": true, - "position": { - "x": 251.66666666666652, - "y": 59.333333333333485 - }, "agamaData": { - "id": "Agama-when-Node-9cb26c5d-64d4-4f9e-b60f-846c01663919", - "parentId": "Agama-assignment-Node-f0bd6fb4-5254-427f-ad5a-743441f681c2", - "type": "Agama-when-Node", - "assignments": [ - { - "variableTypeCheck": true, - "assignmentExpression": "", - "assignedVariableName": "" - } - ], - "variableField": "authResult.success", - "conditionInputField": "is", - "valueField": "true", - "comment": "authResult.success is true", + "nodeIcon": "material-symbols:equal", + "nodeColor": "", + "displayName": "Init authResult", "hasComment": true, - "conditions": [ + "comment": "Declare authResult", + "assignments": [ { - "variable": "authResult.success", - "operator": "is", - "dataValue": "true", - "combinator": "none" + "variableTypeCheck": false, + "assignmentExpression": "{}", + "assignedVariableName": "authResult" } ] }, - "handles": [ - "Agama-when-Node-9cb26c5d-64d4-4f9e-b60f-846c01663919.FAILURE", - "Agama-when-Node-9cb26c5d-64d4-4f9e-b60f-846c01663919.SUCCESS" - ], - "skake": false + "id": "assignmentNode-b91099c4-e693-44cd-bae3-3315e10f68b8", + "type": "assignmentNode", + "position": { + "x": 1050, + "y": 200 + }, + "previousNodeId": "callNode-fd17bbad-310b-4ef3-a2d1-3aee344efb77" }, - "selected": true, - "positionAbsolute": { - "x": 1804.6666666666665, - "y": 399.3333333333335 + "type": "assignmentNode", + "id": "assignmentNode-b91099c4-e693-44cd-bae3-3315e10f68b8", + "position": { + "x": 1050, + "y": 200 }, - "dragging": false + "measured": { + "width": 170, + "height": 124 + } }, { - "width": 170, - "height": 124, - "id": "Agama-assignment-Node-f0bd6fb4-5254-427f-ad5a-743441f681c2", - "position": { - "x": 1553, - "y": 340 - }, - "type": "assignment", "data": { - "id": "Agama-assignment-Node-f0bd6fb4-5254-427f-ad5a-743441f681c2", - "type": "Agama-assignment-Node", - "parentId": "Agama-call-Node-3797f6df-13c7-4c2c-9cb6-652051be78e6", - "whenCondition": "", - "inRepeatBlock": true, - "position": { - "x": 1553, - "y": 340 - }, "agamaData": { - "id": "Agama-assignment-Node-f0bd6fb4-5254-427f-ad5a-743441f681c2", - "type": "Agama-assignment-Node", - "hasSuccess": false, - "hasFailure": false, - "hasRepeat": false, - "hasComment": true, - "hasNoRepeat": false, - "isTopLevelFlow": true, - "whenCondition": "", - "inRepeatBlock": true, - "parentId": "Agama-call-Node-3797f6df-13c7-4c2c-9cb6-652051be78e6", - "name": "", - "basepath": "", - "comment": "assign creds.username to authResult.uid", - "notes": "", - "flowfilename": "", - "assignments": [ - { - "variableTypeCheck": false, - "assignmentExpression": "creds.username", - "assignedVariableName": "authResult.uid" - } - ], - "callType": "Call static method", - "arguments": "", - "logMessage": "", - "templatePath": "", - "maxIteration": "", - "idpAuthEndpoint": "", - "variableField": "", - "conditionInputField": "", - "valueField": "", - "returnVariable": "", - "javaClassName": "", - "javaMethodName": "", - "javaVariableName": "", - "maxIterationVariableName": "", - "logLevel": "", - "assignCallbackResult": "", - "displayName": "authResult.uid", + "nodeIcon": "material-symbols:event-repeat-outline-rounded", "nodeColor": "", - "exceptionVariableField": "", - "hasExtraData": false, - "configParams": "{}", - "nodeIcon": "material-symbols:equal" + "displayName": "Retry login", + "hasComment": true, + "comment": "retry login 3 times", + "maxIteration": "3", + "maxIterationVariableName": "" + }, + "id": "repeatNode-75ab0682-defe-4794-b32b-d12cf79bf31f", + "type": "repeatNode", + "position": { + "x": 1300, + "y": 200 }, - "skake": false + "previousNodeId": "assignmentNode-b91099c4-e693-44cd-bae3-3315e10f68b8" + }, + "type": "repeatNode", + "id": "repeatNode-75ab0682-defe-4794-b32b-d12cf79bf31f", + "position": { + "x": 1300, + "y": 200 }, - "selected": false, - "dragging": false, - "positionAbsolute": { - "x": 1553, - "y": 340 + "measured": { + "width": 170, + "height": 124 } }, { - "width": 170, - "height": 124, - "id": "Agama-call-Node-3797f6df-13c7-4c2c-9cb6-652051be78e6", - "position": { - "x": 1353, - "y": 340 - }, - "type": "call", "data": { - "id": "Agama-call-Node-3797f6df-13c7-4c2c-9cb6-652051be78e6", - "type": "Agama-call-Node", - "parentId": "Agama-rrf-Node-3a2ba854-b68f-403d-8a27-89bc71020d17", - "whenCondition": "", - "inRepeatBlock": true, - "position": { - "x": 1353, - "y": 340 - }, "agamaData": { - "id": "Agama-call-Node-3797f6df-13c7-4c2c-9cb6-652051be78e6", - "type": "Agama-call-Node", - "hasSuccess": false, - "hasFailure": false, - "hasRepeat": false, - "hasComment": true, - "hasNoRepeat": false, - "isTopLevelFlow": true, - "whenCondition": "", - "inRepeatBlock": true, - "parentId": "Agama-rrf-Node-3a2ba854-b68f-403d-8a27-89bc71020d17", - "name": "", - "basepath": "", - "comment": "check username password auth", - "notes": "", - "flowfilename": "", - "assignments": [ - { - "variableTypeCheck": true, - "assignmentExpression": "", - "assignedVariableName": "" - } - ], - "callType": "Call method on instance", - "arguments": "creds.username creds.password", - "logMessage": "", - "templatePath": "", - "maxIteration": "", - "idpAuthEndpoint": "", - "variableField": "", - "conditionInputField": "", - "valueField": "", - "returnVariable": "", - "javaClassName": "", - "javaMethodName": "authenticate", - "javaVariableName": "cdiUtil", - "maxIterationVariableName": "", - "logLevel": "", - "assignCallbackResult": "", - "displayName": "Call authentication", + "nodeIcon": "material-symbols:line-end-square-rounded", "nodeColor": "", - "exceptionVariableField": "", - "hasExtraData": false, - "configParams": "{}", - "nodeIcon": "material-symbols:code", - "asssignedVariableName": "authResult.success" + "displayName": "", + "hasComment": true, + "comment": "", + "returnVariable": "false", + "finishMode": "withFailure", + "exceptionVariableField": "" + }, + "id": "finishNode-e4368ba0-deee-4d72-8cc5-559d231fa0ae", + "type": "finishNode", + "position": { + "x": 1550, + "y": 200 }, - "skake": false + "previousNodeId": "repeatNode-75ab0682-defe-4794-b32b-d12cf79bf31f", + "branching": "continue" }, - "selected": false, - "dragging": false, - "positionAbsolute": { - "x": 1353, - "y": 340 + "type": "finishNode", + "id": "finishNode-e4368ba0-deee-4d72-8cc5-559d231fa0ae", + "position": { + "x": 1550, + "y": 200 + }, + "measured": { + "width": 170, + "height": 124 } }, { - "width": 170, - "height": 124, - "id": "Agama-rrf-Node-3a2ba854-b68f-403d-8a27-89bc71020d17", - "position": { - "x": 1153, - "y": 340 - }, - "type": "rrf", "data": { - "id": "Agama-rrf-Node-3a2ba854-b68f-403d-8a27-89bc71020d17", - "type": "Agama-rrf-Node", - "parentId": "Agama-repeat-Node-5a8c1743-6bea-463a-a391-263b09b95d76", - "whenCondition": "", - "inRepeatBlock": true, - "position": { - "x": 1153, - "y": 340 - }, "agamaData": { - "id": "Agama-rrf-Node-3a2ba854-b68f-403d-8a27-89bc71020d17", - "type": "Agama-rrf-Node", - "hasSuccess": false, - "hasFailure": false, - "hasRepeat": false, + "nodeIcon": "ph:globe-simple", + "nodeColor": "", + "displayName": "Login page", "hasComment": true, - "hasNoRepeat": false, - "isTopLevelFlow": true, - "whenCondition": "", - "inRepeatBlock": true, - "parentId": "Agama-repeat-Node-5a8c1743-6bea-463a-a391-263b09b95d76", - "name": "", - "basepath": "", "comment": "Load login page and get username & pasword", - "notes": "", - "flowfilename": "", - "assignments": [ - { - "variableTypeCheck": true, - "assignmentExpression": "", - "assignedVariableName": "" - } - ], - "callType": "Call static method", "arguments": "authResult", - "logMessage": "", "templatePath": "login.ftlh", - "maxIteration": "", - "idpAuthEndpoint": "", - "variableField": "", - "conditionInputField": "", - "valueField": "", - "returnVariable": "", - "javaClassName": "", - "javaMethodName": "", - "javaVariableName": "", - "maxIterationVariableName": "", - "logLevel": "", - "assignCallbackResult": "", - "displayName": "Login page", - "nodeColor": "", - "exceptionVariableField": "", - "hasExtraData": false, - "configParams": "{}", - "nodeIcon": "ph:globe-simple", "asssignedVariableName": "creds" }, - "skake": false + "id": "rrfNode-1f4d967c-3a23-424e-ac43-c4535f4e6c25", + "type": "rrfNode", + "position": { + "x": 1550, + "y": 450 + }, + "previousNodeId": "repeatNode-75ab0682-defe-4794-b32b-d12cf79bf31f", + "branching": "repeat" }, - "selected": false, - "positionAbsolute": { - "x": 1153, - "y": 340 + "type": "rrfNode", + "id": "rrfNode-1f4d967c-3a23-424e-ac43-c4535f4e6c25", + "position": { + "x": 1550, + "y": 450 }, - "dragging": false + "measured": { + "width": 170, + "height": 124 + } }, { - "width": 170, - "height": 124, - "id": "Agama-repeat-Node-5a8c1743-6bea-463a-a391-263b09b95d76", - "position": { - "x": 1051, - "y": 80 - }, - "type": "repeat", "data": { - "id": "Agama-repeat-Node-5a8c1743-6bea-463a-a391-263b09b95d76", - "type": "Agama-repeat-Node", - "parentId": "Agama-assignment-Node-a5df123b-bc4c-4674-974c-9be4e0dc3b31", - "whenCondition": "", - "inRepeatBlock": false, - "handles": [ - "Agama-repeat-Node-5a8c1743-6bea-463a-a391-263b09b95d76.InFlow", - "Agama-repeat-Node-5a8c1743-6bea-463a-a391-263b09b95d76.InRepeatBlock" - ], - "position": { - "x": 1051, - "y": 80 - }, "agamaData": { - "id": "Agama-repeat-Node-5a8c1743-6bea-463a-a391-263b09b95d76", - "type": "Agama-repeat-Node", - "hasSuccess": false, - "hasFailure": false, - "hasRepeat": false, + "nodeIcon": "material-symbols:code", + "nodeColor": "", + "displayName": "Call authentication", "hasComment": true, - "hasNoRepeat": false, - "isTopLevelFlow": true, - "whenCondition": "", - "inRepeatBlock": false, - "parentId": "Agama-assignment-Node-a5df123b-bc4c-4674-974c-9be4e0dc3b31", - "name": "", - "basepath": "", - "comment": "retry login 3 times", - "notes": "", - "flowfilename": "", - "assignments": [ - { - "variableTypeCheck": true, - "assignmentExpression": "", - "assignedVariableName": "" - } - ], - "callType": "Call static method", - "arguments": "", - "logMessage": "", - "templatePath": "", - "maxIteration": "3", - "idpAuthEndpoint": "", - "variableField": "", - "conditionInputField": "", - "valueField": "", - "returnVariable": "", + "comment": "check username password auth", "javaClassName": "", - "javaMethodName": "", - "javaVariableName": "", - "maxIterationVariableName": "", - "logLevel": "", - "assignCallbackResult": "", - "displayName": "Retry login", - "nodeColor": "", + "javaMethodName": "authenticate", + "javaVariableName": "cdiUtil", "exceptionVariableField": "", - "hasExtraData": false, - "configParams": "{}", - "nodeIcon": "material-symbols:event-repeat-outline-rounded" + "callType": "Call method on instance", + "arguments": "creds.username creds.password", + "asssignedVariableName": "authResult.success" }, - "skake": false + "id": "callNode-627bb4ce-1cc4-4e95-b078-4ab900096a5b", + "type": "callNode", + "position": { + "x": 1800, + "y": 450 + }, + "previousNodeId": "rrfNode-1f4d967c-3a23-424e-ac43-c4535f4e6c25" + }, + "type": "callNode", + "id": "callNode-627bb4ce-1cc4-4e95-b078-4ab900096a5b", + "position": { + "x": 1800, + "y": 450 }, - "selected": false, - "dragging": false, - "positionAbsolute": { - "x": 1051, - "y": 80 + "measured": { + "width": 170, + "height": 124 } }, { - "width": 170, - "height": 124, - "id": "Agama-assignment-Node-a5df123b-bc4c-4674-974c-9be4e0dc3b31", - "position": { - "x": 851, - "y": 80 - }, - "type": "assignment", "data": { - "id": "Agama-assignment-Node-a5df123b-bc4c-4674-974c-9be4e0dc3b31", - "type": "Agama-assignment-Node", - "parentId": "Agama-call-Node-94daa735-8cc3-4663-9e60-ceeeb0ac6d24", - "whenCondition": "", - "inRepeatBlock": false, - "position": { - "x": 851, - "y": 80 - }, "agamaData": { - "id": "Agama-assignment-Node-a5df123b-bc4c-4674-974c-9be4e0dc3b31", - "type": "Agama-assignment-Node", - "hasSuccess": false, - "hasFailure": false, - "hasRepeat": false, + "nodeIcon": "material-symbols:equal", + "nodeColor": "", + "displayName": "authResult.uid", "hasComment": true, - "hasNoRepeat": false, - "isTopLevelFlow": true, - "whenCondition": "", - "inRepeatBlock": false, - "parentId": "Agama-call-Node-94daa735-8cc3-4663-9e60-ceeeb0ac6d24", - "name": "", - "basepath": "", - "comment": "Declare authResult", - "notes": "", - "flowfilename": "", + "comment": "assign creds.username to authResult.uid", "assignments": [ { "variableTypeCheck": false, - "assignmentExpression": "{}", - "assignedVariableName": "authResult" + "assignmentExpression": "creds.username", + "assignedVariableName": "authResult.uid" } - ], - "callType": "Call static method", - "arguments": "", - "logMessage": "", - "templatePath": "", - "maxIteration": "", - "idpAuthEndpoint": "", - "variableField": "", - "conditionInputField": "", - "valueField": "", - "returnVariable": "", - "javaClassName": "", - "javaMethodName": "", - "javaVariableName": "", - "maxIterationVariableName": "", - "logLevel": "", - "assignCallbackResult": "", - "displayName": "Init authResult", - "nodeColor": "", - "exceptionVariableField": "", - "hasExtraData": false, - "configParams": "{}", - "nodeIcon": "material-symbols:equal" + ] }, - "skake": false - }, - "selected": false, - "dragging": false, - "positionAbsolute": { - "x": 851, - "y": 80 - } - }, - { - "width": 170, - "height": 124, - "id": "Agama-call-Node-94daa735-8cc3-4663-9e60-ceeeb0ac6d24", - "position": { - "x": 651, - "y": 80 - }, - "type": "call", - "data": { - "id": "Agama-call-Node-94daa735-8cc3-4663-9e60-ceeeb0ac6d24", - "type": "Agama-call-Node", - "parentId": "Agama-call-Node-310b63e1-d4d2-41ef-8f80-908ef5f656e1", - "whenCondition": "", - "inRepeatBlock": false, + "id": "assignmentNode-b4820ce3-e50f-49fd-a5d2-1a2f657ebe66", + "type": "assignmentNode", "position": { - "x": 651, - "y": 80 + "x": 2050, + "y": 450 }, - "agamaData": { - "id": "Agama-call-Node-94daa735-8cc3-4663-9e60-ceeeb0ac6d24", - "type": "Agama-call-Node", - "hasSuccess": false, - "hasFailure": false, - "hasRepeat": false, - "hasComment": true, - "hasNoRepeat": false, - "isTopLevelFlow": true, - "whenCondition": "", - "inRepeatBlock": false, - "parentId": "Agama-call-Node-310b63e1-d4d2-41ef-8f80-908ef5f656e1", - "name": "", - "basepath": "", - "comment": "Initialize CdiUtils", - "notes": "", - "flowfilename": "", - "assignments": [ - { - "variableTypeCheck": true, - "assignmentExpression": "", - "assignedVariableName": "" - } - ], - "callType": "Call static method", - "arguments": "authService", - "logMessage": "", - "templatePath": "", - "maxIteration": "", - "idpAuthEndpoint": "", - "variableField": "", - "conditionInputField": "", - "valueField": "", - "returnVariable": "", - "javaClassName": "io.jans.service.cdi.util.CdiUtil", - "javaMethodName": "bean", - "javaVariableName": "", - "maxIterationVariableName": "", - "logLevel": "", - "assignCallbackResult": "", - "displayName": "Init CdiUtils", - "nodeColor": "", - "exceptionVariableField": "", - "hasExtraData": false, - "configParams": "{}", - "nodeIcon": "material-symbols:code", - "asssignedVariableName": "cdiUtil" - }, - "skake": false - }, - "selected": false, - "positionAbsolute": { - "x": 651, - "y": 80 + "previousNodeId": "callNode-627bb4ce-1cc4-4e95-b078-4ab900096a5b" }, - "dragging": false - }, - { - "width": 170, - "height": 124, - "id": "Agama-call-Node-310b63e1-d4d2-41ef-8f80-908ef5f656e1", + "type": "assignmentNode", + "id": "assignmentNode-b4820ce3-e50f-49fd-a5d2-1a2f657ebe66", "position": { - "x": 434, - "y": 82 + "x": 2050, + "y": 450 }, - "type": "call", - "data": { - "id": "Agama-call-Node-310b63e1-d4d2-41ef-8f80-908ef5f656e1", - "type": "Agama-call-Node", - "parentId": "Agama-log-Node-71331112-b01c-48ca-b55c-d8ecdf295964", - "whenCondition": "", - "inRepeatBlock": false, - "position": { - "x": 434, - "y": 82 - }, - "agamaData": { - "id": "Agama-call-Node-310b63e1-d4d2-41ef-8f80-908ef5f656e1", - "type": "Agama-call-Node", - "hasSuccess": false, - "hasFailure": false, - "hasRepeat": false, - "hasComment": true, - "hasNoRepeat": false, - "isTopLevelFlow": true, - "whenCondition": "", - "inRepeatBlock": false, - "parentId": "Agama-log-Node-71331112-b01c-48ca-b55c-d8ecdf295964", - "name": "", - "basepath": "", - "comment": "initialize auth server", - "notes": "", - "flowfilename": "", - "assignments": [ - { - "variableTypeCheck": true, - "assignmentExpression": "", - "assignedVariableName": "" - } - ], - "callType": "Call static method", - "arguments": "", - "logMessage": "", - "templatePath": "", - "maxIteration": "", - "idpAuthEndpoint": "", - "variableField": "", - "conditionInputField": "", - "valueField": "", - "returnVariable": "", - "javaClassName": "io.jans.as.server.service.AuthenticationService", - "javaMethodName": "class", - "javaVariableName": "", - "maxIterationVariableName": "", - "logLevel": "", - "assignCallbackResult": "", - "displayName": "Init authService", - "nodeColor": "", - "exceptionVariableField": "", - "hasExtraData": false, - "configParams": "{}", - "nodeIcon": "material-symbols:code", - "asssignedVariableName": "authService" - }, - "skake": false - }, - "selected": false, - "dragging": false, - "positionAbsolute": { - "x": 434, - "y": 82 + "measured": { + "width": 170, + "height": 124 } }, { - "width": 170, - "height": 124, - "id": "Agama-log-Node-71331112-b01c-48ca-b55c-d8ecdf295964", - "position": { - "x": 234, - "y": 82 - }, - "type": "log", "data": { - "id": "Agama-log-Node-71331112-b01c-48ca-b55c-d8ecdf295964", - "type": "Agama-log-Node", - "parentId": "Agama-start-Flow-ae2c727f-6087-4115-85ce-d4bd77f398e0", - "whenCondition": "", - "inRepeatBlock": false, - "position": { - "x": 234, - "y": 82 - }, "agamaData": { - "id": "Agama-log-Node-71331112-b01c-48ca-b55c-d8ecdf295964", - "type": "Agama-log-Node", - "hasSuccess": false, - "hasFailure": false, - "hasRepeat": false, "hasComment": true, - "hasNoRepeat": false, - "isTopLevelFlow": true, - "whenCondition": "", - "inRepeatBlock": false, - "parentId": "Agama-start-Flow-ae2c727f-6087-4115-85ce-d4bd77f398e0", - "name": "", - "basepath": "", - "comment": "", - "notes": "", - "flowfilename": "", - "assignments": [ + "comment": "authResult.success is true", + "conditions": [ { - "variableTypeCheck": true, - "assignmentExpression": "", - "assignedVariableName": "" + "variable": "authResult.success", + "operator": "is", + "dataValue": "true", + "combinator": "none" } - ], - "callType": "Call static method", - "arguments": "", - "logMessage": "\"init objects\"", - "templatePath": "", - "maxIteration": "", - "idpAuthEndpoint": "", - "variableField": "", - "conditionInputField": "", - "valueField": "", - "returnVariable": "", - "javaClassName": "", - "javaMethodName": "", - "javaVariableName": "", - "maxIterationVariableName": "", - "logLevel": "info", - "assignCallbackResult": "", - "displayName": "Init objects", - "nodeColor": "", - "exceptionVariableField": "", - "hasExtraData": false, - "configParams": "{}", - "nodeIcon": "octicon:log-16" + ] + }, + "id": "whenNode-edb2bfd7-5709-49a1-8706-2b189bff4e17", + "type": "whenNode", + "position": { + "x": 2300, + "y": 450 }, - "skake": false + "previousNodeId": "assignmentNode-b4820ce3-e50f-49fd-a5d2-1a2f657ebe66" }, - "selected": false, - "dragging": false, - "positionAbsolute": { - "x": 234, - "y": 82 + "type": "whenNode", + "id": "whenNode-edb2bfd7-5709-49a1-8706-2b189bff4e17", + "position": { + "x": 2300, + "y": 450 + }, + "measured": { + "width": 110, + "height": 59 } }, { - "width": 170, - "height": 124, - "id": "Agama-start-Flow-ae2c727f-6087-4115-85ce-d4bd77f398e0", - "type": "start", - "sourcePosition": "right", "data": { - "id": "Agama-start-Flow-ae2c727f-6087-4115-85ce-d4bd77f398e0", - "type": "Agama-start-Flow", - "position": { - "x": 34, - "y": 82 - }, - "inRepeatBlock": false, "agamaData": { - "id": "Agama-start-Flow-ae2c727f-6087-4115-85ce-d4bd77f398e0", - "type": "Agama-start-Flow", - "hasSuccess": false, - "hasFailure": false, - "hasRepeat": false, + "nodeIcon": "material-symbols:line-end-square-rounded", + "nodeColor": "", + "displayName": "", "hasComment": true, - "hasNoRepeat": false, - "isTopLevelFlow": false, - "inRepeatBlock": false, - "name": "", - "basepath": "", "comment": "", - "notes": "", - "flowfilename": "", - "assignments": [], - "callType": "Call static method", - "arguments": [ - "" - ], - "logMessage": "", - "templatePath": "", - "maxIteration": "", - "idpAuthEndpoint": "", - "variableField": "", - "conditionInputField": "", - "valueField": "", - "returnVariable": "", - "javaClassName": "", - "javaMethodName": "", - "javaVariableName": "", - "maxIterationVariableName": "", - "logLevel": "", - "assignCallbackResult": "", - "displayName": "gluu agama pw", - "nodeColor": "", - "exceptionVariableField": "", - "hasExtraData": false, - "configParams": "{}", - "flowname": "org.gluu.agama.totp.pw", - "timeout": "", - "inputs": "" + "returnVariable": "{userId: authResult.uid}", + "finishMode": "withSuccess", + "exceptionVariableField": "" + }, + "id": "finishNode-ed061eff-b03f-40c8-8205-01e6a94a6461", + "type": "finishNode", + "position": { + "x": 2550, + "y": 700 }, - "skake": false + "previousNodeId": "whenNode-edb2bfd7-5709-49a1-8706-2b189bff4e17", + "branching": "success" }, + "type": "finishNode", + "id": "finishNode-ed061eff-b03f-40c8-8205-01e6a94a6461", "position": { - "x": 34, - "y": 82 - }, - "selected": false, - "positionAbsolute": { - "x": 34, - "y": 82 + "x": 2550, + "y": 700 }, - "dragging": false + "measured": { + "width": 170, + "height": 124 + } } ], "edges": [ { - "id": "Agama-start-Flow-ae2c727f-6087-4115-85ce-d4bd77f398e0-Agama-log-Node-71331112-b01c-48ca-b55c-d8ecdf295964-a1de776a-efd6-492d-bcdc-a2fbe7650577", - "type": "straight", - "source": "Agama-start-Flow-ae2c727f-6087-4115-85ce-d4bd77f398e0", - "target": "Agama-log-Node-71331112-b01c-48ca-b55c-d8ecdf295964", - "label": "", + "id": "startNode-cc15e5ab-60e6-4788-8840-4bfbdc448e58-logNode-8d9d5359-4b23-4edb-8bb8-92061986aa2f", + "type": "default", + "source": "startNode-cc15e5ab-60e6-4788-8840-4bfbdc448e58", + "target": "logNode-8d9d5359-4b23-4edb-8bb8-92061986aa2f", "labelBgPadding": [ 8, 4 ], "labelBgBorderRadius": 4, + "label": "", "labelBgStyle": { - "fill": "#FFCC00", - "color": "#fff", + "fill": "#009688", + "color": "#ffffff", "fillOpacity": 0.7 - } + }, + "labelShowBg": true, + "sourceHandle": "source_startNode-cc15e5ab-60e6-4788-8840-4bfbdc448e58" }, { - "id": "Agama-log-Node-71331112-b01c-48ca-b55c-d8ecdf295964-Agama-call-Node-310b63e1-d4d2-41ef-8f80-908ef5f656e1-e681b406-abaf-4af4-82b4-f40459cc61ab", - "type": "straight", - "source": "Agama-log-Node-71331112-b01c-48ca-b55c-d8ecdf295964", - "target": "Agama-call-Node-310b63e1-d4d2-41ef-8f80-908ef5f656e1", - "label": "", + "id": "logNode-8d9d5359-4b23-4edb-8bb8-92061986aa2f-callNode-a536496a-6026-4d8f-850a-43f54d02aa43", + "type": "default", + "source": "logNode-8d9d5359-4b23-4edb-8bb8-92061986aa2f", + "target": "callNode-a536496a-6026-4d8f-850a-43f54d02aa43", "labelBgPadding": [ 8, 4 ], "labelBgBorderRadius": 4, + "label": "", "labelBgStyle": { - "fill": "#FFCC00", - "color": "#fff", + "fill": "#009688", + "color": "#ffffff", "fillOpacity": 0.7 - } + }, + "labelShowBg": true, + "sourceHandle": "source_logNode-8d9d5359-4b23-4edb-8bb8-92061986aa2f" }, { - "id": "Agama-call-Node-310b63e1-d4d2-41ef-8f80-908ef5f656e1-Agama-call-Node-94daa735-8cc3-4663-9e60-ceeeb0ac6d24-9cf6ae29-1a8d-464f-b980-c42bf2c8d121", - "type": "straight", - "source": "Agama-call-Node-310b63e1-d4d2-41ef-8f80-908ef5f656e1", - "target": "Agama-call-Node-94daa735-8cc3-4663-9e60-ceeeb0ac6d24", - "label": "", + "id": "callNode-a536496a-6026-4d8f-850a-43f54d02aa43-callNode-fd17bbad-310b-4ef3-a2d1-3aee344efb77", + "type": "default", + "source": "callNode-a536496a-6026-4d8f-850a-43f54d02aa43", + "target": "callNode-fd17bbad-310b-4ef3-a2d1-3aee344efb77", "labelBgPadding": [ 8, 4 ], "labelBgBorderRadius": 4, + "label": "", "labelBgStyle": { - "fill": "#FFCC00", - "color": "#fff", + "fill": "#009688", + "color": "#ffffff", "fillOpacity": 0.7 - } + }, + "labelShowBg": true, + "sourceHandle": "source_callNode-a536496a-6026-4d8f-850a-43f54d02aa43" }, { - "id": "Agama-call-Node-94daa735-8cc3-4663-9e60-ceeeb0ac6d24-Agama-assignment-Node-a5df123b-bc4c-4674-974c-9be4e0dc3b31-a7d463f2-d911-46c1-a420-6ecd6ca03203", - "type": "straight", - "source": "Agama-call-Node-94daa735-8cc3-4663-9e60-ceeeb0ac6d24", - "target": "Agama-assignment-Node-a5df123b-bc4c-4674-974c-9be4e0dc3b31", - "label": "", + "id": "callNode-fd17bbad-310b-4ef3-a2d1-3aee344efb77-assignmentNode-b91099c4-e693-44cd-bae3-3315e10f68b8", + "type": "default", + "source": "callNode-fd17bbad-310b-4ef3-a2d1-3aee344efb77", + "target": "assignmentNode-b91099c4-e693-44cd-bae3-3315e10f68b8", "labelBgPadding": [ 8, 4 ], "labelBgBorderRadius": 4, + "label": "", "labelBgStyle": { - "fill": "#FFCC00", - "color": "#fff", + "fill": "#009688", + "color": "#ffffff", "fillOpacity": 0.7 - } + }, + "labelShowBg": true, + "sourceHandle": "source_callNode-fd17bbad-310b-4ef3-a2d1-3aee344efb77" }, { - "id": "Agama-assignment-Node-a5df123b-bc4c-4674-974c-9be4e0dc3b31-Agama-repeat-Node-5a8c1743-6bea-463a-a391-263b09b95d76-1121ffa4-841e-494a-9258-fe167d0cd8f7", - "type": "straight", - "source": "Agama-assignment-Node-a5df123b-bc4c-4674-974c-9be4e0dc3b31", - "target": "Agama-repeat-Node-5a8c1743-6bea-463a-a391-263b09b95d76", - "label": "", + "id": "assignmentNode-b91099c4-e693-44cd-bae3-3315e10f68b8-repeatNode-75ab0682-defe-4794-b32b-d12cf79bf31f", + "type": "default", + "source": "assignmentNode-b91099c4-e693-44cd-bae3-3315e10f68b8", + "target": "repeatNode-75ab0682-defe-4794-b32b-d12cf79bf31f", "labelBgPadding": [ 8, 4 ], "labelBgBorderRadius": 4, + "label": "", "labelBgStyle": { - "fill": "#FFCC00", - "color": "#fff", + "fill": "#009688", + "color": "#ffffff", "fillOpacity": 0.7 - } + }, + "labelShowBg": true, + "sourceHandle": "source_assignmentNode-b91099c4-e693-44cd-bae3-3315e10f68b8" }, { - "id": "Agama-repeat-Node-5a8c1743-6bea-463a-a391-263b09b95d76-Agama-rrf-Node-3a2ba854-b68f-403d-8a27-89bc71020d17-12c4255e-5864-42c4-be4c-ad091b76f3ef", - "type": "straight", - "source": "Agama-repeat-Node-5a8c1743-6bea-463a-a391-263b09b95d76", - "target": "Agama-rrf-Node-3a2ba854-b68f-403d-8a27-89bc71020d17", - "label": "In Block", + "id": "repeatNode-75ab0682-defe-4794-b32b-d12cf79bf31f-finishNode-e4368ba0-deee-4d72-8cc5-559d231fa0ae", + "type": "default", + "source": "repeatNode-75ab0682-defe-4794-b32b-d12cf79bf31f", + "target": "finishNode-e4368ba0-deee-4d72-8cc5-559d231fa0ae", "labelBgPadding": [ 8, 4 ], "labelBgBorderRadius": 4, + "label": "continue", "labelBgStyle": { - "fill": "#FFCC00", - "color": "#fff", + "fill": "#009688", + "color": "#ffffff", "fillOpacity": 0.7 }, - "sourceHandle": "Agama-repeat-Node-5a8c1743-6bea-463a-a391-263b09b95d76.InRepeatBlock" + "labelShowBg": true, + "sourceHandle": "source_repeatNode-75ab0682-defe-4794-b32b-d12cf79bf31f_continue" }, { - "id": "Agama-rrf-Node-3a2ba854-b68f-403d-8a27-89bc71020d17-Agama-call-Node-3797f6df-13c7-4c2c-9cb6-652051be78e6-4849f6ff-92a2-4631-bf9b-971c3bd4c98c", - "type": "straight", - "source": "Agama-rrf-Node-3a2ba854-b68f-403d-8a27-89bc71020d17", - "target": "Agama-call-Node-3797f6df-13c7-4c2c-9cb6-652051be78e6", - "label": "", + "id": "repeatNode-75ab0682-defe-4794-b32b-d12cf79bf31f-rrfNode-1f4d967c-3a23-424e-ac43-c4535f4e6c25", + "type": "default", + "source": "repeatNode-75ab0682-defe-4794-b32b-d12cf79bf31f", + "target": "rrfNode-1f4d967c-3a23-424e-ac43-c4535f4e6c25", "labelBgPadding": [ 8, 4 ], "labelBgBorderRadius": 4, + "label": "repeat", "labelBgStyle": { - "fill": "#FFCC00", - "color": "#fff", + "fill": "#009688", + "color": "#ffffff", "fillOpacity": 0.7 - } + }, + "labelShowBg": true, + "sourceHandle": "source_repeatNode-75ab0682-defe-4794-b32b-d12cf79bf31f_repeat" }, { - "id": "Agama-call-Node-3797f6df-13c7-4c2c-9cb6-652051be78e6-Agama-assignment-Node-f0bd6fb4-5254-427f-ad5a-743441f681c2-3b12b848-6b0f-4824-8a46-1cd38922c097", - "type": "straight", - "source": "Agama-call-Node-3797f6df-13c7-4c2c-9cb6-652051be78e6", - "target": "Agama-assignment-Node-f0bd6fb4-5254-427f-ad5a-743441f681c2", - "label": "", + "id": "rrfNode-1f4d967c-3a23-424e-ac43-c4535f4e6c25-callNode-627bb4ce-1cc4-4e95-b078-4ab900096a5b", + "type": "default", + "source": "rrfNode-1f4d967c-3a23-424e-ac43-c4535f4e6c25", + "target": "callNode-627bb4ce-1cc4-4e95-b078-4ab900096a5b", "labelBgPadding": [ 8, 4 ], "labelBgBorderRadius": 4, + "label": "", "labelBgStyle": { - "fill": "#FFCC00", - "color": "#fff", + "fill": "#009688", + "color": "#ffffff", "fillOpacity": 0.7 - } + }, + "labelShowBg": true, + "sourceHandle": "source_rrfNode-1f4d967c-3a23-424e-ac43-c4535f4e6c25" }, { - "id": "Agama-assignment-Node-f0bd6fb4-5254-427f-ad5a-743441f681c2-Agama-when-Node-9cb26c5d-64d4-4f9e-b60f-846c01663919-fbf4178a-dc74-48b6-9e97-e35e7c1b0a5d", - "type": "straight", - "source": "Agama-assignment-Node-f0bd6fb4-5254-427f-ad5a-743441f681c2", - "target": "Agama-when-Node-9cb26c5d-64d4-4f9e-b60f-846c01663919", - "label": "", + "id": "callNode-627bb4ce-1cc4-4e95-b078-4ab900096a5b-assignmentNode-b4820ce3-e50f-49fd-a5d2-1a2f657ebe66", + "type": "default", + "source": "callNode-627bb4ce-1cc4-4e95-b078-4ab900096a5b", + "target": "assignmentNode-b4820ce3-e50f-49fd-a5d2-1a2f657ebe66", "labelBgPadding": [ 8, 4 ], "labelBgBorderRadius": 4, + "label": "", "labelBgStyle": { - "fill": "#FFCC00", - "color": "#fff", + "fill": "#009688", + "color": "#ffffff", "fillOpacity": 0.7 - } + }, + "labelShowBg": true, + "sourceHandle": "source_callNode-627bb4ce-1cc4-4e95-b078-4ab900096a5b" }, { - "id": "Agama-when-Node-9cb26c5d-64d4-4f9e-b60f-846c01663919-finish-a56f6ed5-78a2-4dff-afa5-73caccea6213-304b0f80-8a05-4554-8100-5d17a7867477", - "type": "straight", - "source": "Agama-when-Node-9cb26c5d-64d4-4f9e-b60f-846c01663919", - "target": "finish-a56f6ed5-78a2-4dff-afa5-73caccea6213", - "label": "Condition met", + "id": "assignmentNode-b4820ce3-e50f-49fd-a5d2-1a2f657ebe66-whenNode-edb2bfd7-5709-49a1-8706-2b189bff4e17", + "type": "default", + "source": "assignmentNode-b4820ce3-e50f-49fd-a5d2-1a2f657ebe66", + "target": "whenNode-edb2bfd7-5709-49a1-8706-2b189bff4e17", "labelBgPadding": [ 8, 4 ], "labelBgBorderRadius": 4, + "label": "", "labelBgStyle": { - "fill": "#FFCC00", - "color": "#fff", + "fill": "#009688", + "color": "#ffffff", "fillOpacity": 0.7 }, - "sourceHandle": "Agama-when-Node-9cb26c5d-64d4-4f9e-b60f-846c01663919.SUCCESS" + "labelShowBg": true, + "sourceHandle": "source_assignmentNode-b4820ce3-e50f-49fd-a5d2-1a2f657ebe66" }, { - "id": "Agama-repeat-Node-5a8c1743-6bea-463a-a391-263b09b95d76-finish-4dae67b1-1c40-4881-9df0-0abe9a652103-43ad5e1b-0d87-4f7d-91af-36c353663f8a", - "type": "straight", - "source": "Agama-repeat-Node-5a8c1743-6bea-463a-a391-263b09b95d76", - "target": "finish-4dae67b1-1c40-4881-9df0-0abe9a652103", - "label": "Not In Block", + "id": "whenNode-edb2bfd7-5709-49a1-8706-2b189bff4e17-finishNode-ed061eff-b03f-40c8-8205-01e6a94a6461", + "type": "default", + "source": "whenNode-edb2bfd7-5709-49a1-8706-2b189bff4e17", + "target": "finishNode-ed061eff-b03f-40c8-8205-01e6a94a6461", "labelBgPadding": [ 8, 4 ], "labelBgBorderRadius": 4, + "label": "Condition met", "labelBgStyle": { - "fill": "#FFCC00", - "color": "#fff", + "fill": "#009688", + "color": "#ffffff", "fillOpacity": 0.7 }, - "sourceHandle": "Agama-repeat-Node-5a8c1743-6bea-463a-a391-263b09b95d76.InFlow" + "labelShowBg": true, + "sourceHandle": "source_whenNode-edb2bfd7-5709-49a1-8706-2b189bff4e17_success" } ], "viewport": { - "x": 51.843608498780895, - "y": 241.12295367467783, - "zoom": 0.5163706025774991 + "x": 0, + "y": 0, + "zoom": 1 } } \ No newline at end of file From 55f10fcd74c5d4bbfcc87e0b1a146daa46a30046 Mon Sep 17 00:00:00 2001 From: Kiran Mali <39133739+kdhttps@users.noreply.github.com> Date: Tue, 19 Nov 2024 18:58:28 +0530 Subject: [PATCH 32/32] refactor: update org.gluu.agama.totp.pw.flow --- code/org.gluu.agama.totp.pw.flow | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/org.gluu.agama.totp.pw.flow b/code/org.gluu.agama.totp.pw.flow index cc1f0d6..0408ffc 100644 --- a/code/org.gluu.agama.totp.pw.flow +++ b/code/org.gluu.agama.totp.pw.flow @@ -17,7 +17,7 @@ Repeat 3 times max authResult.uid = creds.username // authResult.success is true When authResult.success is true - it_rhuqf = {success:true, data: {userId: authResult.uid}} - Finish it_rhuqf -it_arjlf = {success:false, error: "false"} -Finish it_arjlf \ No newline at end of file + it_xkleh = {success:true, data: {userId: authResult.uid}} + Finish it_xkleh +it_znbcl = {success:false, error: "false"} +Finish it_znbcl \ No newline at end of file