Drupal authenication.
I'm using REST server to authenticate on a drupal site. When I run the service I get back the expected data including session_name and session_id.
If I want to request something back from drupal site as logged in user I'm supposed to send that data in a header as a cookie.
My questions are:
Is it possible to setup a cookie in a mobile app?
If it what would be correct way to do it. I tried:
var sessName = localStorage.getItem("sessName");
var sessId = localStorage.getItem("sessId");$.cookie(sessName,sessId);
but in console it shows this error:
Uncaught TypeError: Object function ( selector, context ) {
// The jQuery object is actually just the init constructor 'enhanced'
return new jQuery.fn.init( selector, context, rootjQuery );
} has no method 'cookie'Also even if I made a cookie like that would it be used when I invoke a service ?
I think you can understand my problem. Thank you in advance.