This week I was mostly away on a trip to Italy, which is a beautiful country by the way and I would absolutely recommend anyone to visit it. I returned a couple days ago and hence I do not have a lot of progress since my last week.
In Drupal, Authentication Provider provides various methods for an user to identify (or authenticate) themselves. By default, Drupal comes with the Cookie authentication provider enabled which allows any user to identify themselves using cookies which are the standard method of authentication for most browser based web sites/applications. Drupal also supports Basic HTTP authentication and has an optional module included by default which can be enabled in the Administration Panel.
Any authentication provider in Drupal has to implement the AuthenticationProviderInterface which has two main methods, namely applies(Request) and authenticate(Request) where Request is the object of Symfony\Component\HttpFoundation\Request containing all the data about the current request (Headers, GET parameters, POST parameters and so on).
Identifying Hawk requests
Every Hawk request from a client to the server passes an Authorizaion header starting with Hawk, for example:
GET /resource/1?b=1&a=2 HTTP/1.1 Host: example.com:8000 Authorization: Hawk id="dh37fgj492je", ts="1353832234", nonce="j4h3g2", ext="some-app-ext-data", mac="6R4rV5iE+NPoym+WwjeHzjAGXUtLNIxmo1vpMofpLAE="
Any request starting with Hawk in the Authorization parameter gets taken over by the Hawk authentication provider which authenticates based on the credentials provided (more on this in the next week's blog).
My progress this week
This week I've had about a day or so to work, so the progress hasn't been much. But nonetheless, I've managed to lay out a plan of implementing the Hawk authentication provider and get started on it, once this is complete I can move onto implementing the UI which should be the simpler part of the module. As always, you can see the module page to check the current code.