Posts for: #Topic

Model Relations in Mongoose

Model Relations

Relations are logical links which define how models are connected with each other. A document of a model can be connected to one or more documents of the same or another model.

Authenticate REST APIs using JWT

Authentication vs Authorization

  • Authentication: identifying the user who is accessing the resource
  • Authorization: checking if the user has permission to perform an action on the resource (e.g updating the resource)

JWT for Authentication

JWT or JSON Web Token is a preferrable method for authenticating REST APIs because: