Hi,
As of now, the implementation of node-odata requires 'auth' to be synchronous, as it has to return true or false. (as described here: http://tossshinhwa.github.io/node-odata/en/#51-resource)
In realistic scenarios, checking auth may usually entail some async operation (checking DB, etc) and because of the async nature of node, a control flow as express middleware (using next() ) seems more appropriate.
What do you think ?
Best,
Hi,
As of now, the implementation of node-odata requires 'auth' to be synchronous, as it has to return true or false. (as described here: http://tossshinhwa.github.io/node-odata/en/#51-resource)
In realistic scenarios, checking auth may usually entail some async operation (checking DB, etc) and because of the async nature of node, a control flow as express middleware (using next() ) seems more appropriate.
What do you think ?
Best,