Application passwords and htaccess
-
Hi
I have been wrestling with this for days. I have developed a custom API with endpoints for a WordPress site. All endpoints work fine with no authentication but of course this cannot be used in a live system. I am testing each endpoint using Postman.
I have creaed an application password and my understanding is that In Postman I select Basic authentication, entering the user name for the use which has the application password and the application password itself. I believe that WordPress validates this before it gets as far as my permissions call function.
But I cannot get it to work and think I may need to modify htaccess but cannot work. I have tried varipus htaccess settings. In some cases it ignores authentication, in other
cases gives a msssage:
“code”: “incorrect_password”,
“message”: “The provided password is an invalid application password.”,
“data”: {
“status”: 401
}`
Does anyone know the definitive htacesss settings for this configuration.?BTW the htaccess lines which I was given are. Commenting them out means no aithentication is needed.
RewriteCond %{HTTP:Authorization} ^(.) RewriteRule . - [e=HTTP_AUTHORIZATION:%1] RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization}]
I have tried enabling then disabling ieach one.
Thanks
Paul
- The topic ‘Application passwords and htaccess’ is closed to new replies.