Welcome to the Treehouse Community
Looking to learn something new?
Calling a PHP Method with AJAX, secure or not?
I read about "Protocol Buffer" but i have no idea how to install it on my Webhost nor how to use it.
Spenser Hale20,778 Points
What you are asking can be secure, however to secure you will need to think of some basic web security. For example, when you make the AJAX call to fetch the users; you want to secure that request. Most front-end frameworks will say JSON and having JS print to page would be efficient. Using an standard with JSON also allows you to be flexible with the backend.
Should the the user information by private, ie only visible to other logged in users? If so then how will we authentication and then authorize them to fetch the users over AJAX? Could someone exploit our authentication? Should we use once time numbers or tokens, etc.