Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- type AuthApi i p = "auth" :> ((Authed i p :> Get '[JSON] (AuthedAccount i p)) :<|> (("login" :> (ReqBody '[JSON] AccountCredentials :> PostResetContent '[JSON] AuthToken)) :<|> ("register" :> (ReqBody '[JSON] AccountCredentials :> PostCreated '[JSON] AuthToken))))
- type AuthApiP i = AuthApi i [Privilege]
- type AccountApi i p = "account" :> ((Authed i p :> (Capture "id" i :> Get '[JSON] (Uid i (Account p)))) :<|> ((Authed i p :> Get '[JSON] [Uid i (Account p)]) :<|> ((Authed i p :> (ReqBody '[JSON] (Uid i (Account p)) :> Put '[JSON] NoContent)) :<|> (Authed i p :> (Capture "id" i :> (ReqBody '[JSON] (Account p) :> Put '[JSON] NoContent))))))
- type AccountApiP i = AccountApi i [Privilege]
Documentation
type AuthApi i p = "auth" :> ((Authed i p :> Get '[JSON] (AuthedAccount i p)) :<|> (("login" :> (ReqBody '[JSON] AccountCredentials :> PostResetContent '[JSON] AuthToken)) :<|> ("register" :> (ReqBody '[JSON] AccountCredentials :> PostCreated '[JSON] AuthToken)))) Source #
An API allowing users to log in, register accounts, and authenticate with a JWT to obtain their account information.
type AuthApiP i = AuthApi i [Privilege] Source #
Convenience alias for using the default privilege type with AuthApi
.
type AccountApi i p = "account" :> ((Authed i p :> (Capture "id" i :> Get '[JSON] (Uid i (Account p)))) :<|> ((Authed i p :> Get '[JSON] [Uid i (Account p)]) :<|> ((Authed i p :> (ReqBody '[JSON] (Uid i (Account p)) :> Put '[JSON] NoContent)) :<|> (Authed i p :> (Capture "id" i :> (ReqBody '[JSON] (Account p) :> Put '[JSON] NoContent)))))) Source #
An internal API for accessing accounts.
type AccountApiP i = AccountApi i [Privilege] Source #
Convenience alias for using the default privilege type with AccountApi
.