Skip to content

Commit

Permalink
Merge pull request #10 from SafinWasi/agama-lab-branch
Browse files Browse the repository at this point in the history
chore: update flow to new design
  • Loading branch information
SafinWasi authored Nov 18, 2024
2 parents 4a6ad86 + dc93f7b commit 16d773a
Show file tree
Hide file tree
Showing 2 changed files with 1,210 additions and 1,810 deletions.
61 changes: 29 additions & 32 deletions code/org.gluu.agama.typekey.flow
Original file line number Diff line number Diff line change
@@ -1,49 +1,46 @@
Flow org.gluu.agama.typekey
Basepath ""
Configs conf
Basepath ""
Configs conf
idp = Call org.gluu.agama.typekey.IdentityProcessor#new
tk = Call org.gluu.agama.typekey.Typekey#new conf
user = RRF "typekey/username.ftlh"
userData = Call idp accountFromUsername user.username
When userData.empty is true
it_vsrve = {success:false, error: "User not found"}
Finish it_vsrve
Call tk dynamicRegistration conf.scan_ssa
it_rfztc = {success:false, error: "User not found"}
Finish it_rfztc
Call tk dynamicRegistration conf.scan_ssa
enrolled = Call idp enrolled user.username
When enrolled is false
random_usecase = Call tk getRandomUseCase
phrase_map = Call tk generateTypekeyData random_usecase
dummy = Call idp enroll user.username phrase_map
phrase = phrase_map.phrase
use_case = random_usecase
random_usecase = Call tk getRandomUseCase
phrase_map = Call tk generateTypekeyData random_usecase
dummy = Call idp enroll user.username phrase_map
phrase = phrase_map.phrase
use_case = random_usecase
When enrolled is true
typekey_data = Call idp getTypekeyData user.username
phrase = typekey_data.phrase
use_case = typekey_data.useCase
typekey_data = Call idp getTypekeyData user.username
phrase = typekey_data.phrase
use_case = typekey_data.useCase
phraseDict = {phrase:phrase}
phraseData = RRF "typekey/phrase.ftlh" phraseDict
typekey_result = Call tk validateKeystrokes user.username phraseData.phrase_data use_case
When typekey_result.status is "Enrollment"
Log "Agama Typekey: Enrollment in progress"
password = RRF "typekey/password.ftlh"
authenticated = Call idp authenticate user.username password.pwd
When authenticated is true
Call tk notifyKeystrokes user.username typekey_result.track_id use_case
it_spikk = {success:true, data: { userId: user.username}}
Finish it_spikk
it_ttqbc = {success:false, error: "Authentication failed"}
Finish it_ttqbc
password = RRF "typekey/password.ftlh"
authenticated = Call idp authenticate user.username password.pwd
When authenticated is true
Call tk notifyKeystrokes user.username typekey_result.track_id use_case
it_lbxhq = {success:true, data: { userId: user.username}}
Finish it_lbxhq
it_sebuq = {success:false, error: "Authentication failed"}
Finish it_sebuq
When typekey_result.status is "Approved"
Log "Agama Typekey: Approved"
it_zirls = {success:true, data: { userId: user.username}}
Finish it_zirls
it_joqxm = {success:true, data: { userId: user.username}}
Finish it_joqxm
password = RRF "typekey/password.ftlh"
authenticated = Call idp authenticate user.username password.pwd
When authenticated is true
When typekey_result.status is "Denied"
Log "Denied, fell back to password"
Call tk notifyKeystrokes user.username typekey_result.track_id use_case
it_becry = {success:true, data: { userId: user.username }}
Finish it_becry
it_ryekg = {success:false, error: "Typekey and password failed"}
Finish it_ryekg
When typekey_result.status is "Denied"
Call tk notifyKeystrokes user.username typekey_result.track_id use_case
it_tsimt = {success:true, data: { userId: user.username }}
Finish it_tsimt
it_srhno = {success:false, error: "Typekey and password failed"}
Finish it_srhno
Loading

0 comments on commit 16d773a

Please sign in to comment.