@@ -32,12 +32,12 @@ class APIClient
32
32
# client.authorization = flow.authorize
33
33
#
34
34
class InstalledAppFlow
35
-
35
+
36
36
RESPONSE_BODY = <<-HTML
37
37
< html >
38
38
< head >
39
39
< script >
40
- function closeWindow ( ) {
40
+ function closeWindow ( ) {
41
41
window . open ( '' , '_self' , '' ) ;
42
42
window . close ( ) ;
43
43
}
@@ -47,14 +47,14 @@ class InstalledAppFlow
47
47
< body > You may close this window.</ body >
48
48
</ html >
49
49
HTML
50
-
50
+
51
51
##
52
52
# Configure the flow
53
53
#
54
54
# @param [Hash] options The configuration parameters for the client.
55
55
# @option options [Fixnum] :port
56
56
# Port to run the embedded server on. Defaults to 9292
57
- # @option options [String] :client_id
57
+ # @option options [String] :client_id
58
58
# A unique identifier issued to the client to identify itself to the
59
59
# authorization server.
60
60
# @option options [String] :client_secret
@@ -73,19 +73,19 @@ def initialize(options)
73
73
:redirect_uri => "http://localhost:#{ @port } /" } . update ( options )
74
74
)
75
75
end
76
-
76
+
77
77
##
78
78
# Request authorization. Opens a browser and waits for response.
79
79
#
80
- # @param [Google::APIClient::FileStorage ] storage
80
+ # @param [Google::APIClient::Storage ] storage
81
81
# Optional object that responds to :write_credentials, used to serialize
82
82
# the OAuth 2 credentials after completing the flow.
83
83
#
84
84
# @return [Signet::OAuth2::Client]
85
85
# Authorization instance, nil if user cancelled.
86
86
def authorize ( storage = nil )
87
87
auth = @authorization
88
-
88
+
89
89
server = WEBrick ::HTTPServer . new (
90
90
:Port => @port ,
91
91
:BindAddress => "localhost" ,
0 commit comments