I am unable to log in as an authenticated user to Drupal services. I have tried the setting for 'basic authentication', for 'http authentication', and for no authentication, it seems to make no difference. I am using administrator login details. Same result for authenticated user login details. I am able to return data eg votes where anonymous user access is permitted. I can log in to services as an authenticated user when I directly try it on the site eg example.com/ios1/user/1 . But with my Xcode7 swift2 api, every time my drupal log shows that I've connected as an anonymous user only. So when I try a GET query for user details (requiring authentication) it returns access denied. What code header do I need?
This is what I've been using:
let user = "exampleName"
let password = "examplePass"
let credentialData = "\(user):\(password)".dataUsingEncoding(NSUTF8StringEncoding)!
let base64Credentials = credentialData.base64EncodedStringWithOptions([])
let headers = ["Content-Type : application/json"]