-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom digest algorithms don't seem to change anything #106
Comments
The digest option is not available in v1.5.0, it is available currently in the master branch, and will be available in v2.0.0 which has not been released yet. Do you mind testing against master and if all is good I'll release 2.0.0 |
Doesn't seem to work for me. Switched to master and bundling says:
The RSpec test still seems to not have it generating the correct header:
By the way, it also seems to have broken previous hashes, did the default hashing algorithm change in 2.0.0?
|
v2.0.0 now includes the http method in the canonical string by default. v1.4.0 introduced a flag to provide an upgrade strategy from v1.3.0 and earlier to v2.0.0. See https://github.com/mgomes/api_auth/blob/master/CHANGELOG.md#14-2015-12-16 for more info on that change. |
OK, so that explains the changed hashes, but it's still not returning APIAuth-HMAC-SHA1? Thanks. |
You can view the full discussion around the :digest change here: #98 The summary is that SHA1 is the default, so to allow for backwards compatibility, specifying sha1 doesn't change the format of the Auth string. However maybe we should change it such that sha1 is the default when no digest is specified, and uses the previous style Auth string Does that make sense? What do you think about that strategy? |
No, that makes sense - I just wasn't aware of it. Now I've changed it to be sha256 it works fine for me. I'm happy merging my changes in to Flexirest to support Api-Auth 2.0 once you release your 2.0.0 version. Thanks. |
Can you let me know when you release 2.0.0 (on this issue or by email) and I'll release the version of FR that supports it. |
v2.0.0 has just been released! |
Thank you. I actually released mine the other day because I put some code in to detect which functionality is available (so it would work with people using the old or new versions). Thanks though. |
Good morning,
I've had an issue in Flexirest to support your new
:digest
option to customise the digest algorithm. Unfortunately, it doesn't seem to change anything. I have code that looks like this:The output of my test is this:
As you can see the
Authorization
header becomesAPIAuth id123:PMWBThkB8vKbvUccHvoqu9G3eVk=
rather than something beginning withAPIAuth-HMAC-SHA1
.I tried it with
sha256
as well, the same result. I'm using v1.5.0 of ApiAuth.The text was updated successfully, but these errors were encountered: