I was actually looking to use the built in features for the client app and limit what certain clients have access to. So it sounds like I just need to use NSURLConnection to login and save the cookie. Thanks
On Tuesday, February 11, 2014 1:13:22 PM UTC-8, Jens Alfke wrote: > > > On Feb 11, 2014, at 1:03 PM, Joel Saltzman <[email protected]<javascript:>> > 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/29193cc0-1916-4e5c-8f67-9b44b571ffbd%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
