In my previous week's entry I had decided to fork dflydev-hawk and further improve it in order to use it as my base Hawk library in the Drupal plugin. This week I've done that and my version of the library is available at it's GitHub repository. My focus has been mostly to improve it's code quality as well as make sure its features and behaviour matches that of the original node.js implementation in order to avoid any disparity.
Here is a summary of changes I've done in the past week from the base library:
- Added ability for the client to generate and for the server to authenticate messages
- Added more unit tests for different parts of the library, bringing the test coverage to a more acceptable level
- Added inline function documentation (phpDocs) to the class' methods and cleaned up code in general to more closely follow PSR guidelines
- Added a few more security checks to validate input better
- A few other minor bug fixes and cleanups, as always a detailed log of changes can be seen in the GitHub repository
The PHP Hawk library will be the core component of the plugin and with the above changes the library is a lot closer to where I'd like it to be before starting to use it. This week I'll be focussing on finishing the library before moving into the next component, Oz, a protocol complementing Hawk to provide access delegation for clients.