0

I need to create a native Android app, this app will use Drupal as a back end.

The app must be native. All the back end functionality, will be taken care of in Drupal, even the login credentials. I will use JSON to get the data from Drupal

I have a few questions on what is possible. Login credentials are stored in Drupal DB. How can i login to Android with these credentials? Can i use JSON and what about the password? The password need to be encrypted.

Is there something like a password protected JSON url? I don't want anyone not authorized to see the JSON url.

If you have any advice or suggestion please let me know. I am new to Android and not an experienced programmer. Thanks in advance

  • Your password protection is encryption (i.e. HTTPS). As for the rest of question, the answer will vary based on your Drupal version & what you're using for REST service (e.g. RestWS, Services, etc.). – Shawn Conn Sep 6 '16 at 20:24
1

You didn't mention your version of Drupal, and I cannot speak for D8. But D7 has the Services module, and this provides all the functionality you will need. We use the Oauth2 module (that ties in with Services) to provide the authentication mechanism for the apps we build. With this, the user will first log in with their credentials, from which they will receive an authentication token. This token is then used for all further communication between the app and the server.

The Services module is highly customizable, and can be used to code your own resoures that can be called through the API from the app. You can choose the output format, of which JSON is one option.

Shawn answered your questions regarding protection of the user's credentials. This is the same as with a browser - use HTTPS (SSL certificate) and the credentials will be protected. If you don't use HTTPS, the credentials will be there for anyone who looks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.