On Thu, Sep 29, 2011 at 04:15:08PM +0200, Jan Provaznik wrote:
Is it necessary to use 'authenticated_' prefix in above methods?
Common use case will be something like this:
oauth = OAuthClient.new
oauth.authenticated_get
oauth.authenticated_post
It's not necessary, no. I think you're right that it will be perfectly
clear without the "authenticated_" prefix. I'll change this.
It's not possilbe to set default_headers, this would be very handy
because we will have to send username with each request
I don't understand why you say it is not possible. Do you just mean that
the method shouldn't be private so that we can set them directly? What I
had in mind is that you could implement, say, a Katello client, and in
the client do:
def default_headers
{'katello-user' => 'admin'}
end
But I might have misunderstood you.
I'm not sure about this host extraction, then it's not
possible to
use multiple oauth providers on one host. Why not use whole
"resource" as key?
Good point. I was trying to keep things looking clean in the config
file, but I didn't consider the limit it placed on using more than one
provider per host. I'll change this, too.
Hi Matt,
overall looks/works fine, have couple of less important questions inline.
Thanks. If you can clarify/expand what you mean about default_headers,
I'll go ahead and resend with fixes.
-- Matt