-
-
Notifications
You must be signed in to change notification settings - Fork 928
Open
Labels
Description
Hello!
I've found that
oauth.authorise()
is checking for authentication in strict mode - thats means that if user is not authenticated - he receives error JSON with 'no token'.
I am suggesting to create another middleware method (or extend this one) to support non strict check - it would do exact same as autorise but if token wrong/non existing just continue pipe execution in usual way.
server.get('/items/:id', server.oauth.authorise(false /*non-strict, default true*/), this.controllers['itemsController'].show);
What do you think?
P.S. I've managed to make a lot of changes with my backend because we are using restify and it have differences with express. Maybe... add support for it too? :)