yesod-auth-hashdb 1.3.2 → 1.4.0
raw patch · 2 files changed
+11/−22 lines, 2 filesdep ~persistentdep ~yesod-authdep ~yesod-core
Dependency ranges changed: persistent, yesod-auth, yesod-core, yesod-form
Files
- Yesod/Auth/HashDB.hs +6/−17
- yesod-auth-hashdb.cabal +5/−5
Yesod/Auth/HashDB.hs view
@@ -2,12 +2,13 @@ {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE GADTs #-}-{-# LANGUAGE CPP #-} ------------------------------------------------------------------------------- -- | -- Module : Yesod.Auth.HashDB@@ -136,9 +137,7 @@ , getAuthIdHashDB -- * Predefined data type , User-#if !MIN_VERSION_persistent(2, 0, 0) , UserGeneric (..)-#endif , UserId , EntityField (..) , migrateUsers@@ -286,21 +285,15 @@ -- | Constraint for types of functions in this module ---#if MIN_VERSION_persistent(2, 0, 0) type HashDBPersist master user = ( YesodAuthPersist master , PersistUnique (YesodPersistBackend master) , AuthEntity master ~ user- , HashDBUser user- )-#else-type HashDBPersist master user =- ( YesodAuthPersist master- , PersistUnique (YesodPersistBackend master (HandlerT master IO))- , AuthEntity master ~ user+ , AuthId master ~ Key user+ , PersistEntityBackend user ~ YesodPersistBackend master , HashDBUser user+ , PersistEntity user )-#endif -- | Given a user ID and password in plaintext, validate them against -- the database values. This function retains compatibility with@@ -442,7 +435,7 @@ ---------------------------------------------------------------- -- | Generate data base instances for a valid user-share [mkPersist sqlSettings, mkMigrate "migrateUsers"]+share [mkPersist sqlSettings { mpsGeneric = True }, mkMigrate "migrateUsers"] [persistUpperCase| User username Text Eq@@ -453,11 +446,7 @@ |] {-# DEPRECATED User, migrateUsers "The predefined User data type will be removed soon - please define your own database table and accompanying instance of HashDBUser" #-} -#if MIN_VERSION_persistent(2, 0, 0)-instance HashDBUser User where-#else instance HashDBUser (UserGeneric backend) where-#endif userPasswordHash = Just . userPassword userPasswordSalt = Just . userSalt setSaltAndPasswordHash s h u = u { userSalt = s
yesod-auth-hashdb.cabal view
@@ -1,5 +1,5 @@ name: yesod-auth-hashdb-version: 1.3.2+version: 1.4.0 license: MIT license-file: LICENSE author: Patrick Brisbin, later changes Paul Rouse@@ -15,12 +15,12 @@ library build-depends: base >= 4 && < 5 , bytestring >= 0.9.1.4- , yesod-core >= 1.2 && < 1.3- , yesod-auth >= 1.3 && < 1.4+ , yesod-core >= 1.4 && < 1.5+ , yesod-auth >= 1.4 && < 1.5 , text >= 0.7 , yesod-persistent >= 1.2- , persistent >= 1.2 && < 2.1- , yesod-form >= 1.3 && < 1.4+ , persistent >= 2.1 && < 2.2+ , yesod-form >= 1.4 && < 1.5 , pwstore-fast >= 2.2 , cryptohash >= 0.8