Commit graph

15 commits

Author SHA1 Message Date
Gert Van Gool
551865d9c2 Failed logins can also be called with a wrong request object 2020-12-23 15:53:38 -08:00
Gert Van Gool
82ca671f94 Handle request is None
`django.contrib.auth.authenticate` has an optional request parameter, but
can still signal for failed logins.
2020-12-23 15:52:58 -08:00
Gert Van Gool
9ae2cdb168 Check the headers attribute on requests
The oauth2_provider package stores a (custom) set of headers on the
headers attribute instead of the default META attribute. Let's use it to
look up our expected keys.
2020-12-23 10:26:22 -08:00
Gert Van Gool
7f6ec94e66 Handle libraries that use badly mocked HttpRequest
In our (7Geese) case, this is oauthlib (v3.0.2) that has a request-like
object that doesn't implement the `META` attribute.
2020-11-20 18:26:23 -08:00
Camilo Nova
04f9b43221 Fixes bad import 2017-11-21 16:59:42 -05:00
Camilo Nova
ba37442252 Added support for Django signals, big code refactor and improvements 2017-11-17 17:15:34 -05:00
Jorge Galvis
f277007e46 Delete cache key in reset command line 2016-12-06 20:01:44 -05:00
Camilo Nova
08f40bc13b 🔥 Cleaning 2016-06-24 09:42:18 -05:00
Artur Mullakhmetov
dfe7d84907 Fix ISO8601 time duration format. 2016-06-20 17:40:17 +03:00
Artur Mullakhmetov
7444c4e3b3 Add iso8601 translator. 2016-05-30 15:59:48 +03:00
Camilo Nova
cf1091d411 Improved axes_reset command. Fixes #52 2013-07-27 12:16:54 -05:00
Josh VanderLinden
bd88ac1e7c Incorporating changes offered by kostrom in pull request #6 a flippin year ago... 2012-08-26 00:36:52 -06:00
Mike Blume
b1b0cb390e lots of pep8 fixes 2011-04-12 21:05:32 +00:00
Josh VanderLinden
2c066c7080 Merging in changes from MichaelBlume, with some modifications of my own. 2010-10-01 17:41:38 -04:00
Mike Blume
aa411ddcd6 add reset command.
from axes.utils import reset

reset() will reset all lockouts and access records.
reset(ip) will clear lockout/records for ip

reset will print a message to std out if there is nothing to reset,
unless called with silent = True
2010-09-27 17:43:23 +00:00