Does DerbyJS in current shape can implement authentication, if yes what's best way to do it? of not is their any work around to do it?
-
1Did you at least checked at http://derbyjs.com/ before asking here? – MilkyWayJoe Apr 30 '12 at 21:14
-
2https://github.com/lefnire/derby-auth – lefnire Dec 05 '12 at 01:53
7 Answers
I'm very happy to share that Derby has released the first version of Access Control at the Racer level. Initial details are in the Racer package at https://github.com/codeparty/racer/blob/master/src/accessControl/README.md.
You track its ongoing progress with this github issue - https://github.com/codeparty/derby/issues/47#issuecomment-6337980

- 14,272
- 6
- 84
- 96
-
how do you get the id of an authenticated user that modified some derby client-side variable ? – FutuToad Mar 18 '14 at 10:19
No it does not yet, although the developers have said that it's one of the top things that they're working on. https://twitter.com/#!/derbyjs/status/194463304440221698
You might be able to build it in to your application, but at this point it doesn't really seem worth it. Unless you need it ASAP, I'd just wait until the developers officially release integrated auth.

- 24,384
- 25
- 76
- 101
-
Following up on this they also have said it will be everyauth based (https://twitter.com/#!/derbyjs/status/195004949124481024) and that it will be integrated with routes for both express and socket.io (https://twitter.com/#!/derbyjs/status/195004949124481024) which should be pretty cool :). – studgeek May 20 '12 at 01:32
You could simply use a reverse proxy to provide the security and https termination.
I'm currently trying NGINX.
Restrict the Derby server to listen on localhost and get NGINX to be the https terminator along with providing Basic Auth - or work up your own form-based login in Derby and keep NGINX as the https terminator/proxy.

- 4,716
- 2
- 29
- 42
You can already achieve simple authentication with the current feature set of Derby and Racer. Look at the source of the chat example for some inspiration.
There's also an open-source Derby app called HabitRPG which brought this a little further. The developer is working on integrating EveryAuth into the authentication process.
Also, an official EveryAuth example is to be expected from the authors of Derby and Racer in the coming weeks.

- 181
- 4
see the "auth" example in https://github.com/codeparty/derby-examples
just committed this pull request :: https://github.com/redaktor/derby-examples/commit/0edbbcc7e471e4c2441cfbd4e969007024bfd06e
it is not merged yet but if you change the 2 lines from the pull request as well, everything should work out of the box.

- 4,278
- 2
- 37
- 36