Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Bug fixed for the case proxy_class is not set.

  • Loading branch information...
commit 56115cf328e6a3e039899e8af23bc5417146d2df 1 parent 7c1aaef
@bananagi bananagi authored
View
1  lib/opensocial-wap.rb
@@ -1,5 +1,6 @@
require 'opensocial-wap/config/oauth'
require 'opensocial-wap/config/url'
+require 'opensocial-wap/oauth/request_proxy/oauth_rack_request_proxy'
require 'opensocial-wap/oauth/helpers/base'
require 'opensocial-wap/oauth/helpers/basic_helper'
require 'opensocial-wap/oauth/client_helper'
View
10 lib/opensocial-wap/oauth/helpers/basic_helper.rb
@@ -6,6 +6,8 @@ module OAuth
module Helpers
class BasicHelper < Base
+ DEFAULT_PROXY_CLASS = ::OpensocialWap::OAuth::RequestProxy::OAuthRackRequestProxy
+
def self.setup(options)
# Set class instance variables.
options.each do |k, v|
@@ -15,11 +17,9 @@ def self.setup(options)
end
def verify(options = nil)
- if self.class.proxy_class
- request_proxy = self.class.proxy_class.new(@request)
- else
- request_proxy = ::OAuth::RequestProxy.proxy(@request)
- end
+ proxy_class = self.class.instance_variable_get(:@proxy_class) || DEFAULT_PROXY_CLASS
+ request_proxy = proxy_class.new(@request)
+
opts = {
:consumer_secret => self.class.consumer_secret,
:token_secret => request_proxy.parameters['oauth_token_secret'] }
Please sign in to comment.
Something went wrong with that request. Please try again.