You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ja...@apache.org on 2009/04/07 02:07:03 UTC

svn commit: r762574 - /couchdb/trunk/src/couchdb/couch_httpd.erl

Author: jan
Date: Tue Apr  7 00:07:02 2009
New Revision: 762574

URL: http://svn.apache.org/viewvc?rev=762574&view=rev
Log:
Add null_authentication_handler. It is useful when running CouchDB behind an authenticating proxy which proxies the basic auth http headers to CouchDB. Having no admins defined makes authentication impossible. Use the null_authentication_handler instead.

Modified:
    couchdb/trunk/src/couchdb/couch_httpd.erl

Modified: couchdb/trunk/src/couchdb/couch_httpd.erl
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_httpd.erl?rev=762574&r1=762573&r2=762574&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_httpd.erl (original)
+++ couchdb/trunk/src/couchdb/couch_httpd.erl Tue Apr  7 00:07:02 2009
@@ -24,7 +24,7 @@
 -export([send_response/4,send_method_not_allowed/2,send_error/4, send_redirect/2]).
 -export([send_json/2,send_json/3,send_json/4]).
 -export([default_authentication_handler/1,special_test_authentication_handler/1]).
-
+-export([null_authentication_handler/1]).
 
 start_link() ->
     % read config and register for configuration changes
@@ -228,6 +228,8 @@
         end
     end.
 
+null_authentication_handler(_Req) ->
+    #user_ctx{roles=[<<"_admin">>]}.
 
 % Utilities