Skip to content

Commit 16d773a

Browse files
authored
Merge pull request #10 from SafinWasi/agama-lab-branch
chore: update flow to new design
2 parents 4a6ad86 + dc93f7b commit 16d773a

File tree

2 files changed

+1210
-1810
lines changed

2 files changed

+1210
-1810
lines changed

code/org.gluu.agama.typekey.flow

Lines changed: 29 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,46 @@
11
Flow org.gluu.agama.typekey
2-
Basepath ""
3-
Configs conf
2+
Basepath ""
3+
Configs conf
44
idp = Call org.gluu.agama.typekey.IdentityProcessor#new
55
tk = Call org.gluu.agama.typekey.Typekey#new conf
66
user = RRF "typekey/username.ftlh"
77
userData = Call idp accountFromUsername user.username
88
When userData.empty is true
9-
it_vsrve = {success:false, error: "User not found"}
10-
Finish it_vsrve
11-
Call tk dynamicRegistration conf.scan_ssa
9+
it_rfztc = {success:false, error: "User not found"}
10+
Finish it_rfztc
11+
Call tk dynamicRegistration conf.scan_ssa
1212
enrolled = Call idp enrolled user.username
1313
When enrolled is false
14-
random_usecase = Call tk getRandomUseCase
15-
phrase_map = Call tk generateTypekeyData random_usecase
16-
dummy = Call idp enroll user.username phrase_map
17-
phrase = phrase_map.phrase
18-
use_case = random_usecase
14+
random_usecase = Call tk getRandomUseCase
15+
phrase_map = Call tk generateTypekeyData random_usecase
16+
dummy = Call idp enroll user.username phrase_map
17+
phrase = phrase_map.phrase
18+
use_case = random_usecase
1919
When enrolled is true
20-
typekey_data = Call idp getTypekeyData user.username
21-
phrase = typekey_data.phrase
22-
use_case = typekey_data.useCase
20+
typekey_data = Call idp getTypekeyData user.username
21+
phrase = typekey_data.phrase
22+
use_case = typekey_data.useCase
2323
phraseDict = {phrase:phrase}
2424
phraseData = RRF "typekey/phrase.ftlh" phraseDict
2525
typekey_result = Call tk validateKeystrokes user.username phraseData.phrase_data use_case
2626
When typekey_result.status is "Enrollment"
27-
Log "Agama Typekey: Enrollment in progress"
28-
password = RRF "typekey/password.ftlh"
29-
authenticated = Call idp authenticate user.username password.pwd
30-
When authenticated is true
31-
Call tk notifyKeystrokes user.username typekey_result.track_id use_case
32-
it_spikk = {success:true, data: { userId: user.username}}
33-
Finish it_spikk
34-
it_ttqbc = {success:false, error: "Authentication failed"}
35-
Finish it_ttqbc
27+
password = RRF "typekey/password.ftlh"
28+
authenticated = Call idp authenticate user.username password.pwd
29+
When authenticated is true
30+
Call tk notifyKeystrokes user.username typekey_result.track_id use_case
31+
it_lbxhq = {success:true, data: { userId: user.username}}
32+
Finish it_lbxhq
33+
it_sebuq = {success:false, error: "Authentication failed"}
34+
Finish it_sebuq
3635
When typekey_result.status is "Approved"
37-
Log "Agama Typekey: Approved"
38-
it_zirls = {success:true, data: { userId: user.username}}
39-
Finish it_zirls
36+
it_joqxm = {success:true, data: { userId: user.username}}
37+
Finish it_joqxm
4038
password = RRF "typekey/password.ftlh"
4139
authenticated = Call idp authenticate user.username password.pwd
4240
When authenticated is true
43-
When typekey_result.status is "Denied"
44-
Log "Denied, fell back to password"
45-
Call tk notifyKeystrokes user.username typekey_result.track_id use_case
46-
it_becry = {success:true, data: { userId: user.username }}
47-
Finish it_becry
48-
it_ryekg = {success:false, error: "Typekey and password failed"}
49-
Finish it_ryekg
41+
When typekey_result.status is "Denied"
42+
Call tk notifyKeystrokes user.username typekey_result.track_id use_case
43+
it_tsimt = {success:true, data: { userId: user.username }}
44+
Finish it_tsimt
45+
it_srhno = {success:false, error: "Typekey and password failed"}
46+
Finish it_srhno

0 commit comments

Comments
 (0)