couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject [4/13] git commit: Mandatory nodejs authentication handler
Date Wed, 13 Feb 2013 13:17:14 GMT
Mandatory nodejs authentication handler


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/9255d16a
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/9255d16a
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/9255d16a

Branch: refs/heads/nodejs_couchdb
Commit: 9255d16a590f79c152a5a5cecd0767d2ca0e0f8c
Parents: f3f00ca
Author: Jason Smith (work) <jhs@iriscouch.com>
Authored: Tue Feb 12 11:29:08 2013 +0000
Committer: Jason Smith (work) <jhs@iriscouch.com>
Committed: Tue Feb 12 11:29:08 2013 +0000

----------------------------------------------------------------------
 src/couchdb/couch_httpd.erl |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/9255d16a/src/couchdb/couch_httpd.erl
----------------------------------------------------------------------
diff --git a/src/couchdb/couch_httpd.erl b/src/couchdb/couch_httpd.erl
index 3e3415b..48b7c27 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).


Mime
View raw message