packages feed

yesod-auth-bcryptdb 0.3.0.0 → 0.3.0.1

raw patch · 2 files changed

+4/−5 lines, 2 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Yesod.Auth.BCryptDB: userPasswordSaltedHash :: BCryptDBUser user => user -> Text
+ Yesod.Auth.BCryptDB: userPasswordSaltedHash :: BCryptDBUser user => user -> Maybe Text

Files

src/Yesod/Auth/BCryptDB.hs view
@@ -185,7 +185,7 @@   -- | Getter used by 'validatePass' and 'upgradePasswordHash' to   --   retrieve the password hash from user data   ---  userPasswordSaltedHash :: user -> Text+  userPasswordSaltedHash :: user -> Maybe Text    {-# MINIMAL setPasswordSaltedHash, userPasswordSaltedHash #-} @@ -232,10 +232,9 @@   -> HandlerT master IO Bool validateCreds userID password = do   -- Checks that hash and password match-  mPassword <- runDB $ fmap (userPasswordSaltedHash . entityVal)-                   <$> getBy userID+  mUser <- runDB $ getBy userID -  return $ case mPassword of+  return $ case (userPasswordSaltedHash . entityVal =<< mUser) of                 Nothing -> False                  Just storedPassword ->
yesod-auth-bcryptdb.cabal view
@@ -1,5 +1,5 @@ name:                yesod-auth-bcryptdb-version:             0.3.0.0+version:             0.3.0.1 synopsis:            Authentication plugin for Yesod. description:   This package provides authentication with passwords hashed and salted using