Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Ghetto fix to make ActiveResource work with an
oath access token.
  • Loading branch information
David Underwood committed Mar 24, 2012
1 parent fd6cabf commit c8fe0a9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
8 changes: 1 addition & 7 deletions lib/shopify_api/session.rb
Expand Up @@ -123,12 +123,6 @@ def validate_signature(params)
def initialize(url, token = nil, params = nil)
self.url, self.token = url, token

if params
unless self.class.validate_signature(params) && params[:timestamp].to_i > 24.hours.ago.utc.to_i
raise "Invalid Signature: Possible malicious login"
end
end

self.class.prepare_url(self.url)
end

Expand Down Expand Up @@ -158,7 +152,7 @@ def valid?
# registring this third party application and concating the request_to it,
# and then calculating a MD5 hexdigest.
def computed_password
Digest::MD5.hexdigest(secret + token.to_s)
token.to_s
end

end
Expand Down
2 changes: 1 addition & 1 deletion lib/shopify_api/version.rb
@@ -1,3 +1,3 @@
module ShopifyAPI
VERSION = "2.3.0"
VERSION = "2.3.0-oauth"
end

0 comments on commit c8fe0a9

Please sign in to comment.