Backend / DevOps / Architect
Brit by birth,
located worldwide

All content © Alex Shepherd 2008-2024
unless otherwise noted

Laravel HMAC Authentication Bundle

Published
1 min read
image
Image Credit: Unknown (if this is your work, reach out to me and I'll credit you!)

This project provides a way to simply implement custom HMAC authentication for a Laravel application. Full README on Github. Grab the source from Github here!

Example Usage:

To apply this on every request, change application/routes.php's before filter to something along the following lines:

Route::filter('before', function()
{
  $fail_msg = 'Unable to authenticate';
  $fail_response = Response::json(array('message' => $fail_msg), 401);

  if(!HMAC::authenticate())
    return $fail_response;
});