Rest API Authentication
-
Now that this plugin supports generating a new jwt based on the users email/password, do you have any plans for adding the ability to authenticate calls to the rest api endpoints?
Currently we are using JWT Authentication for WP-API plugin for authenticating calls to the rest api endpoints but it’d be great to use your plugin for generating and authenticating jwts.
Here is our workflow:
Anonymous
– Unauthenticated calls to rest api endpoints expose wordpress posts/pages as if an anonymous user was visiting the site
– Authorization Bearer Header is NOT supplied to rest api calls making it so only public content is returnedAuthenticated
– User authenticates viahttps://{{Domain}}/wp-json/jwt-auth/v1/tokenand is given a jwt (synonymous with your/authendpoint)
– Authorization Bearer Header is supplied to rest api calls allowing for json to include protected content. Middleware is in place to detect Authorization header and immediately set the user before proceeding.I believe the only thing your plugin is missing is the ability to set the user id prior to processing the rest endpoint. Is this correct or am I missing something?
The topic ‘Rest API Authentication’ is closed to new replies.