Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for multiple HTTP server credentials #51

Open
klehmann opened this issue Jun 17, 2014 · 1 comment
Open

Support for multiple HTTP server credentials #51

klehmann opened this issue Jun 17, 2014 · 1 comment
Labels
Milestone

Comments

@klehmann
Copy link

klehmann commented Jun 17, 2014

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

@tleyden
Copy link
Contributor

tleyden commented Jun 17, 2014

This looks like a useful change. If you could send a pull request it would expedite it.

  • Change private Credentials allowedCredentials; -> private Map<String,Credentials> allowedCredentials;
  • Add new method setAllowedCredentials which takes a Map<String,Credentials> rather than a single Credentials object
  • In service method where it checks the credentials, do a map lookup in allowedCredentials map.

@hideki hideki added this to the Future milestone Jun 23, 2016
@hideki hideki added the backlog label Jun 23, 2016
@hideki hideki added icebox and removed backlog labels Oct 8, 2016
@hideki hideki removed this from the Future milestone Oct 8, 2016
@djpongh djpongh added this to the 1.5.0 milestone Nov 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants