Allow signet options to be passed through when authorizing
This commit is contained in:
		
							parent
							
								
									2a9fd28176
								
							
						
					
					
						commit
						a3bec66216
					
				| 
						 | 
					@ -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
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue