kadamwhite/wordpress-rest-api — pull request #58 by kadamwhite (2014-07-01 03:08:12+00:00)
Title: Add methods to explicitly set authentication on API requests

This PR fixes and updates the basic authentication handling for API requests

* fixes the broken basic auth behavior for methods other than GET
* sets authentication on GET requests when appropriate, such as for `revisions` endpoints
* lets users opt-in to authentication on any request with an `.auth()` method on `WPRequest`

Methods that explicitly set authentication:

* The entirety of `UsersRequest`
* `.revisions` in `PostsRequest` and `PagesRequest`
* `.edit()` and `.context( 'edit' )` within `CollectionRequest`

This can be extended to other methods where needed