Closed ProgramCpp closed 7 years ago
This looks pretty good, a few comments on the code itself.
Will submit all the changes based on your feedback on my comments.
I wonder what can cansec.unauthenticated()
be named as! Please suggest :)
Will submit all the changes based on your feedback on my comments
Thanks
http-status-codes
checkLoggedIn()
Pending changes:
unauthenticated
to setUnauthenticatedCode
setUnauthenticatedCode
should only set the custom code in the request and move on!Pending Changes:
This is great, thank you. And npm publish
-ed as 3.2.0
For the other pending changes, we should do a separate PR.
Fix for issue #20 Can customize authentication failure HTTP response code and location header for the routes as below
app.get("/secure/customloggedin",cansec.unauthenticated({code:302,location:"/login"}),cansec.restrictToLoggedIn,send200);