diff options
author | Jan Lehnardt <jan@apache.org> | 2009-08-23 14:51:24 +0000 |
---|---|---|
committer | Jan Lehnardt <jan@apache.org> | 2009-08-23 14:51:24 +0000 |
commit | ab71069d36708d68206b79d97affce03173366b7 (patch) | |
tree | 7d47be5d6dc6254b7c4b36ffd6877372211d5024 /src | |
parent | 4b6baa9cfcbbf6e78c6ea6f1ef208b4f7c25bba2 (diff) |
fix HEAD requests for OAuth, patch by Jason Davies, closes COUCHDB-479
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@806983 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r-- | src/couchdb/couch_httpd_oauth.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/couchdb/couch_httpd_oauth.erl b/src/couchdb/couch_httpd_oauth.erl index f542a989..ee79c797 100644 --- a/src/couchdb/couch_httpd_oauth.erl +++ b/src/couchdb/couch_httpd_oauth.erl @@ -16,11 +16,11 @@ -export([oauth_authentication_handler/1, handle_oauth_req/1, consumer_lookup/2]). % OAuth auth handler using per-node user db -oauth_authentication_handler(#httpd{method=Method}=Req) -> +oauth_authentication_handler(#httpd{mochi_req=MochiReq}=Req) -> serve_oauth(Req, fun(URL, Params, Consumer, Signature) -> AccessToken = proplists:get_value("oauth_token", Params), TokenSecret = couch_config:get("oauth_token_secrets", AccessToken), - case oauth:verify(Signature, atom_to_list(Method), URL, Params, Consumer, TokenSecret) of + case oauth:verify(Signature, atom_to_list(MochiReq:get(method)), URL, Params, Consumer, TokenSecret) of true -> set_user_ctx(Req, AccessToken); false -> |