WP-API / Basic-Auth

Basic Authentication handler for the JSON API, used for development and debugging purposes
772 stars 286 forks source link

Fix basic auth #22

Closed distroid closed 9 years ago

distroid commented 9 years ago

1) Basic auth doesn't work by direct url in browser (try url like http://wp.lo/wp-json in browser) 2) Basic auth doesn't work for wp api v2 (https://github.com/WP-API/WP-API) in cases:

rmccue commented 9 years ago

This completely breaks unauthenticated access, and isn't how the authentication is meant to work. :)

The plugin should work fine with v2. In your browser, try accessing http://user:pass@example.com/wp-json/ to explicitly send authentication. If that doesn't work, try using an API client instead.

Thanks!

distroid commented 9 years ago

But I still can get API result without providing auth info. Enter link like http://example.com/wp-json/ in your browser window. You will get json responce without asking authentication data (user\password).

rmccue commented 9 years ago

That's correct, and intended behaviour. All of the data you can see there is already available on sites, we're just making it a bit easier to access.