Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add random number generator to auth an bump version

  • Loading branch information...
commit 51b91a73fb389a6851c178cd0150e9ed6e7ccaf9 1 parent 6123dfb
@norm2782 authored
Showing with 5 additions and 2 deletions.
  1. +1 −1  snaplet-hdbc.cabal
  2. +4 −1 src/Snap/Snaplet/Auth/Backends/Hdbc.hs
View
2  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
View
5 src/Snap/Snaplet/Auth/Backends/Hdbc.hs
@@ -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
@@ -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
@@ -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.
Please sign in to comment.
Something went wrong with that request. Please try again.