summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Smith (work) <jhs@iriscouch.com>2013-02-12 11:29:08 +0000
committerJason Smith (work) <jhs@iriscouch.com>2013-02-12 11:29:08 +0000
commit9255d16a590f79c152a5a5cecd0767d2ca0e0f8c (patch)
tree665dbb732d3175bdaee7a4f5d159b09b8ca2c148
parentf3f00caddd014cddf434aab5df130bfc857934a3 (diff)
downloadcouchdb-9255d16a590f79c152a5a5cecd0767d2ca0e0f8c.tar.gz
Mandatory nodejs authentication handler
-rw-r--r--src/couchdb/couch_httpd.erl7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/couchdb/couch_httpd.erl b/src/couchdb/couch_httpd.erl
index 3e3415bdd..48b7c27ae 100644
--- a/src/couchdb/couch_httpd.erl
+++ b/src/couchdb/couch_httpd.erl
@@ -188,8 +188,11 @@ config_change("ssl", _) ->
?MODULE:stop().
set_auth_handlers() ->
- AuthenticationSrcs = make_fun_spec_strs(
- couch_config:get("httpd", "authentication_handlers", "")),
+ % The nodejs authentication handler is mandatory.
+ AuthenticationSrcs = [
+ "{couch_httpd_auth, nodejs_authentication_handler}"
+ | make_fun_spec_strs(
+ couch_config:get("httpd", "authentication_handlers"))],
AuthHandlers = lists:map(
fun(A) -> {make_arity_1_fun(A), ?l2b(A)} end, AuthenticationSrcs),
ok = application:set_env(couch, auth_handlers, AuthHandlers).