summaryrefslogtreecommitdiff
path: root/src/mod_http_api.erl
diff options
context:
space:
mode:
authorMickael Remond <mremond@process-one.net>2016-03-30 14:49:19 +0200
committerMickael Remond <mremond@process-one.net>2016-03-30 14:49:19 +0200
commit36ac1cd6c7a86cd57e14121756efa590f2d8b1b7 (patch)
tree37c90cc77fc42270440bd3ed7f373fae970a69d1 /src/mod_http_api.erl
parentHTTP ReST API now supports 'open' ejabberd commands (diff)
Returns unauthorized error when we do not have correct credentials
Diffstat (limited to 'src/mod_http_api.erl')
-rw-r--r--src/mod_http_api.erl4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mod_http_api.erl b/src/mod_http_api.erl
index 96fa9073..bbd4a28d 100644
--- a/src/mod_http_api.erl
+++ b/src/mod_http_api.erl
@@ -183,7 +183,9 @@ check_permissions2(#request{ip={IP, _Port}}, Call, _Policy) ->
end;
_ ->
unauthorized_response()
- end.
+ end;
+check_permissions2(_Request, _Call, _Policy) ->
+ unauthorized_response().
oauth_check_token(Scope, Token) when is_atom(Scope) ->
oauth_check_token(atom_to_binary(Scope, utf8), Token);