Skip to content

Custom digest algorithms don't seem to change anything #106

@andyjeffries

Description

@andyjeffries

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:

      puts api_auth[:api_auth_options].inspect
      puts request.inspect
      ApiAuth.sign!(
        request,
        api_auth[:api_auth_access_id],
        api_auth[:api_auth_secret_key],
        api_auth[:api_auth_options])
      puts request.inspect

The output of my test is this:

{:digest=>"sha1"}
#<struct Faraday::Request method=:get, path="/foo", params={}, headers={"Date"=>"Sat, 14 Mar 2015 15:13:24 GMT", "User-Agent"=>"Faraday v0.9.2"}, body=nil, options=#<Faraday::RequestOptions (empty)>>
#<struct Faraday::Request method=:get, path="/foo", params={}, headers={"Date"=>"Sat, 14 Mar 2015 15:13:24 GMT", "User-Agent"=>"Faraday v0.9.2", "Authorization"=>"APIAuth id123:PMWBThkB8vKbvUccHvoqu9G3eVk="}, body=nil, options=#<Faraday::RequestOptions (empty)>>

As you can see the Authorization header becomes APIAuth id123:PMWBThkB8vKbvUccHvoqu9G3eVk= rather than something beginning with APIAuth-HMAC-SHA1.

I tried it with sha256 as well, the same result. I'm using v1.5.0 of ApiAuth.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions