It took me some time to figure this out but I finally got it. There are some problems with the current dev in combination with oauth authorisation. And some for service in general.

in the service_oauth file i changed the following:

   $endpoint = array();
-  if (isset($method['endpoint']['services_oauth'])) {
+  // grep the specific settings for this method
+  if (!empty($method['endpoint']['services_oauth']['credentials'])) {
    $endpoint   = $method['endpoint']['services_oauth'];

The isset doesn't work here. The key is always set but the value isn't there if you haven't specified it in the UI. If there is no value it should grep it the default. It didn't.

     foreach ($endpoint->authentication as $auth_module => $settings) {
-      if (isset($settings) && $auth_error = services_auth_invoke($auth_module, 'authenticate_call', $settings, $controller, $args)) {
+      if (!empty($settings) && $auth_error = services_auth_invoke($auth_module, 'authenticate_call', $settings, $controller, $args)) {
         return services_error($auth_error, 401);
       }
     }

Again, the isset didn't work so changed it to empty. The problem was that the user object was rewriten due to the isset. So all the request you try to do using REST where as anonymous.

There are some more in the patch file.

Files: 
CommentFileSizeAuthor
#5 services-oauth_login_fix-1986008-5.patch2.47 KBJerenus
PASSED: [[SimpleTest]]: [MySQL] 1,589 pass(es).
[ View ]
#1 services-oauth_user_fix-1986008-1.patch3.23 KBh3rj4n
Test request sent.
[ View ]

Comments

h3rj4n’s picture

StatusFileSize
new3.23 KB
Test request sent.
[ View ]

And the patch.

This also contains the patch from #1985878: Parse error in user_resource.inc so I'll close that one.

h3rj4n’s picture

Status:Needs work» Needs review

And this one now needs review.

kylebrowning’s picture

Status:Needs review» Reviewed & tested by the community
marcingy’s picture

Version:6.x-3.x-dev» 7.x-3.x-dev
Status:Reviewed & tested by the community» Needs work

Does this need to go into d7 first?

Jerenus’s picture

Status:Needs work» Needs review
StatusFileSize
new2.47 KB
PASSED: [[SimpleTest]]: [MySQL] 1,589 pass(es).
[ View ]

Reroll to 7.x-3.x.

ygerasimov’s picture

Status:Needs review» Fixed

I cleaned up patch #5 (it had some not relevant changes to user resource) and committed it. Thanks!

h3rj4n’s picture

Version:7.x-3.x-dev» 6.x-3.4-rc1
Status:Fixed» Needs review

What happened to the D6 patch?

h3rj4n’s picture

Version:6.x-3.4-rc1» 7.x-3.x-dev
Status:Needs review» Fixed

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.