The spirit of what you described is what you should do, but your replicator 
will shut down automatically once the session cookie expires because it 
will start getting unauthorized errors (I'm not sure why it was in the 
client API and so when it was reviewed it was removed, but as far as 
creating the session with Sync Gateway you can pass an expires value there 
and it will be honored).  This will be passed to the status callback.  At 
that time you can renew your session and start a new replicator.

On Saturday, January 27, 2018 at 9:37:38 AM UTC+9, Ben Kennedy wrote:
>
> > On Jan 24, 2018, at 7:36 PM, Priya Rajagopal <priya.r...@couchbase.com 
> <javascript:>> wrote: 
> > 
> > The examples in the documents correspond to Developer Build 21 (DB21) 
> which is the latest officially released version available from our 
> Downloads page (https://www.couchbase.com/downloads) .  You have been 
> trying out the latest build which has not yet made it to our official 
> downloads page and hence the docs don't 
> > reflect the changes. 
>
> A ha -- of course you're right; I've indeed checked out `feature/2.0`. I 
> should have considered that possibility. Thanks. 
>
> Speaking of changes, I noticed that the `expires` param has recently been 
> removed from CBLSessionAuthenticator. I suppose that makes sense, because 
> looking at the diffs I see its value used to be simply ignored. 
>
> Clearly the onus is on me to track the cookie's lifetime locally, then, 
> but what is the correct recourse once it expires? Should I just shut down 
> and re-instantiate a new replicator? (Given that its configuration is 
> immutable, I don't see a way to provide a fresh session cookie.) 
>
> thanks, 
>
> -ben 
>
>

-- 
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 mobile-couchbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/18cb8156-3b1b-406c-9586-90ac84dbc0ce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to