null-open-security-community/null-jobs-backend-2.0

Middleware Implementation

Himan10 opened this issue · 1 comments

  1. as discussed, we have to implement our own middleware that will fetch the user related details from the request, and for other necessary stuff such as validation, db lookup for user information etc.

I am writing this middleware, right now we have to manually check for Access-Token and if it's a valid one in the request or not.

Action items for middleware:

  1. Check Access-Token in the request
  2. Validate few parameter in the request
    2.1 HOST
    2.2 Content-Type
    2.3 HTTP Method
    2.4 X-Request-ID
    2.5 Content-Length
  3. Verify JWT token as well (have to discuss)