Skip to content

Commit

Permalink
fix: update authenticate method for step 1 (#8506)
Browse files Browse the repository at this point in the history
fix: update authenticate method for step 1 #8480

Signed-off-by: jgomer2001 <bonustrack310@gmail.com>
Co-authored-by: Mohammad Abudayyeh <47318409+moabu@users.noreply.github.com>
  • Loading branch information
jgomer2001 and moabu committed May 14, 2024
1 parent 66aa86b commit 271e195
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions jans-casa/extras/casa-external_fido2.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ def authenticate(self, configurationAttributes, requestParameters, step):
print "Fido2. Authenticate for step 1"
identity.setWorkingParameter("platformAuthenticatorAvailable",ServerUtil.getFirstValue(requestParameters, "loginForm:platformAuthenticator"))

# Modified for Casa compliance
authenticated_user = authenticationService.getAuthenticatedUser()
if authenticated_user != None:
return True

user_password = credentials.getPassword()
logged_in = False
if StringHelper.isNotEmptyString(user_name) and StringHelper.isNotEmptyString(user_password):
Expand Down
6 changes: 5 additions & 1 deletion jans-casa/extras/casa-external_super_gluu.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,11 @@ def authenticate(self, configurationAttributes, requestParameters, step):

return True
elif self.twoStep:
authenticated_user = self.processBasicAuthentication(credentials)
# Modified for Casa compliance
authenticated_user = authenticationService.getAuthenticatedUser()
if authenticated_user == None:
authenticated_user = self.processBasicAuthentication(credentials)

if authenticated_user == None:
return False

Expand Down

0 comments on commit 271e195

Please sign in to comment.