Merge pull request #1122 from gunet/auth_type_log_fix

Fixed LDAP Authenticator Type logging
This commit is contained in:
jbe-dw 2022-04-03 14:59:48 +02:00 committed by GitHub
commit 13ff4df9f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -461,7 +461,7 @@ def login():
auth = user.is_validate(method=auth_method, auth = user.is_validate(method=auth_method,
src_ip=request.remote_addr) src_ip=request.remote_addr)
if auth == False: if auth == False:
signin_history(user.username, 'LOCAL', False) signin_history(user.username, auth_method, False)
return render_template('login.html', return render_template('login.html',
saml_enabled=SAML_ENABLED, saml_enabled=SAML_ENABLED,
error='Invalid credentials') error='Invalid credentials')
@ -478,7 +478,7 @@ def login():
if otp_token and otp_token.isdigit(): if otp_token and otp_token.isdigit():
good_token = user.verify_totp(otp_token) good_token = user.verify_totp(otp_token)
if not good_token: if not good_token:
signin_history(user.username, 'LOCAL', False) signin_history(user.username, auth_method, False)
return render_template('login.html', return render_template('login.html',
saml_enabled=SAML_ENABLED, saml_enabled=SAML_ENABLED,
error='Invalid credentials') error='Invalid credentials')
@ -504,7 +504,7 @@ def login():
user.revoke_privilege(True) user.revoke_privilege(True)
current_app.logger.warning('Procceding to revoke every privilige from ' + user.username + '.' ) current_app.logger.warning('Procceding to revoke every privilige from ' + user.username + '.' )
return authenticate_user(user, 'LOCAL', remember_me) return authenticate_user(user, auth_method, remember_me)
def checkForPDAEntries(Entitlements, urn_value): def checkForPDAEntries(Entitlements, urn_value):
""" """