Jump to content

API Authentication with Plesk


NateWon

Recommended Posts

Hello, I'm having an issue authenticating the web service on a server configured using Plesk Onyx. The Password prompt won't allow me to authenticate "Welcome to PrestaShop Webservice, please enter the authentication key as the login. No password required."

Ive had the webservice working previously, prior to the new server upgrade (Added Plesk, SSDs, Faster CPUS etc) however now it won't work.

Previous server used Varnish+Apache on Ubuntu Servers to run. New System still uses Varnish but also has plesk with NGINX on that particular server - Ive disabled NGINX and still have the issue where the @ authentication won't work.  Ive also setup a local dev mahcine with Ubuntu+Apache and the @ authentication works, so Im assuming there is a flag somewhere creating the issue, but not sure whether I should fiddle in-case I break Plesk Onyx.

Im looking at the WebServiceRequest.php file and wondering whether I can tweak this to do what I want, the Error "Welcome to PrestaShop Webservice, please enter the authentication key as the login. No password required." only appears to show if there is an error, however I suspect this might create a record used for the rest of the transactions with the API?

I also can't swift to the ws_key method as Im using a third party SAAS.

Has anyone come accross this issue and have a solution?

Thank you,



 

Link to comment
Share on other sites

Only taken a week to find the correct Google Search term, turns out PHP FPM doesn't work so well with www-authenticate

https://community.bitnami.com/t/prestashop-webservice-keeps-asking-for-authentication/42216
 

To solve, edit .htaccess and add just after

RewriteEngine on

the code:

RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule ^(.*) - [E=HTTP_AUTHORIZATION:%1]

pd: if you have the file htaccess.conf on conf folder you must edit this file and add the code.

  • Like 2
Link to comment
Share on other sites

  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...