Registering an HTTP cookie with Replicator in 2.5

#1

Hi,

While using CBLite 1.4, we were using the below API to register HTTPCookie with replicators.

- (void) setCookieNamed: (NSString*)name
              withValue: (NSString*)value
                   path: (nullable NSString*)path
         expirationDate: (nullable NSDate*)expirationDate
                 secure: (BOOL)secure;

I couldn’t figure out the equivalent api in ReplicatorConfiguration class. Anyone know how to set HTTPCookie with CBLite 2.5?

#2

I have used the below code considering it will handle the Http Cookie. My assumption is, this sessionKey is used while we authenticate the sync gateway and sessionCookie which we got back from sync gateway.

replicator.config.authenticator = SessionAuthenticator(sessionID: sessionKey, cookieName: sessionCookie.name)