Add support for Basic Auth to the web API.
Review Request #1459 — Created March 6, 2010 and submitted
Add support for Basic Auth to the web API. This adds support for Basic Authentication for the web API. Now if any page presents an Access Denied error, it will do so with an HTTP 401 Unauthorized error and a WWW-Authentication header saying to use basic authentication. Clients can provide the username and password in a standard way, and we'll authenticate them. Clients no longer have to know to use the /account/login/ page before calling any other API calls. This is especially useful for clients that don't really know anything specific about the Review Board API. For example, wget or curl.
Made a request to a page that required login by using the web browser. I was presented with a dialog asking for a username and password. If I canceled it, I got a JSON response saying I wasn't logged in. When I tried it again and hit enter with invalid information, I was presented with the dialog again. When I finally entered valid information, the request was carried out. I then saw that I was logged in to Review Board again and could access my dashboard.