How to authenticate RESTful service[Light weight php REST Library]

by admod
2 replies
Dear pals,
I really love the REST based library , from URL https://github.com/deepeshmalviya/simple-rest
simple and understandable . But I need an authentication mechanism in it. I plan to use api for User based access . I need to take data we must use GET method . Passing username/password as GET (or even as POST) is not safe . Do you can suggest a good solution for this library .

Thanks,
Anes
#api #authenticate #library #php #rest #restful #servicelight #weight
  • Profile picture of the author Andrew H
    Was just doing some research on securing my RESTful api's this morning (user throttling)

    Found this helpful link: https://www.stormpath.com/blog/secur...-api-right-way

    Hint: use a unique api key for each user
    Signature
    "You shouldn't come here and set yourself up as the resident wizard of oz."
    {{ DiscussionBoard.errors[8521835].message }}
    • Profile picture of the author admod
      Dear Andrew,

      Thanks for your quick and helpful reply . I look alot regarding this subject.
      But I can understand that OAuth2.0 is more advanced but simple compared to
      OAuth1.0 .

      My issue is How the OAuth2.0 authentication can apply to a REST API Web Service. I attached the basic implementation of REST API. The code of
      attached "simple_rest_client->index.php" as follows:
      attached in index.txt (same file of simple_rest_client.zip )
      Here the client call the Controller method "Test" as in cURL http://localhost/sim...est_master/test. It's URL in localhost is : http://localhost/simple_rest_client/

      I also add the code of "Server" in zip file "simple_rest_master.zip".

      In this case I need to implement the authentication using OAuth2.0 .

      I looked the RFC standard for it here : RFC 6749 - The OAuth 2.0 Authorization Framework

      Please help,

      Thanks,
      Anes
      {{ DiscussionBoard.errors[8525151].message }}

Trending Topics