mozilla/django-browserid — pull request #202 by Osmose (2013-09-24 22:06:40+00:00)
Title: Fix #194: Replace verify function with Verifier classes.

Adds a RemoteVerifier class to replace the verify function. While this makes straight-up verification slightly more clunky (`RemoteVerifier().verify()`), it makes it much easier to swap out alternate verifiers and to customize things like the arguments passed to `requests.post`.

This changes the public API, but we're pre-1.0, suckers!

This also updates `get_audience` to use a setting called `BROWSERID_AUDIENCES` instead of `SITE_URL`. The bad news is that it means you can't develop without this setting (whereas SITE_URL was optional in development), but IMO it's useful to explicitly require an important setting like this at all times. The upside is that I removed a bunch of code around the three or four different types that `SITE_URL` could be, and removed our reliance on a semi-common setting that may be used for several different things.

Playdoh, for example, can now just use `['http://localhost:8000', 'http://127.0.0.1']` as it's value instead of making the user customize the value.

Other smaller changes:
- Add `tmp` to gitignore. I used this directory for storing a small Django site that uses a develop install of the library, making it easy to test changes on an example site.
- Return a `VerificationResult` from verification instead of a dict. It's more useful!
- Change `import_function_from_setting` to `import_from_setting`. That other name was just obnoxious.

Sorry for dumping such a huge change, but, I mean, the issue is a huge change. Phew!