Allow signet options to be passed through when authorizing

This commit is contained in:
Steven Bazyl 2015-07-20 12:37:03 -07:00
parent 2a9fd28176
commit a3bec66216
1 changed files with 2 additions and 2 deletions

View File

@ -83,7 +83,7 @@ module Google
# #
# @return [Signet::OAuth2::Client] # @return [Signet::OAuth2::Client]
# Authorization instance, nil if user cancelled. # Authorization instance, nil if user cancelled.
def authorize(storage=nil) def authorize(storage=nil, options=nil)
auth = @authorization auth = @authorization
server = WEBrick::HTTPServer.new( server = WEBrick::HTTPServer.new(
@ -105,7 +105,7 @@ module Google
server.stop server.stop
end end
Launchy.open(auth.authorization_uri.to_s) Launchy.open(auth.authorization_uri(options).to_s)
server.start server.start
ensure ensure
server.shutdown server.shutdown