I am a volunteer in a non-profit organization. I have taken over maintenance of a number of apps written in PHP/SQL/Dreamweaver. The apps are over 10 years old. I am migrating these apps from PHP/SQL to Wordpress plugins. I am now using Wordpress for authentication and set a cookie the legacy system recognizes. Some of the functions of the legacy system need to access the user list. Currently I need to maintain users in both systems. I would like to use the Wordpress REST API to access user information in Wordpress. (All user with role = instructor.) All examples of accessing the Wordpress REST API I have found involve JavaScript/Basic Authentication. (But then tell you not to use Basic Authentication.) Can anyone point me to documentation on accessing the REST API from a PHP application on the same server? Thanks
I am a volunteer in a non-profit organization. I have taken over maintenance of a number of apps written in PHP/SQL/Dreamweaver. The apps are over 10 years old. I am migrating these apps from PHP/SQL to Wordpress plugins. I am now using Wordpress for authentication and set a cookie the legacy system recognizes. Some of the functions of the legacy system need to access the user list. Currently I need to maintain users in both systems. I would like to use the Wordpress REST API to access user information in Wordpress. (All user with role = instructor.) All examples of accessing the Wordpress REST API I have found involve JavaScript/Basic Authentication. (But then tell you not to use Basic Authentication.) Can anyone point me to documentation on accessing the REST API from a PHP application on the same server? Thanks
After a lot of reading it appears that JWT Authentication is the best way to go. grazianodev has a good explanation of implementation at:
How to: Make JWT-authenticated requests to the Wordpress API
Thank you. My biggest concern is this answer requires the "JTW Authentication for WP REST API" plugin. I was looking for an answer that did not rely on yet another plugin. I do not understand why with an interface like REST authentication and security appear to be an afterthought and not built in at the beginning.