Authentication Process

48 views
Skip to first unread message

Joel Saltzman

unread,
Feb 11, 2014, 2:49:00 PM2/11/14
to mobile-c...@googlegroups.com
Where can I find instructions/examples to explain how to create users and user groups/roles? I'm looking to limit what specific users have access to. Thanks

Jens Alfke

unread,
Feb 11, 2014, 3:55:59 PM2/11/14
to mobile-c...@googlegroups.com

On Feb 11, 2014, at 11:49 AM, Joel Saltzman <saltzm...@gmail.com> wrote:

Where can I find instructions/examples to explain how to create users and user groups/roles? I'm looking to limit what specific users have access to. Thanks

Message has been deleted

Joel Saltzman

unread,
Feb 11, 2014, 4:03:13 PM2/11/14
to mobile-c...@googlegroups.com
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?
 All future calls in the SDK, like saving property changes, will pass the cookie in the call and the couch base server will make sure that the session is still valid?

Jens Alfke

unread,
Feb 11, 2014, 4:13:22 PM2/11/14
to mobile-c...@googlegroups.com

On Feb 11, 2014, at 1:03 PM, Joel Saltzman <saltzm...@gmail.com> 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) and the response will include a Set-Cookie header; from then on NSURLConnection will take care of sending back the session cookie.

—Jens

Joel Saltzman

unread,
Feb 11, 2014, 4:18:02 PM2/11/14
to mobile-c...@googlegroups.com
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
Reply all
Reply to author
Forward
0 new messages