cedaro / satispress

Expose installed WordPress plugins and themes as Composer packages.
508 stars 51 forks source link

Uncaught SatisPress\Exception\AuthenticationException #102

Closed jakgsl closed 5 years ago

jakgsl commented 5 years ago

Doing composer update or composer install or composer require our-vendor/package-name doesn't trigger authentication. Even after adding auth in it still returns the following error. Accessing https://oursite.co.uk/satispress/packages.json when logged in to Wordpress gives the correct JSON though.

Fatal error: Uncaught SatisPress\Exception\AuthenticationException: Authentication is required for this resource.

Should it be triggering an auth request?

Just to note it's doing this even with authentication turned off via the function hook

I had to return 1; in authenticate() in UnauthorizedServer.php to get it working for the moment.

bradyvercher commented 5 years ago

It sounds like your site is in debug mode (WP_DEBUG is enabled), so you're seeing the actual exception. The auth headers aren't sent in that case, so you won't see a prompt for credentials in your client (the browser or Composer).

You can try disabling debug mode to receive the prompt, or send the credentials with the initial request.

jakgsl commented 5 years ago

Ok great thanks so much for the reply! It's an awesome plugin.