Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.Start your free trial
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.
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.