It seems very diifficult to get access to the OAuth Realm passed by a
Consumer Application to a Provider.
Would you think that it would be nice to expose it as convenience
function in the request_proxy base code (where it gets thrown out)?
it could be captured in header_params before the reject:
@realm = oauth_params['realm']
oauth_params.reject! { |k,v| k !~ /^oauth_/ }
and we can simply add an attr_accessor: to request_proxy/base.rb
attr_accessor :request, :options, :realm
Now client_application.rb can have access to the realm:
logger.info "Realm: #{signature.request.realm}"
Additionally, the Request Proxy should also expose the nonce and timestamp, as they may have been determined either from the header, query string, or POST body. I was initially thinking that the validate method should yield those in addition to everything else, but I haven't had a chance to dig into it.
On Fri, May 2, 2008 at 4:17 PM, cappelaere <cappela...@gmail.com> wrote:
> It seems very diifficult to get access to the OAuth Realm passed by a > Consumer Application to a Provider. > Would you think that it would be nice to expose it as convenience > function in the request_proxy base code (where it gets thrown out)?
> it could be captured in header_params before the reject: > @realm = oauth_params['realm'] > oauth_params.reject! { |k,v| k !~ /^oauth_/ }
> and we can simply add an attr_accessor: to request_proxy/base.rb > attr_accessor :request, :options, :realm
> Now client_application.rb can have access to the realm: > logger.info "Realm: #{signature.request.realm}"
It looks like nonce and timestamp are already exposed in my version 0.2.5. Pat.
From: Seth Fitzsimmons <s...@mojodna.net> Reply-To: <oauth-ruby@googlegroups.com> Date: Fri, 2 May 2008 17:07:25 +0100 To: <oauth-ruby@googlegroups.com> Subject: [oauth-ruby] Re: Making the Realm visible
+1
Additionally, the Request Proxy should also expose the nonce and timestamp, as they may have been determined either from the header, query string, or POST body. I was initially thinking that the validate method should yield those in addition to everything else, but I haven't had a chance to dig into it.
On Fri, May 2, 2008 at 4:17 PM, cappelaere <cappela...@gmail.com> wrote:
> It seems very diifficult to get access to the OAuth Realm passed by a > Consumer Application to a Provider. > Would you think that it would be nice to expose it as convenience > function in the request_proxy base code (where it gets thrown out)?
> it could be captured in header_params before the reject: > @realm = oauth_params['realm'] > oauth_params.reject! { |k,v| k !~ /^oauth_/ }
> and we can simply add an attr_accessor: to request_proxy/base.rb > attr_accessor :request, :options, :realm
> Now client_application.rb can have access to the realm: > logger.info <http://logger.info> "Realm: #{signature.request.realm}"
On Fri, May 2, 2008 at 6:09 PM, Pat Cappelaere <cappela...@gmail.com> wrote: > Seth,
> It looks like nonce and timestamp are already exposed in my version 0.2.5. > Pat.
> ------------------------------ > *From: *Seth Fitzsimmons <s...@mojodna.net> > *Reply-To: *<oauth-ruby@googlegroups.com> > *Date: *Fri, 2 May 2008 17:07:25 +0100 > *To: *<oauth-ruby@googlegroups.com> > *Subject: *[oauth-ruby] Re: Making the Realm visible
> +1
> Additionally, the Request Proxy should also expose the nonce and > timestamp, as they may have been determined either from the header, query > string, or POST body. I was initially thinking that the validate method > should yield those in addition to everything else, but I haven't had a > chance to dig into it.
> seth
> On Fri, May 2, 2008 at 4:17 PM, cappelaere <cappela...@gmail.com> wrote:
> It seems very diifficult to get access to the OAuth Realm passed by a > Consumer Application to a Provider. > Would you think that it would be nice to expose it as convenience > function in the request_proxy base code (where it gets thrown out)?
> it could be captured in header_params before the reject: > @realm = oauth_params['realm'] > oauth_params.reject! { |k,v| k !~ /^oauth_/ }
> and we can simply add an attr_accessor: to request_proxy/base.rb > attr_accessor :request, :options, :realm
> Now client_application.rb can have access to the realm: > logger.info <http://logger.info> <http://logger.info> "Realm: > #{signature.request.realm}"