Services-Client saves data in the $_SESSION Object, which is not the problem. But the problem here is, that one data object use a constant. Which is not available in drupal_session_start().

Complete message:

Notice: Use of undefined constant OAUTH_COMMON_TOKEN_TYPE_REQUEST - assumed 'OAUTH_COMMON_TOKEN_TYPE_REQUEST' in drupal_session_start() (line 287 of /var/www/mysite/includes/session.inc).

Related links:

One solution is to store the data via cache_set/get.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tobiasb’s picture

Status: Active » Needs review
FileSize
3.44 KB

Ok here is the patch with the cache solution.

mhrabovcin’s picture

+++ b/services_client_connection/modules/services_client_oauth/services_client_oauth.moduleundefined
@@ -167,13 +167,14 @@ function services_client_oauth_request_validate($form, &$form_state) {
+  cache_set('services_client_oauth', $data);

What if multiple users will try to authenticate against one site?

I don't think this will work, because of possibility of multiple users authenticating different endpoints. What I think would work is to store token ids rather than whole token objects in $_SESSION array.

mhrabovcin’s picture

Status: Needs review » Needs work
tobiasb’s picture

Status: Needs work » Needs review
FileSize
1.98 KB

Ok thats true.

mhrabovcin’s picture

Status: Needs review » Fixed

Committed, thanks!

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

added a solution