Cloudant Query android -


i using cloudant store user details when register application shown below:

{   "_id": "xxx",   "_rev": "xxx",   "encrypted_password": "testing123",   "username": "testing",   "email_address": "test@hotmail.com" } 

i want authenticate user searching through documents same username , password provided user code doesn't seem work. code shown below:

public boolean authenticateuser(final string username, final string password) {     map<string, object> query = new hashmap<string, object>() {         { put("username", username);           put("password", password); }     };      queryresult result = indexmanager.find(query);      if(result != null) return true;      // reach here if no existing username found     return false; } 

cloudant query: https://github.com/cloudant/sync-android/blob/master/doc/query.md

your document doesn't seem have field called "password".


Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -