Commit Graph

8 Commits

Author SHA1 Message Date
Simone Gotti
3642be6f21 */api: Use helpers for error handling
* client: always parse the json error message field and return its contents
* Use ErrBadRequest and ErrNotFound in every handler and command
* Gateway: by default pass underlying service error (configstore, runservice) to
client keeping the status code and message. In future, if some errors must be
masked, we should change the specific parts that need special handling.
2019-04-09 14:53:00 +02:00
Simone Gotti
03b5a53510 gateway/command: use ErrBadRequest when needed 2019-04-08 12:08:31 +02:00
Simone Gotti
ac28731d11 gateway: only admin or the same logged user can create an user token 2019-04-05 15:56:06 +02:00
Simone Gotti
eb8cd9cc52 gateway: add user registration
Adds two handler:

* Authorize handler used to ask remote source authorization
* Register handler used to do user and related linked account creation
2019-03-29 17:53:15 +01:00
Simone Gotti
704da47afc configstore: createuser also create linked account when requested
Useful to future user registration to create user and linked account in a unique
atomic call.
2019-03-29 17:50:51 +01:00
Simone Gotti
3e3a7a0ea5 gateway: move user la and login validation to command layer 2019-03-29 14:33:41 +01:00
Simone Gotti
8b92b6f55c initial project group impl
and related api updated
2019-03-14 14:36:18 +01:00
Simone Gotti
021a0465ce gateway: initial implementation 2019-02-21 17:58:25 +01:00