This was a quieter week in terms of Summer of Code, most of my focus went into implementing a submodule which allows displaying QR codes. Namely, I achieved two things this week:
- Forced Database backend for Nonce validation
- Implemented a submodule to show individual credential’s QR codes
Database backend for Nonce validation
As I discussed in one of my earlier posts, nonce validator uses cache for storing previous values which are validated for every request. However, when multiple servers are used with memory based cache or file based cache, it can cause problems as each server would have a different set of nonce values causing. I changed the backend to force Database, making sure a single set of values is being used across multiple servers.
QR Codes submodule
I implemented a submodule which adds a link to show a QR code for every credential. For this, I studied Drupal’s hooks, events and plugins and finally settled on creating my own event in the main module in order to allow third party modification. The QR submodule can be separately enabled or disabled depending upon the administrator’s preference. I go over it in more details in my other blog post. QR Codes themsleves are generated using Endroid\QrCode library which seemed like an excellent choice,
For the moment, that’s about it. Over the next week I’ll focus on implementing unit tests, adding locking mechanism while validating nonce values and a few other things.