Commit Graph

6 Commits

Author SHA1 Message Date
Sergi Delgado Segura
6547e75a19 Adds user exist restriction to fill/free slots and update comments/docs 2020-03-27 17:28:07 +01:00
Sergi Delgado Segura
4c21326974 Moves slots added on register from gatekeeper to config 2020-03-27 14:57:11 +01:00
Sergi Delgado Segura
9bc3bf2e6e Refactors and improves the gatekeeper
Following the same apporach as the Inspector, the gatekeeper now raises exceptions depending on the error encountered.
Also generalises `identify_user` so it can be used with any kind of user-signed message.
Finally lifts the restriction of having available slots on `identify_user` (that only applied to `add_appointent`).
2020-03-26 17:21:18 +01:00
Sergi Delgado Segura
f7260bc1ce Improves and simplifies add_appointment 2020-03-25 21:16:50 +01:00
Sergi Delgado Segura
83b3913cb5 Adds basic authentication logic.
+ Users need to be registered in order to send appointments (free registration for now)
+ The tower gives them a number of appointments to work with
+ Non-registered users and users with no enough appoitnemnts slots return the same error (to avoid proving)

- Authentication does not cover get_* requests yet
- No tests
- No docs
2020-03-25 17:13:35 +01:00
Sergi Delgado Segura
519caec29a Adds basic register logic
- Adds register endpoint in the API
- Adds the Gatekeeper to keep track of registered user and allow/reject access
- Adds registration errors
- Updates API unit tests
- Refactors some methods of the API to reduce code replication
2020-03-25 12:14:12 +01:00