I'd like to use token based authentication to authenticate users from my node.js application, using the binary protocol via oriento.
I realise this is fairly recent implementation so documented examples are lacking, but with a bit of digging around I was able to follow the test cases from jwt to get that part working: https://github.com/codemix/oriento/blob/master/test/core/jwt.js With this I can authenticate a user and query the db with record level security for a user context. All great so far. Now in my application I naturally need to identify the authenticated user. Given the token, is there a simple way to query for the authenticated user record? I'm considering using with a Bearer strategy in passport.js, see https://github.com/jaredhanson/passport-http-bearer. I'd like to do the equivalent with OrientDB as in the following example (looks like Mongo/mongoose). passport.use(new BearerStrategy( function(token, done) { *User.findOne({ token: token },* function (err, user) { if (err) { return done(err); } if (!user) { return done(null, false); } return done(null, user, { scope: 'all' }); }); } )); -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
