deitch / cansecurity

nodejs/expressjs authentication and security library
MIT License
150 stars 53 forks source link

Cannot customize invalidtoken response. #16

Closed ProgramCpp closed 7 years ago

ProgramCpp commented 7 years ago

Can send customized response objects for other authentication failures.

say, for invalid password,

callback(false,null,httpStatus.e403); // custom json response object

for invalid token, the third param needs user in case of success and thus cannot send a custom failure response.

deitch commented 7 years ago

Closed via https://github.com/deitch/cansecurity/pull/17