Restrict users from multiple failed login attempts
I'm not resetting the failed LoginAttempt count, which is a low priority for now, but necessary eventually.
This commit is contained in:
parent
f051b0be0b
commit
cf6c8799ab
4 changed files with 70 additions and 8 deletions
|
|
@ -374,3 +374,11 @@ instance FromRow StoredSession where
|
|||
fromRow = StoredSession <$> field
|
||||
<*> field
|
||||
<*> field
|
||||
|
||||
data LoginAttempt = LoginAttempt
|
||||
{ loginAttemptUsername :: Username
|
||||
, loginAttemptNumAttempts :: Integer
|
||||
} deriving (Eq, Show)
|
||||
|
||||
instance FromRow LoginAttempt where
|
||||
fromRow = LoginAttempt <$> field <*> field
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue