Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'IvanMartinez-master'

  • Loading branch information...
commit 9dcabbbc9d749df5f78f41f1dc0ffbd711f10bf8 2 parents 624392a + 46c95a1
@bipthelin bipthelin authored
Showing with 3 additions and 3 deletions.
  1. +1 −1  src/oauth2.erl
  2. +2 −2 test/oauth2_mock_backend.erl
View
2  src/oauth2.erl
@@ -135,7 +135,7 @@ authorize_client_credentials(Client, Scope0, Ctx0) ->
case auth_client(Client, no_redir, Ctx0) of
{error, _} -> {error, invalid_client};
{ok, {Ctx1, C}} ->
- case ?BACKEND:verify_client_scope(Client, Scope0, Ctx1) of
+ case ?BACKEND:verify_client_scope(C, Scope0, Ctx1) of
{error, _} -> {error, invalid_scope};
{ok, {Ctx2, Scope1}} ->
{ok, {Ctx2, #a{ client=C
View
4 test/oauth2_mock_backend.erl
@@ -118,8 +118,8 @@ get_redirection_uri(_, _) -> {error, notfound}.
verify_redirection_uri({client, 4711}, ?CLIENT_URI, Ctx) -> {ok, Ctx};
verify_redirection_uri(_, _, _) -> {error, mismatch}.
-verify_client_scope({?CID, ?SECRET}, [], Ctx) -> {ok, {Ctx, []}};
-verify_client_scope({?CID, ?SECRET}, ?CSCOPE, Ctx) -> {ok, {Ctx, ?CSCOPE}};
+verify_client_scope({client, 4711}, [], Ctx) -> {ok, {Ctx, []}};
+verify_client_scope({client, 4711}, ?CSCOPE, Ctx) -> {ok, {Ctx, ?CSCOPE}};
verify_client_scope(_, _, _) -> {error, invalid_scope}.
verify_resowner_scope({user, 31337}, ?USCOPE, Ctx) -> {ok, {Ctx, ?USCOPE}};
Please sign in to comment.
Something went wrong with that request. Please try again.