mikenicholson / passport-jwt

Passport authentication using JSON Web Tokens
MIT License
1.96k stars 213 forks source link

Fix body field extractor #77

Closed z38 closed 7 years ago

z38 commented 8 years ago

When querystring is used to parse the request body, req.body does not inherit from Object.prototype.

This patch fixes the call to hasOwnProperty in the same as we already did it for the URL query extractor (see #59).

diegohaz commented 7 years ago

Hey, @themikenicholson, could you take a look at this? I'm having a problem in my library which seems to be solved by this PR.

Reference: https://github.com/diegohaz/generator-rest/issues/5#issuecomment-252917751