jachenry
Forum Replies Created
-
A friend helped me solve the issue. It appears as though the conditional for grabbing the header jwt was matching no matter what on our site. The fix was to change the regular expression so it requires jwt to not be empty…
'/(?:Bearer ?)?(.+)/m'Apologies to piggy back on your issue but I’m also noticing a
Wrong Requesterror when sending thejwtin url query param. I believe the issue is related to me having both the Header and URL options selected in the general settings. If I turn off the Header option, leaving url as the only authentication option, thejwtquery param is detected fine and the redirect occurs.Hey Nicu!
I was able to verify this on one of my api endpoints. If jwt was supplied, the authenticated version of the content was returned.
Thanks so much!
Jacob
Nicu –
Not quite. I was wondering if you had any plans to work similar to https://github.com/WP-API/jwt-auth. Where in addition to providing an
/authendpoint for generating a jwt, you also intercept and validate jwt tokens supplied to the rest api endpoints.There are other plugins that already handle this sort of authentication like the link posted above. Just seems like the last piece needed to make your plugin the one stop shop for rest-api authentication. authentication/registration/single-sign-on.
Jacob
I successfully set the registration user slug to ‘customer’ and it appears to work. Very nice.