api_auth icon indicating copy to clipboard operation
api_auth copied to clipboard

Document for faraday client

Open leomao10 opened this issue 9 years ago • 4 comments

Hi There, I could not find any document for api-auth faraday client.

Is there any example code other than spec

leomao10 avatar Aug 16 '16 05:08 leomao10

So far, this is how I make it work:

connection = Faraday.new(url: host)
connection.get url, params do |request|
  ApiAuth.sign!(request, access_id, secret_key, digest: 'sha256')
end

However, I need to add ApiAuth.sign! for every Faraday request. And such logic should be abstract as a Faraday middleware.

Wondering if it is possible to do it.

leomao10 avatar Aug 16 '16 09:08 leomao10

Hey @mgomes,

Sorry to @ you directly, just wondering if ApiAuth support Faraday middleware at the moment, as for middleware, what I get is request_env, not request object from Faraday

leomao10 avatar May 04 '17 02:05 leomao10

@leomao10 when you call authentic? does it return true? I've been doing exactly the same from the client perspective, but on the server authentic? is always false.

zamith avatar Jul 18 '17 17:07 zamith

@leomao10 @zamith I am also facing the same issue but with 2.1.0 version of the gem. Please let me know if I should create a new issue for the same. cc: @mgomes

punitcse avatar Jul 16 '19 15:07 punitcse