polysemy-account-0.2.0.0: Account management with Servant and Polysemy
Safe HaskellSafe-Inferred
LanguageHaskell2010

Polysemy.Account.Accounts

Description

 
Synopsis

Documentation

unlockAccountName :: Members [Accounts i p, Stop AccountsError] r => AccountName -> Sem r () Source #

Convenience function for unlocking the account matching the given name.

login :: Member (Accounts i p) r => AccountCredentials -> Sem r (AuthedAccount i p) Source #

Authenticate the given credentials against the storage backend and return the matched account's information.

register :: Member (Accounts i p) r => AccountCredentials -> Sem r (AuthedAccount i p) Source #

Register an account with the given credentials.

Create the account in the storage backend, hash the password and store it, then mark the account as created.