Return-Path: X-Original-To: apmail-couchdb-commits-archive@www.apache.org Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A631DEB8E for ; Wed, 13 Feb 2013 13:17:22 +0000 (UTC) Received: (qmail 37543 invoked by uid 500); 13 Feb 2013 13:17:22 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 37098 invoked by uid 500); 13 Feb 2013 13:17:21 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 36317 invoked by uid 99); 13 Feb 2013 13:17:15 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Feb 2013 13:17:15 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id EF7AD51FAF; Wed, 13 Feb 2013 13:17:14 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jhs@apache.org To: commits@couchdb.apache.org X-Mailer: ASF-Git Admin Mailer Subject: [4/13] git commit: Mandatory nodejs authentication handler Message-Id: <20130213131714.EF7AD51FAF@tyr.zones.apache.org> Date: Wed, 13 Feb 2013 13:17:14 +0000 (UTC) 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) Authored: Tue Feb 12 11:29:08 2013 +0000 Committer: Jason Smith (work) 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).