Skip to content

Commit

Permalink
Merge pull request #3 from GluuFederation/agama-lab-branch
Browse files Browse the repository at this point in the history
fix: fidoValidator instance not working
  • Loading branch information
Milton-Ch authored Mar 25, 2024
2 parents fb2a6f1 + 9dbe857 commit 0b35098
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 16 deletions.
14 changes: 7 additions & 7 deletions code/org.gluu.agama.passkey.main.flow
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ authService = Call io.jans.as.server.service.AuthenticationService#class
// Get Instance CdiUtil
cdiUtil = Call io.jans.service.cdi.util.CdiUtil#bean authService
// Get Instance FidoValidator
fidoValidator = Call org.gluu.agama.passkey.authn.FidoValidator#new obj.isAssertion
fidoValidator = Call org.gluu.agama.passkey.authn.FidoValidator#new
// obj variable declaration, which is sent to the main form
authResult = {}
obj = { success: true, assertion: "{}", isAssertion: false, showError: false, errorTitle: "", errorMessage: "" }
Expand All @@ -26,8 +26,8 @@ Repeat 5 times max
listTrigger = Trigger org.gluu.agama.passkey.list userData conf
When listTrigger.success is true
// Finish with success userId
it_javbz = {success:true, data: { userId: userData.uid }}
Finish it_javbz
it_zoswe = {success:true, data: { userId: userData.uid }}
Finish it_zoswe
When mainForm.loginWithPasskeyBtn is ""
// Generates an assertion request without username
detestable = Call fidoValidator assertionRequest null
Expand All @@ -46,14 +46,14 @@ Repeat 5 times max
obj.errorMessage = E.message
When E is null
// Finish with success userId
it_nxarz = {success:true, data: { userId: verifyResponse }}
Finish it_nxarz
it_peqql = {success:true, data: { userId: verifyResponse }}
Finish it_peqql
When mainForm.skipped is "skipped"
// Displays the authentication event cancellation error
obj.isAssertion = false
obj.showError = true
obj.errorTitle = "Passkey authentication failed."
obj.errorMessage = mainForm.errorMessage
// When you have made the maximum number of attempts, the flow will be terminated.
it_tgudo = {success:false, error: "Login attempt exceeded"}
Finish it_tgudo
it_lnaml = {success:false, error: "Login attempt exceeded"}
Finish it_lnaml
14 changes: 6 additions & 8 deletions code/org.gluu.agama.passkey.main.json
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@
},
"skake": false
},
"selected": true,
"selected": false,
"positionAbsolute": {
"x": 2504.963392144978,
"y": 449.50458946598746
Expand Down Expand Up @@ -1087,15 +1087,13 @@
"callType": "Create an instance",
"whenCondition": "",
"inRepeatBlock": false,
"arguments": [
"obj.isAssertion"
],
"arguments": [],
"nodeIcon": "material-symbols:code",
"asssignedVariableName": "fidoValidator"
},
"skake": false
},
"selected": false,
"selected": true,
"dragging": false,
"positionAbsolute": {
"x": 630,
Expand Down Expand Up @@ -2015,8 +2013,8 @@
}
],
"viewport": {
"x": -2046.6238654407089,
"y": -314.2309044650027,
"zoom": 1.1486983549970382
"x": -174,
"y": 24,
"zoom": 1
}
}
5 changes: 4 additions & 1 deletion project.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@
"org.gluu.agama.passkey.add": {},
"org.gluu.agama.passkey.nickname": {},
"org.gluu.agama.passkey.list": {},
"org.gluu.agama.passkey.main": {}
"org.gluu.agama.passkey.main": {
"scimClientId": "YOUR_SCIM_ID",
"scimClientSecret": "YOUR_SCIM_SECRET"
}
},
"name": "agama-passkey"
}

0 comments on commit 0b35098

Please sign in to comment.