Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update authenticate method for step 1 #8506

Merged
merged 2 commits into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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