three-layer
three-layer copied to clipboard
Create some endpoints
To be able to run the application, add some tests to them
@vrom911 Can you give me some indications about that issue?
We need to have the following endpoint to test:
- [ ] One public endpoint
- [ ] Login endpoint (which is already there, just need to structure better)
- [ ] One protected endpoint
This issue is tight with #41 and would need to implement the separation of public and protected endpoints.
Perfect, I wait for suggestion about #41 before this, thanks!
@lucazulian The idea here is to use generic capabilities of servant to impose structure on our endpoints. The root of all endpoints should be split into two parts: protected and unprotected. Endpoints under the protected namespace should use JWT-based auth scheme using experimental auth module from the servant library (we are not using servant-auth), so each incoming request is verified automatically. Unprotected endpoints shouldn't require this authentication because they either public or the produce this JWT token.