On Feb 11, 2014, at 1:03 PM, Joel Saltzman 
<[email protected]<mailto:[email protected]>> wrote:

So when it comes to a client library (iOS) I just need to make a REST call to 
the db and store the cookie or is there a method in the SDK that I use for 
logging in?

It sounds like you're thinking of homebrewing your own code to talk to the 
gateway, instead of using Couchbase Lite? That's quite unusual.

You can use either HTTP Basic auth, or cookies. If you want to use HTTP auth, 
implement the authentication method in your NSURLConnection delegate class, and 
provide the credentials when it's called. If you want to use cookie auth, first 
POST the credentials to /dbname/_session (documentation 
here<http://docs.couchbase.com/sync-gateway/#admin-rest-api-endpoints>) and the 
response will include a Set-Cookie header; from then on NSURLConnection will 
take care of sending back the session cookie.

--Jens

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/A0809C12-9D29-4642-8E4A-710B69F36DEF%40couchbase.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to