Closed (works as designed)
Project:
Services
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
21 Feb 2018 at 09:31 UTC
Updated:
23 Feb 2018 at 14:39 UTC
Jump to comment: Most recent
Comments
Comment #2
ssuresh1295 commentedComment #3
tyler.frankenstein commentedAre you trying to login from JavaScript?
Comment #4
ssuresh1295 commentedI am trying to login from android mobile using drupal rest services.
Comment #5
tyler.frankenstein commentedPlease don't adjust the category and priority, this is a normal support request, thanks.
I myself am not familiar with using PHP to login to Services, I'm only familiar with using JavaScript to login to Services.
That being said, I seem to recall it being necessary to pass along the session id and session name concatenated onto each other (with some type of separator) and that string is then sent along as a header (and I'm not sure what the key on that should be). That should set you in the right direction, there should be some examples out there, perhaps on drupal.stackexchange.com.
Other than that, perhaps others will chime in with advise, good luck and happy coding.
Comment #6
kylebrowning commentedAll of this is in our tests, which is PHP.
https://cgit.drupalcode.org/services/tree/tests/functional/ServicesSecur...
https://cgit.drupalcode.org/services/tree/tests/functional/ServicesResou...
Comment #7
ssuresh1295 commentedI found the issue. We should not get token using
drupal_get_token();. We should pass services string to that functiondrupal_get_token('services');like this. Thanks.Comment #8
tyler.frankenstein commentedExcellent. Thank you for confirming.