mgomes / api_auth

HMAC authentication for Rails and HTTP Clients
MIT License
480 stars 147 forks source link

add new 'headers_to_sign' option to sign custom headers #170

Closed fakenine closed 5 years ago

fakenine commented 5 years ago

Hello,

This adds the possibility to sign custom/specified headers via a headers_to_sign option that will be passed as an array containing the headers names

To add more context into this, we would like to be able to sign the X-Forwarded-For header for instance

fwininger commented 5 years ago

Hi @fakenine, I think this PR can be very useful 👍

Can you just do some tests and ensure that all current tests work ?

fakenine commented 5 years ago

Hello, I've added tests for this feature but I'm having trouble with an error on some pipelines, that I'm also seeing on other PRs

Failure/Error: require 'active_resource'
LoadError:
  cannot load such file -- rails
fwininger commented 5 years ago

Hi @fakenine, can you run rubocop and fix the issue ?

fakenine commented 5 years ago

Done!