Saturday, May 29, 2010

Re: What would be the best way to implement a login audit?

It would be nice if contrib.auth threw signals for auth attempts.

I don't think a custom auth backend would be the best solution, because a custom auth backend as described in the documentation doesn't receive the request object, which is where the stuff you want (such as IP address) can be accessed.

It seems like the easiest place to add this would be in your login view.

Based on the docs there, you will have a view which has access both to the request object and the knowledge of the success or failure of the login.


You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

No comments:

Post a Comment