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

Safe HaskellNone
LanguageHaskell2010

Web.Users.Postgresql

Contents

Orphan instances

UserStorageBackend Connection Source # 
Instance details

Associated Types

type UserId Connection :: Type Source #

Methods

initUserBackend :: Connection -> IO () Source #

destroyUserBackend :: Connection -> IO () Source #

housekeepBackend :: Connection -> IO () Source #

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

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

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

countUsers :: Connection -> IO Int64 Source #

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

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

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

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

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

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

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

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

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

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

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

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

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