You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using Django 3.2.18 and AXES 5.30.0 on Python 3.6. We are not utilizing DRF for our implementation.
When we attempt to catch the "user_locked_out" signal sent by axes, the username being returned is always set to None.
@receiver(user_locked_out)
def log_user_lockout(request, username, ip_address, **kwargs):
"""Log user lockout using axes signal."""
user = username # This will always result in None
function_signal.send("audit_log", message=f"{user} account has been locked.")`
Is there a method or way to trigger a locked out user account without using the DRF? My current workaround is to trigger on the user_login_failed signal and inspect the kwargs.get("request").axes_locked_out value. I still need to have the user_locked_out code in order to properly trigger the signal.
End goal of the code is we want to log when a user is locked out to an audit log file with the username of the account that was locked out.
The text was updated successfully, but these errors were encountered:
Hello! Can you please tell if AXES_USERNAME_CALLABLE is configured and if not, which way one is authenticating (e.g. via username/password on the form)
We are using Django 3.2.18 and AXES 5.30.0 on Python 3.6. We are not utilizing DRF for our implementation.
When we attempt to catch the "user_locked_out" signal sent by axes, the username being returned is always set to None.
Is there a method or way to trigger a locked out user account without using the DRF? My current workaround is to trigger on the user_login_failed signal and inspect the kwargs.get("request").axes_locked_out value. I still need to have the user_locked_out code in order to properly trigger the signal.
End goal of the code is we want to log when a user is locked out to an audit log file with the username of the account that was locked out.
The text was updated successfully, but these errors were encountered: