packages feed

users 0.2.0.1 → 0.3.0.0

raw patch · 2 files changed

+5/−1 lines, 2 files

Files

src/Web/Users/Types.hs view
@@ -58,6 +58,8 @@     destroyUserBackend :: b -> IO ()     -- | This cleans up invalid sessions and other tokens. Call periodically as needed.     housekeepBackend :: b -> IO ()+    -- | Retrieve a user id from the database+    getUserIdByName :: b -> T.Text -> IO (Maybe (UserId b))     -- | Retrieve a user from the database     getUserById :: (FromJSON a, ToJSON a) => b -> UserId b -> IO (Maybe (User a))     -- | List all users (unlimited, or limited)@@ -82,6 +84,8 @@     deleteUser :: b -> UserId b -> IO ()     -- | Authentificate a user using username/email and password. The 'NominalDiffTime' describes the session duration     authUser :: b -> T.Text -> PasswordPlain -> NominalDiffTime -> IO (Maybe SessionId)+    -- | Authentificate a user and execute a single action.+    withAuthUser :: FromJSON a => b -> T.Text -> (User a -> Bool) -> (UserId b -> IO r) -> IO (Maybe r)     -- | Verify a 'SessionId'. The session duration can be extended by 'NominalDiffTime'     verifySession :: b -> SessionId -> NominalDiffTime -> IO (Maybe (UserId b))     -- | Destroy a session
users.cabal view
@@ -1,5 +1,5 @@ name:                users-version:             0.2.0.1+version:             0.3.0.0 synopsis:            A library simplifying user management for web applications description:         Scrap the boilerplate for managing user accounts in web applications                      .