users-postgresql-simple-0.5.0.1: A PostgreSQL backend for the users package

Safe HaskellNone
LanguageHaskell2010

Web.Users.Postgresql

Contents

Orphan instances

UserStorageBackend Connection Source # 

Associated Types

type UserId Connection :: * #

Methods

initUserBackend :: Connection -> IO () #

destroyUserBackend :: Connection -> IO () #

housekeepBackend :: Connection -> IO () #

getUserIdByName :: Connection -> Text -> IO (Maybe (UserId Connection)) #

getUserById :: Connection -> UserId Connection -> IO (Maybe User) #

listUsers :: Connection -> Maybe (Int64, Int64) -> SortBy UserField -> IO [(UserId Connection, User)] #

countUsers :: Connection -> IO Int64 #

createUser :: Connection -> User -> IO (Either CreateUserError (UserId Connection)) #

updateUser :: Connection -> UserId Connection -> (User -> User) -> IO (Either UpdateUserError ()) #

deleteUser :: Connection -> UserId Connection -> IO () #

authUser :: Connection -> Text -> PasswordPlain -> NominalDiffTime -> IO (Maybe SessionId) #

withAuthUser :: Connection -> Text -> (User -> Bool) -> (UserId Connection -> IO r) -> IO (Maybe r) #

verifySession :: Connection -> SessionId -> NominalDiffTime -> IO (Maybe (UserId Connection)) #

createSession :: Connection -> UserId Connection -> NominalDiffTime -> IO (Maybe SessionId) #

destroySession :: Connection -> SessionId -> IO () #

requestPasswordReset :: Connection -> UserId Connection -> NominalDiffTime -> IO PasswordResetToken #

verifyPasswordResetToken :: Connection -> PasswordResetToken -> IO (Maybe User) #

applyNewPassword :: Connection -> PasswordResetToken -> Password -> IO (Either TokenError ()) #

requestActivationToken :: Connection -> UserId Connection -> NominalDiffTime -> IO ActivationToken #

activateUser :: Connection -> ActivationToken -> IO (Either TokenError ()) #