diff options
author | Adam Kocoloski <adam@cloudant.com> | 2010-07-14 15:33:16 -0400 |
---|---|---|
committer | Adam Kocoloski <adam@cloudant.com> | 2010-08-12 11:18:50 -0400 |
commit | 9f4b3e86b174749408811416544b464cb78d6755 (patch) | |
tree | e4606bb41892f0cf74c3d171a06d64bb80b6419e /src | |
parent | 06c0046f8225df82e38120c7bd487479ac3d726a (diff) |
oops, referenced the wrong config setting for auth db
Diffstat (limited to 'src')
-rw-r--r-- | src/chttpd_auth.erl | 8 | ||||
-rw-r--r-- | src/chttpd_oauth.erl | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/chttpd_auth.erl b/src/chttpd_auth.erl index d1e9a7a5..26f05e1a 100644 --- a/src/chttpd_auth.erl +++ b/src/chttpd_auth.erl @@ -164,18 +164,18 @@ handle_session_req(Req) -> send_method_not_allowed(Req, "GET,HEAD,POST,DELETE"). handle_user_req(#httpd{method='POST'}=Req) -> - DbName = couch_config:get("chttpd_auth", "authentication_db", "users"), + DbName = couch_config:get("couch_httpd_auth", "authentication_db", "users"), ensure_users_db_exists(DbName), create_user(Req, DbName); handle_user_req(#httpd{method=Method, path_parts=[_]}=_Req) when Method == 'PUT' orelse Method == 'DELETE' -> throw({bad_request, <<"Username is missing">>}); handle_user_req(#httpd{method='PUT', path_parts=[_, UserName]}=Req) -> - DbName = couch_config:get("chttpd_auth", "authentication_db", "users"), + DbName = couch_config:get("couch_httpd_auth", "authentication_db", "users"), ensure_users_db_exists(DbName), update_user(Req, DbName, UserName); handle_user_req(#httpd{method='DELETE', path_parts=[_, UserName]}=Req) -> - DbName = couch_config:get("chttpd_auth", "authentication_db", "users"), + DbName = couch_config:get("couch_httpd_auth", "authentication_db", "users"), ensure_users_db_exists(DbName), delete_user(Req, DbName, UserName); handle_user_req(Req) -> @@ -205,7 +205,7 @@ get_user(UserName) -> end. load_user_from_db(UserName) -> - DbName = couch_config:get("chttpd_auth", "authentication_db", "users"), + DbName = couch_config:get("couch_httpd_auth", "authentication_db", "users"), try fabric:open_doc(DbName, UserName, []) of {ok, Doc} -> ?LOG_INFO("cache miss on username ~s", [UserName]), diff --git a/src/chttpd_oauth.erl b/src/chttpd_oauth.erl index 70995409..84506efe 100644 --- a/src/chttpd_oauth.erl +++ b/src/chttpd_oauth.erl @@ -30,7 +30,7 @@ oauth_authentication_handler(#httpd{mochi_req=MochiReq}=Req) -> % Look up the consumer key and get the roles to give the consumer set_user_ctx(Req, AccessToken) -> - DbName = couch_config:get("chttpd_auth", "authentication_db"), + DbName = couch_config:get("couch_httpd_auth", "authentication_db", "users"), ok = chttpd_auth:ensure_users_db_exists(?l2b(DbName)), Name = ?l2b(couch_config:get("oauth_token_users", AccessToken)), case chttpd_auth:get_user(Name) of |