mgomes / api_auth

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

Add a MD5 compatibility option in authentic? method #207

Closed Slokilla closed 2 years ago

Slokilla commented 2 years ago

In order to facilitate the transition between 2.4. and 2.5. for ActionController users, I propose here an option for base#authentic? named authorize_md5 that is set to false by default. If authorize_md5 is set to true, the server will accept both CONTENT_MD5 and X_AUTHORIZATION_CONTENT_SHA256 headers.

This feature is designed to be transparent for SHA-256 users, and to permit MD5 users to work both with MD5 and SHA-256

fwininger commented 2 years ago

lgtm, thanks