Skip to content

Commit

Permalink
For three-legged OAuth, allow the authorize URL to be specified with a
Browse files Browse the repository at this point in the history
query string.
  • Loading branch information
Eugene Park committed Jul 14, 2011
1 parent f5864fb commit 3e55f3f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/satisfaction.rb
Expand Up @@ -102,7 +102,13 @@ def request_token
end

def authorize_url(token)
"#{options[:authorize_url]}?oauth_token=#{token.token}"
uri = URI.parse(options[:authorize_url])
if uri.query.present?
uri.query += "&oauth_token=#{token.token}"
else
uri.query = "oauth_token=#{token.token}"
end
uri.to_s
end

def access_token(token)
Expand Down

0 comments on commit 3e55f3f

Please sign in to comment.