简体   繁体   中英

DerbyJS and Authentication

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?

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

使用derby-auth npm模块: https//github.com/lefnire/derby-auth

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.

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.

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.

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.

用于登录的最新derby模块在这里是github.com/derbyparty/derby-login

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM