0

i set up a REST API based on this tutorial https://www.codeofaninja.com/2017/02/create-simple-rest-api-in-php.html

what i want to do is to provide some sort of security to it. for example to access the ..../read.php address like this .../read.php+{some long key}

they key should be stored on sever and on my side to ensure some kind of match. i know it's not the most secure method but i plan to use this API for an Android app and don't want to complicate things as i'm fairly new to this.

do you have nay suggestions ?

Vitalik Jimbei
  • 141
  • 1
  • 9
  • I think you should try something first and then come back if you are having some issues. You could start with basic auth. https://stackoverflow.com/questions/3283234/http-basic-authentication-in-java-using-httpclient – jschnasse Oct 15 '18 at 09:07
  • this is how i set it up on android app. what about how to implement this on server of the api first ? – Vitalik Jimbei Oct 15 '18 at 10:56
  • It depends on the server/webframework you are using. You could also read out Auth headers yourself from the http call... many options – jschnasse Oct 15 '18 at 11:04
  • any tutorial on that ? examples ? i made it exactly as its done here https://www.codeofaninja.com/2017/02/create-simple-rest-api-in-php.html – Vitalik Jimbei Oct 15 '18 at 16:12

0 Answers0