This is preparatory work for #136. The aim is to enable external software to authenticate into the API using JWTs. Before implementing this, I felt it was necessary to reorganize the existing authentication code. Issuing a PR now so I can deploy the code I've written so far to staging and test it.
Change summary
Factored out WP authentication into a separate middleware;
Added new /session Express route to issue a JWT;
Updated API docs;
Added .env file to store JWT secret and API key.
Misc improvements
Removed dependency of wordpress-bridge on Q, as a first step to remove Q altogether.
This is preparatory work for #136. The aim is to enable external software to authenticate into the API using JWTs. Before implementing this, I felt it was necessary to reorganize the existing authentication code. Issuing a PR now so I can deploy the code I've written so far to staging and test it.
Change summary
/session
Express route to issue a JWT;.env
file to store JWT secret and API key.Misc improvements
wordpress-bridge
on Q, as a first step to remove Q altogether.