Skip to content

Commit

Permalink
Add random number generator to auth an bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
norm2782 committed Apr 1, 2012
1 parent 6123dfb commit 51b91a7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion snaplet-hdbc.cabal
@@ -1,5 +1,5 @@
name: snaplet-hdbc
version: 0.7.2.2
version: 0.7.2.3
synopsis: HDBC snaplet for Snap Framework
description: This snaplet consists of two parts: an HDBC abstraction snaplet
and an HDBC authentication backend for Snap's authentication
Expand Down
5 changes: 4 additions & 1 deletion src/Snap/Snaplet/Auth/Backends/Hdbc.hs
Expand Up @@ -21,6 +21,7 @@ import Snap.Snaplet
import Snap.Snaplet.Auth
import Snap.Snaplet.Hdbc.Types
import Snap.Snaplet.Session
import Snap.Snaplet.Session.Common
import Web.ClientSession

-- | Initialises this HDBC snaplet. It automatically configures a resource
Expand All @@ -40,6 +41,7 @@ initHdbcAuthManager s l conn tbl qs =
Nothing $ liftIO $ do
mv <- newEmptyMVar
key <- getKey (asSiteKey s)
rng <- mkRNG
return AuthManager
{ backend = HdbcAuthManager (HdbcSnaplet conn mv) tbl qs
, session = l
Expand All @@ -48,7 +50,8 @@ initHdbcAuthManager s l conn tbl qs =
, rememberCookieName = asRememberCookieName s
, rememberPeriod = asRememberPeriod s
, siteKey = key
, lockout = asLockout s }
, lockout = asLockout s
, randomNumberGenerator = rng }

-- | Authmanager state containing the resource pool and the table/query
-- configuration.
Expand Down

0 comments on commit 51b91a7

Please sign in to comment.