I’m looking at some code where the ‘credential’ property was used to send the user name and password. The issue I’m looking at is the getting 401 errors from the replicator so I was looking at where the authentication is done. Since I’m new to CBL I checked the documentation and now I’m not sure why the credential property was used vs the authenticator since all the sample code I have seen uses authenticator. It looks like ultimately you end up passing a user and password to both.
/** An object that knows how to authenticate with a remote server.
CBLAuthenticator is an opaque protocol; instances can be created by calling the factory methods
of the class of the same name. */
@property (nonatomic, strong, nullable) id authenticator;
/** The credential (generally username+password) to use to authenticate to the remote database.
This can either come from the URL itself (if it’s of the form “http://user:firstname.lastname@example.org”)
or be stored in the NSURLCredentialStorage, which is a wrapper around the Keychain. /
@property (nonatomic, strong, nullable) NSURLCredential credential;