Open klehmann opened 10 years ago
This looks like a useful change. If you could send a pull request it would expedite it.
private Credentials allowedCredentials;
-> private Map<String,Credentials> allowedCredentials;
setAllowedCredentials
which takes a Map<String,Credentials>
rather than a single Credentials objectservice
method where it checks the credentials, do a map lookup in allowedCredentials
map.
Looking at the code it seems that only one pair of credentials can be set for the embedded HTTP server that provides CouchDB REST APIs on Android. For our application we would need support for multiple pairs as it is already possible in the iOS version. Would be great if this could be added in a future version.
On iOS, setting multiple credentials is done in the CBLListener class via setPasswords and an NSDictionary argument: https://github.com/couchbase/couchbase-lite-ios/blob/master/Listener/CBLListener.m