anchor.diff:      },
   
       HandlerFun = couch_util:dict_find(HandlerKey, UrlHandlers, DefaultFun),
  +    {ok, AuthHandlers} = application:get_env(couch, auth_handlers),
   
       {ok, Resp} =
       try
  -        case authenticate_request(HttpReq, AuthenticationSrcs) of
  +        case authenticate_request(HttpReq, AuthHandlers) of
           #httpd{} = Req ->
               HandlerFun(Req);
           Response ->
  
positive.code:     "false" ->
          Req#httpd{user_ctx=#user_ctx{}}
      end;
  authenticate_request(#httpd{} = Req, [AuthSrc|Rest]) ->
      AuthFun = make_arity_1_fun(AuthSrc),
      R = case AuthFun(Req) of
          #httpd{user_ctx=#user_ctx{}=UserCtx}=Req2 ->
              Req2#httpd{user_ctx=UserCtx#user_ctx{handler=?l2b(AuthSrc)}};
          Else -> Else
      end,
      authenticate_request(R, Rest);
  authenticate_request(Response, _AuthSrcs) ->
      Response.
  
  
negative.code: % Try authentication handlers in order until one sets a user_ctx
  % the auth funs also have the option of returning a response
  % move this to couch_httpd_auth?
  authenticate_request(#httpd{user_ctx=#user_ctx{}} = Req, _AuthHandlers) ->
      Req;
  authenticate_request(#httpd{} = Req, []) ->
      case couch_config:get("couch_httpd_auth", "require_valid_user", "false") of
  