Skip to content

Commit

Permalink
scope option for Google's endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
mojodna committed May 26, 2009
1 parent 3fa4dab commit 79c81a9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions History.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Support streamable body contents for large request bodies (Seth Cousins)
* Support for OAuth 1.0a (Seth)
* Added proxy support to OAuth::Consumer (Marshall Huss)
* Added --scope CLI option for Google's 'scope' parameter (Seth)

== 0.3.4 2009-05-06

Expand Down
6 changes: 5 additions & 1 deletion lib/oauth/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def execute(stdout, stdin, stderr, arguments = [])
oauth_verifier = nil

# get a request token
request_token = consumer.get_request_token(:oauth_callback => options[:oauth_callback])
request_token = consumer.get_request_token({ :oauth_callback => options[:oauth_callback] }, { :scope => options[:scope] })

if request_token.callback_confirmed?
stdout.puts "Server appears to support OAuth 1.0a; enabling support."
Expand Down Expand Up @@ -296,6 +296,10 @@ def option_parser(arguments = "")
opts.on("--request-token-url URL", "Specifies the request token URL.") do |v|
options[:request_token_url] = v
end

opts.on("--scope SCOPE", "Specifies the scope (Google-specific).") do |v|
options[:scope] = v
end
end
end

Expand Down

0 comments on commit 79c81a9

Please sign in to comment.