tobami/codespeed — pull request #115 by a8 (2012-06-05 13:45:28+00:00)
Title: Add api - added ApiKeyAuthentication and DjangoAuthorization

Hi,

Sorry that it took so long. Still not finished, but let's call it a milestone.

I changed the authentication for all resources in the REST API to [ApiKeyAuthentication](http://django-tastypie.readthedocs.org/en/latest/authentication_authorization.html#apikeyauthentication) for everything but GET. Thus, fetching data doesn't require any auth. The api key is generated when the user is created. It is shown in the /admin.

The authorization is changed to [DjangoAuthorization](http://django-tastypie.readthedocs.org/en/latest/authentication_authorization.html#djangoauthorization). Thus, all access rights can be configured in the /admin.

It's mainly testing code and a very few changes on api.py. Nothing else is touched.

The next step will be some refactoring of the ResultBundle to make it more like Tastypie works.

Anyhow, now all resources do have authentication and authorization. I've been using the API for some month now.

a8