three-layer icon indicating copy to clipboard operation
three-layer copied to clipboard

Create some endpoints

Open vrom911 opened this issue 6 years ago • 4 comments

To be able to run the application, add some tests to them

vrom911 avatar May 09 '19 09:05 vrom911

@vrom911 Can you give me some indications about that issue?

lucazulian avatar May 22 '19 07:05 lucazulian

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.

vrom911 avatar May 22 '19 07:05 vrom911

Perfect, I wait for suggestion about #41 before this, thanks!

lucazulian avatar May 22 '19 08:05 lucazulian

@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.

chshersh avatar May 22 '19 08:05 chshersh