I'm using Json Web Token with Wordpress.
I succeed in generating a token “code”: “jwt_auth_valid_credential”.
But when I try to create a post to my wordpress with my token (Header : Bearer token-generated). I got a : rest_cannot_create - Sorry, you are not allowed to create posts as this user - 401.
I have updated my HTacess In many ways. Without result. Here is the last one
SetEnvIf Authorization “(.*)” HTTP_AUTHORIZATION=$1
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule ^(.*) – [E=HTTP_AUTHORIZATION:%1]
</IfModule>
I’m on WPEngine.
Do you have an idea ?
Thanks