Service that handle the authentication


There are 3 endpoints, such as: /login [POST] /authenticated [GET] /refresh-token [GET]

/login endpoints

Payload: { “email”: [your email], “password” : [your password] }

You can modify, add your data in databases/users.json

/authenticated endpoints

Check if the token valid or not. Add new params in Header: Authentication : Token [your_token]

/refresh-token endpoints

Refresh new token. Add the new param in Header: Authentication : Token [your_token]

How to Run

  1. go mod
  2. go get
  3. go get
  4. go build
  5. go run .


View Github