google-authsub 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +0 -15
- data/google-authsub.gemspec +7 -69
- data/lib/googleauthsub.rb +2 -3
- data/spec/googleauthsub_spec.rb +3 -3
- metadata +17 -52
- data/VERSION +0 -1
- data/coverage/-Library-Ruby-Gems-1_8-gems-FakeWeb-1_1_2-lib-fake_net_http_rb.html +0 -679
- data/coverage/-Library-Ruby-Gems-1_8-gems-FakeWeb-1_1_2-lib-fake_web_rb.html +0 -843
- data/coverage/-Library-Ruby-Gems-1_8-gems-rcov-0_8_1_2_0-lib-rcov_rb.html +0 -1598
- data/coverage/index.html +0 -360
- data/coverage/lib-googleauthsub_rb.html +0 -877
- data/coverage/spec-googleauthsub_spec_rb.html +0 -950
- data/coverage/spec-spec_helper_rb.html +0 -640
- data/doc/classes/AuthEchoServlet.html +0 -152
- data/doc/classes/AuthEchoServlet.src/M000001.html +0 -20
- data/doc/classes/AuthEchoServlet.src/M000002.html +0 -18
- data/doc/classes/GData/AuthSubError.html +0 -139
- data/doc/classes/GData/AuthSubError.src/M000019.html +0 -18
- data/doc/classes/GData/Error.html +0 -111
- data/doc/classes/GData/GoogleAuthSub.html +0 -521
- data/doc/classes/GData/GoogleAuthSub.src/M000001.html +0 -29
- data/doc/classes/GData/GoogleAuthSub.src/M000002.html +0 -22
- data/doc/classes/GData/GoogleAuthSub.src/M000003.html +0 -29
- data/doc/classes/GData/GoogleAuthSub.src/M000004.html +0 -22
- data/doc/classes/GData/GoogleAuthSub.src/M000005.html +0 -24
- data/doc/classes/GData/GoogleAuthSub.src/M000006.html +0 -19
- data/doc/classes/GData/GoogleAuthSub.src/M000007.html +0 -18
- data/doc/classes/GData/GoogleAuthSub.src/M000008.html +0 -18
- data/doc/classes/GData/GoogleAuthSub.src/M000009.html +0 -24
- data/doc/classes/GData/GoogleAuthSub.src/M000010.html +0 -25
- data/doc/classes/GData/GoogleAuthSub.src/M000011.html +0 -30
- data/doc/classes/GData/GoogleAuthSub.src/M000012.html +0 -18
- data/doc/classes/GData/GoogleAuthSub.src/M000013.html +0 -18
- data/doc/classes/GData/GoogleAuthSub.src/M000014.html +0 -18
- data/doc/classes/GData/GoogleAuthSub.src/M000015.html +0 -18
- data/doc/classes/GData/GoogleAuthSub.src/M000016.html +0 -20
- data/doc/classes/GData/GoogleAuthSub.src/M000017.html +0 -20
- data/doc/classes/GData/GoogleAuthSub.src/M000018.html +0 -19
- data/doc/classes/GData.html +0 -162
- data/doc/created.rid +0 -1
- data/doc/files/googleauthsub_rb.html +0 -140
- data/doc/files/lib/googleauthsub_rb.html +0 -140
- data/doc/files/spec/googleauthsub_spec_rb.html +0 -146
- data/doc/files/spec/googleresponder_rb.html +0 -121
- data/doc/files/spec/spec_helper_rb.html +0 -149
- data/doc/fr_class_index.html +0 -31
- data/doc/fr_file_index.html +0 -30
- data/doc/fr_method_index.html +0 -45
- data/doc/index.html +0 -24
- data/doc/rdoc-style.css +0 -208
- data/live test/authsub_test.html +0 -40
- data/live test/gastest.rb +0 -90
@@ -1,521 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
-
<head>
|
8
|
-
<title>Class: GData::GoogleAuthSub</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
-
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
-
<script type="text/javascript">
|
13
|
-
// <![CDATA[
|
14
|
-
|
15
|
-
function popupCode( url ) {
|
16
|
-
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
-
}
|
18
|
-
|
19
|
-
function toggleCode( id ) {
|
20
|
-
if ( document.getElementById )
|
21
|
-
elem = document.getElementById( id );
|
22
|
-
else if ( document.all )
|
23
|
-
elem = eval( "document.all." + id );
|
24
|
-
else
|
25
|
-
return false;
|
26
|
-
|
27
|
-
elemStyle = elem.style;
|
28
|
-
|
29
|
-
if ( elemStyle.display != "block" ) {
|
30
|
-
elemStyle.display = "block"
|
31
|
-
} else {
|
32
|
-
elemStyle.display = "none"
|
33
|
-
}
|
34
|
-
|
35
|
-
return true;
|
36
|
-
}
|
37
|
-
|
38
|
-
// Make codeblocks hidden by default
|
39
|
-
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
-
|
41
|
-
// ]]>
|
42
|
-
</script>
|
43
|
-
|
44
|
-
</head>
|
45
|
-
<body>
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
<div id="classHeader">
|
50
|
-
<table class="header-table">
|
51
|
-
<tr class="top-aligned-row">
|
52
|
-
<td><strong>Class</strong></td>
|
53
|
-
<td class="class-name-in-header">GData::GoogleAuthSub</td>
|
54
|
-
</tr>
|
55
|
-
<tr class="top-aligned-row">
|
56
|
-
<td><strong>In:</strong></td>
|
57
|
-
<td>
|
58
|
-
<a href="../../files/lib/googleauthsub_rb.html">
|
59
|
-
lib/googleauthsub.rb
|
60
|
-
</a>
|
61
|
-
<br />
|
62
|
-
<a href="../../files/spec/spec_helper_rb.html">
|
63
|
-
spec/spec_helper.rb
|
64
|
-
</a>
|
65
|
-
<br />
|
66
|
-
</td>
|
67
|
-
</tr>
|
68
|
-
|
69
|
-
<tr class="top-aligned-row">
|
70
|
-
<td><strong>Parent:</strong></td>
|
71
|
-
<td>
|
72
|
-
Object
|
73
|
-
</td>
|
74
|
-
</tr>
|
75
|
-
</table>
|
76
|
-
</div>
|
77
|
-
<!-- banner header -->
|
78
|
-
|
79
|
-
<div id="bodyContent">
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
<div id="contextContent">
|
84
|
-
|
85
|
-
<div id="description">
|
86
|
-
<p>
|
87
|
-
<a href="GoogleAuthSub.html">GoogleAuthSub</a> This class handles the
|
88
|
-
Google Authentication for Web Applications API
|
89
|
-
</p>
|
90
|
-
|
91
|
-
</div>
|
92
|
-
|
93
|
-
|
94
|
-
</div>
|
95
|
-
|
96
|
-
<div id="method-list">
|
97
|
-
<h3 class="section-bar">Methods</h3>
|
98
|
-
|
99
|
-
<div class="name-list">
|
100
|
-
<a href="#M000017">auth_data</a>
|
101
|
-
<a href="#M000016">auth_header</a>
|
102
|
-
<a href="#M000015">delete</a>
|
103
|
-
<a href="#M000012">get</a>
|
104
|
-
<a href="#M000004">new</a>
|
105
|
-
<a href="#M000013">post</a>
|
106
|
-
<a href="#M000014">put</a>
|
107
|
-
<a href="#M000006">receive_token</a>
|
108
|
-
<a href="#M000005">request_url</a>
|
109
|
-
<a href="#M000010">revoke_token</a>
|
110
|
-
<a href="#M000008">secure_token?</a>
|
111
|
-
<a href="#M000009">session_token</a>
|
112
|
-
<a href="#M000007">session_token?</a>
|
113
|
-
<a href="#M000003">set_private_key</a>
|
114
|
-
<a href="#M000018">sig</a>
|
115
|
-
<a href="#M000011">token_info</a>
|
116
|
-
</div>
|
117
|
-
</div>
|
118
|
-
|
119
|
-
</div>
|
120
|
-
|
121
|
-
|
122
|
-
<!-- if includes -->
|
123
|
-
|
124
|
-
<div id="section">
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
<div id="attribute-list">
|
131
|
-
<h3 class="section-bar">Attributes</h3>
|
132
|
-
|
133
|
-
<div class="name-list">
|
134
|
-
<table>
|
135
|
-
<tr class="top-aligned-row context-row">
|
136
|
-
<td class="context-item-name">next_url</td>
|
137
|
-
<td class="context-item-value"> [RW] </td>
|
138
|
-
<td class="context-item-desc"></td>
|
139
|
-
</tr>
|
140
|
-
<tr class="top-aligned-row context-row">
|
141
|
-
<td class="context-item-name">scope</td>
|
142
|
-
<td class="context-item-value"> [RW] </td>
|
143
|
-
<td class="context-item-desc"></td>
|
144
|
-
</tr>
|
145
|
-
<tr class="top-aligned-row context-row">
|
146
|
-
<td class="context-item-name">secure</td>
|
147
|
-
<td class="context-item-value"> [RW] </td>
|
148
|
-
<td class="context-item-desc"></td>
|
149
|
-
</tr>
|
150
|
-
<tr class="top-aligned-row context-row">
|
151
|
-
<td class="context-item-name">session</td>
|
152
|
-
<td class="context-item-value"> [RW] </td>
|
153
|
-
<td class="context-item-desc"></td>
|
154
|
-
</tr>
|
155
|
-
<tr class="top-aligned-row context-row">
|
156
|
-
<td class="context-item-name">sigalg</td>
|
157
|
-
<td class="context-item-value"> [RW] </td>
|
158
|
-
<td class="context-item-desc"></td>
|
159
|
-
</tr>
|
160
|
-
<tr class="top-aligned-row context-row">
|
161
|
-
<td class="context-item-name">target</td>
|
162
|
-
<td class="context-item-value"> [RW] </td>
|
163
|
-
<td class="context-item-desc"></td>
|
164
|
-
</tr>
|
165
|
-
<tr class="top-aligned-row context-row">
|
166
|
-
<td class="context-item-name">token</td>
|
167
|
-
<td class="context-item-value"> [RW] </td>
|
168
|
-
<td class="context-item-desc"></td>
|
169
|
-
</tr>
|
170
|
-
</table>
|
171
|
-
</div>
|
172
|
-
</div>
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
<!-- if method_list -->
|
177
|
-
<div id="methods">
|
178
|
-
<h3 class="section-bar">Public Class methods</h3>
|
179
|
-
|
180
|
-
<div id="method-M000004" class="method-detail">
|
181
|
-
<a name="M000004"></a>
|
182
|
-
|
183
|
-
<div class="method-heading">
|
184
|
-
<a href="GoogleAuthSub.src/M000004.html" target="Code" class="method-signature"
|
185
|
-
onclick="popupCode('GoogleAuthSub.src/M000004.html');return false;">
|
186
|
-
<span class="method-name">new</span><span class="method-args">(opts = {})</span>
|
187
|
-
</a>
|
188
|
-
</div>
|
189
|
-
|
190
|
-
<div class="method-description">
|
191
|
-
<p>
|
192
|
-
Create a <a href="GoogleAuthSub.html#M000004">new</a> GoogleAuthsub object
|
193
|
-
Options specified in <tt>opts</tt> consist of:
|
194
|
-
</p>
|
195
|
-
<ul>
|
196
|
-
<li>:next_url - (String) The url to redirect back to once the user has signed
|
197
|
-
in to Google.
|
198
|
-
|
199
|
-
</li>
|
200
|
-
<li>:scope_url - (String) The service from Google that you wish to receive data
|
201
|
-
from with this token.
|
202
|
-
|
203
|
-
</li>
|
204
|
-
<li>:session - (boolean) Whether the token is able to be used to <a
|
205
|
-
href="GoogleAuthSub.html#M000012">get</a> a session token or is just one
|
206
|
-
use.
|
207
|
-
|
208
|
-
</li>
|
209
|
-
<li>:secure - (boolean) Whether the token can be used for sessions.
|
210
|
-
|
211
|
-
</li>
|
212
|
-
<li>:sigalg - (String) Currently not needed, as the Authsub specification only
|
213
|
-
has rsa-sha1.
|
214
|
-
|
215
|
-
</li>
|
216
|
-
</ul>
|
217
|
-
</div>
|
218
|
-
</div>
|
219
|
-
|
220
|
-
<div id="method-M000003" class="method-detail">
|
221
|
-
<a name="M000003"></a>
|
222
|
-
|
223
|
-
<div class="method-heading">
|
224
|
-
<a href="GoogleAuthSub.src/M000003.html" target="Code" class="method-signature"
|
225
|
-
onclick="popupCode('GoogleAuthSub.src/M000003.html');return false;">
|
226
|
-
<span class="method-name">set_private_key</span><span class="method-args">(key)</span>
|
227
|
-
</a>
|
228
|
-
</div>
|
229
|
-
|
230
|
-
<div class="method-description">
|
231
|
-
<p>
|
232
|
-
<tt>key</tt> can be a File, String or OpenSSL::Pkey::RSA Sets the private
|
233
|
-
key to use for secure sessions. This should correspond to the public key
|
234
|
-
sent to Google in the registration process. For registration details see:
|
235
|
-
</p>
|
236
|
-
<pre>
|
237
|
-
http://code.google.com/apis/accounts/docs/RegistrationForWebAppsAuto.html
|
238
|
-
</pre>
|
239
|
-
<p>
|
240
|
-
This sets the class variable @@pkey to an OpenSSL::Pkey::RSA object
|
241
|
-
</p>
|
242
|
-
</div>
|
243
|
-
</div>
|
244
|
-
|
245
|
-
<h3 class="section-bar">Public Instance methods</h3>
|
246
|
-
|
247
|
-
<div id="method-M000017" class="method-detail">
|
248
|
-
<a name="M000017"></a>
|
249
|
-
|
250
|
-
<div class="method-heading">
|
251
|
-
<a href="GoogleAuthSub.src/M000017.html" target="Code" class="method-signature"
|
252
|
-
onclick="popupCode('GoogleAuthSub.src/M000017.html');return false;">
|
253
|
-
<span class="method-name">auth_data</span><span class="method-args">(method,url)</span>
|
254
|
-
</a>
|
255
|
-
</div>
|
256
|
-
|
257
|
-
<div class="method-description">
|
258
|
-
<p>
|
259
|
-
check the <a href="GoogleAuthSub.html#M000017">auth_data</a> section of the
|
260
|
-
header
|
261
|
-
</p>
|
262
|
-
</div>
|
263
|
-
</div>
|
264
|
-
|
265
|
-
<div id="method-M000016" class="method-detail">
|
266
|
-
<a name="M000016"></a>
|
267
|
-
|
268
|
-
<div class="method-heading">
|
269
|
-
<a href="GoogleAuthSub.src/M000016.html" target="Code" class="method-signature"
|
270
|
-
onclick="popupCode('GoogleAuthSub.src/M000016.html');return false;">
|
271
|
-
<span class="method-name">auth_header</span><span class="method-args">(method, url)</span>
|
272
|
-
</a>
|
273
|
-
</div>
|
274
|
-
|
275
|
-
<div class="method-description">
|
276
|
-
<p>
|
277
|
-
<a href="GoogleAuthSub.html#M000016">auth_header</a> Check what
|
278
|
-
authorization header we are sending. method is Net::HTTP::Get or
|
279
|
-
Net::HTTP::Post
|
280
|
-
</p>
|
281
|
-
</div>
|
282
|
-
</div>
|
283
|
-
|
284
|
-
<div id="method-M000015" class="method-detail">
|
285
|
-
<a name="M000015"></a>
|
286
|
-
|
287
|
-
<div class="method-heading">
|
288
|
-
<a href="GoogleAuthSub.src/M000015.html" target="Code" class="method-signature"
|
289
|
-
onclick="popupCode('GoogleAuthSub.src/M000015.html');return false;">
|
290
|
-
<span class="method-name">delete</span><span class="method-args">(url)</span>
|
291
|
-
</a>
|
292
|
-
</div>
|
293
|
-
|
294
|
-
<div class="method-description">
|
295
|
-
<p>
|
296
|
-
<a href="GoogleAuthSub.html#M000015">delete</a> <tt>url</tt> Does a HTTP
|
297
|
-
DELETE request to Google using the AuthSub token. This returns a
|
298
|
-
Net::HTTPResponse object.
|
299
|
-
</p>
|
300
|
-
</div>
|
301
|
-
</div>
|
302
|
-
|
303
|
-
<div id="method-M000012" class="method-detail">
|
304
|
-
<a name="M000012"></a>
|
305
|
-
|
306
|
-
<div class="method-heading">
|
307
|
-
<a href="GoogleAuthSub.src/M000012.html" target="Code" class="method-signature"
|
308
|
-
onclick="popupCode('GoogleAuthSub.src/M000012.html');return false;">
|
309
|
-
<span class="method-name">get</span><span class="method-args">(url)</span>
|
310
|
-
</a>
|
311
|
-
</div>
|
312
|
-
|
313
|
-
<div class="method-description">
|
314
|
-
<p>
|
315
|
-
<a href="GoogleAuthSub.html#M000012">get</a> <tt>url</tt> Does a HTTP GET
|
316
|
-
request to Google using the AuthSub token. This returns a Net::HTTPResponse
|
317
|
-
object.
|
318
|
-
</p>
|
319
|
-
</div>
|
320
|
-
</div>
|
321
|
-
|
322
|
-
<div id="method-M000013" class="method-detail">
|
323
|
-
<a name="M000013"></a>
|
324
|
-
|
325
|
-
<div class="method-heading">
|
326
|
-
<a href="GoogleAuthSub.src/M000013.html" target="Code" class="method-signature"
|
327
|
-
onclick="popupCode('GoogleAuthSub.src/M000013.html');return false;">
|
328
|
-
<span class="method-name">post</span><span class="method-args">(url)</span>
|
329
|
-
</a>
|
330
|
-
</div>
|
331
|
-
|
332
|
-
<div class="method-description">
|
333
|
-
<p>
|
334
|
-
<a href="GoogleAuthSub.html#M000013">post</a> <tt>url</tt> Does a HTTP POST
|
335
|
-
request to Google using the AuthSub token. This returns a Net::HTTPResponse
|
336
|
-
object.
|
337
|
-
</p>
|
338
|
-
</div>
|
339
|
-
</div>
|
340
|
-
|
341
|
-
<div id="method-M000014" class="method-detail">
|
342
|
-
<a name="M000014"></a>
|
343
|
-
|
344
|
-
<div class="method-heading">
|
345
|
-
<a href="GoogleAuthSub.src/M000014.html" target="Code" class="method-signature"
|
346
|
-
onclick="popupCode('GoogleAuthSub.src/M000014.html');return false;">
|
347
|
-
<span class="method-name">put</span><span class="method-args">(url)</span>
|
348
|
-
</a>
|
349
|
-
</div>
|
350
|
-
|
351
|
-
<div class="method-description">
|
352
|
-
<p>
|
353
|
-
<a href="GoogleAuthSub.html#M000014">put</a> <tt>url</tt> Does a HTTP PUT
|
354
|
-
request to Google using the AuthSub token. This returns a Net::HTTPResponse
|
355
|
-
object.
|
356
|
-
</p>
|
357
|
-
</div>
|
358
|
-
</div>
|
359
|
-
|
360
|
-
<div id="method-M000006" class="method-detail">
|
361
|
-
<a name="M000006"></a>
|
362
|
-
|
363
|
-
<div class="method-heading">
|
364
|
-
<a href="GoogleAuthSub.src/M000006.html" target="Code" class="method-signature"
|
365
|
-
onclick="popupCode('GoogleAuthSub.src/M000006.html');return false;">
|
366
|
-
<span class="method-name">receive_token</span><span class="method-args">(url)</span>
|
367
|
-
</a>
|
368
|
-
</div>
|
369
|
-
|
370
|
-
<div class="method-description">
|
371
|
-
<p>
|
372
|
-
<tt>url</tt> :the URL received from Google once the user has signed in.
|
373
|
-
</p>
|
374
|
-
<p>
|
375
|
-
This method extracts the token from the request url that Google sends the
|
376
|
-
user back to. This url will be like: <a
|
377
|
-
href="http://www.example.com/next?Token=CMDshfjfkeodf">www.example.com/next?Token=CMDshfjfkeodf</a>
|
378
|
-
In Rails applications you don‘t need this method, just use
|
379
|
-
+GoogleAuthsub#token=params[:token]+
|
380
|
-
</p>
|
381
|
-
</div>
|
382
|
-
</div>
|
383
|
-
|
384
|
-
<div id="method-M000005" class="method-detail">
|
385
|
-
<a name="M000005"></a>
|
386
|
-
|
387
|
-
<div class="method-heading">
|
388
|
-
<a href="GoogleAuthSub.src/M000005.html" target="Code" class="method-signature"
|
389
|
-
onclick="popupCode('GoogleAuthSub.src/M000005.html');return false;">
|
390
|
-
<span class="method-name">request_url</span><span class="method-args">()</span>
|
391
|
-
</a>
|
392
|
-
</div>
|
393
|
-
|
394
|
-
<div class="method-description">
|
395
|
-
<p>
|
396
|
-
This returns a URI::HTTPS object which contains the Google url to request a
|
397
|
-
token from.
|
398
|
-
</p>
|
399
|
-
</div>
|
400
|
-
</div>
|
401
|
-
|
402
|
-
<div id="method-M000010" class="method-detail">
|
403
|
-
<a name="M000010"></a>
|
404
|
-
|
405
|
-
<div class="method-heading">
|
406
|
-
<a href="GoogleAuthSub.src/M000010.html" target="Code" class="method-signature"
|
407
|
-
onclick="popupCode('GoogleAuthSub.src/M000010.html');return false;">
|
408
|
-
<span class="method-name">revoke_token</span><span class="method-args">()</span>
|
409
|
-
</a>
|
410
|
-
</div>
|
411
|
-
|
412
|
-
<div class="method-description">
|
413
|
-
<p>
|
414
|
-
<a href="GoogleAuthSub.html#M000010">revoke_token</a> This revokes either a
|
415
|
-
single use or session token The token will not be able to be used again if
|
416
|
-
this call is successful. It returns true on sucess, false on failure.
|
417
|
-
</p>
|
418
|
-
</div>
|
419
|
-
</div>
|
420
|
-
|
421
|
-
<div id="method-M000008" class="method-detail">
|
422
|
-
<a name="M000008"></a>
|
423
|
-
|
424
|
-
<div class="method-heading">
|
425
|
-
<a href="GoogleAuthSub.src/M000008.html" target="Code" class="method-signature"
|
426
|
-
onclick="popupCode('GoogleAuthSub.src/M000008.html');return false;">
|
427
|
-
<span class="method-name">secure_token?</span><span class="method-args">()</span>
|
428
|
-
</a>
|
429
|
-
</div>
|
430
|
-
|
431
|
-
<div class="method-description">
|
432
|
-
<p>
|
433
|
-
Returns true if the token is used for secure sessions
|
434
|
-
</p>
|
435
|
-
</div>
|
436
|
-
</div>
|
437
|
-
|
438
|
-
<div id="method-M000009" class="method-detail">
|
439
|
-
<a name="M000009"></a>
|
440
|
-
|
441
|
-
<div class="method-heading">
|
442
|
-
<a href="GoogleAuthSub.src/M000009.html" target="Code" class="method-signature"
|
443
|
-
onclick="popupCode('GoogleAuthSub.src/M000009.html');return false;">
|
444
|
-
<span class="method-name">session_token</span><span class="method-args">()</span>
|
445
|
-
</a>
|
446
|
-
</div>
|
447
|
-
|
448
|
-
<div class="method-description">
|
449
|
-
<p>
|
450
|
-
<a href="GoogleAuthSub.html#M000009">session_token</a> This method
|
451
|
-
exchanges a previously received single use token with a session token.
|
452
|
-
Raises error if an invalid response is received.
|
453
|
-
</p>
|
454
|
-
</div>
|
455
|
-
</div>
|
456
|
-
|
457
|
-
<div id="method-M000007" class="method-detail">
|
458
|
-
<a name="M000007"></a>
|
459
|
-
|
460
|
-
<div class="method-heading">
|
461
|
-
<a href="GoogleAuthSub.src/M000007.html" target="Code" class="method-signature"
|
462
|
-
onclick="popupCode('GoogleAuthSub.src/M000007.html');return false;">
|
463
|
-
<span class="method-name">session_token?</span><span class="method-args">()</span>
|
464
|
-
</a>
|
465
|
-
</div>
|
466
|
-
|
467
|
-
<div class="method-description">
|
468
|
-
<p>
|
469
|
-
Returns true if this token can be exchanged for a session token
|
470
|
-
</p>
|
471
|
-
</div>
|
472
|
-
</div>
|
473
|
-
|
474
|
-
<div id="method-M000018" class="method-detail">
|
475
|
-
<a name="M000018"></a>
|
476
|
-
|
477
|
-
<div class="method-heading">
|
478
|
-
<a href="GoogleAuthSub.src/M000018.html" target="Code" class="method-signature"
|
479
|
-
onclick="popupCode('GoogleAuthSub.src/M000018.html');return false;">
|
480
|
-
<span class="method-name">sig</span><span class="method-args">(header)</span>
|
481
|
-
</a>
|
482
|
-
</div>
|
483
|
-
|
484
|
-
<div class="method-description">
|
485
|
-
<p>
|
486
|
-
extract signature from header
|
487
|
-
</p>
|
488
|
-
</div>
|
489
|
-
</div>
|
490
|
-
|
491
|
-
<div id="method-M000011" class="method-detail">
|
492
|
-
<a name="M000011"></a>
|
493
|
-
|
494
|
-
<div class="method-heading">
|
495
|
-
<a href="GoogleAuthSub.src/M000011.html" target="Code" class="method-signature"
|
496
|
-
onclick="popupCode('GoogleAuthSub.src/M000011.html');return false;">
|
497
|
-
<span class="method-name">token_info</span><span class="method-args">()</span>
|
498
|
-
</a>
|
499
|
-
</div>
|
500
|
-
|
501
|
-
<div class="method-description">
|
502
|
-
<p>
|
503
|
-
<a href="GoogleAuthSub.html#M000011">token_info</a> Returns the information
|
504
|
-
for the session token from Google. Returns a map {:target, :scope, :secure}
|
505
|
-
</p>
|
506
|
-
</div>
|
507
|
-
</div>
|
508
|
-
|
509
|
-
|
510
|
-
</div>
|
511
|
-
|
512
|
-
|
513
|
-
</div>
|
514
|
-
|
515
|
-
|
516
|
-
<div id="validator-badges">
|
517
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
518
|
-
</div>
|
519
|
-
|
520
|
-
</body>
|
521
|
-
</html>
|
@@ -1,29 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>set_private_key (GData::GoogleAuthSub)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File googleauthsub.rb, line 52</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">set_private_key</span>(<span class="ruby-identifier">key</span>)
|
15
|
-
<span class="ruby-keyword kw">case</span> <span class="ruby-identifier">key</span>
|
16
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-constant">OpenSSL</span><span class="ruby-operator">::</span><span class="ruby-constant">PKey</span><span class="ruby-operator">::</span><span class="ruby-constant">RSA</span>
|
17
|
-
<span class="ruby-ivar">@@pkey</span> = <span class="ruby-identifier">key</span>
|
18
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-constant">File</span>
|
19
|
-
<span class="ruby-comment cmt"># Read key from a PEM file.</span>
|
20
|
-
<span class="ruby-ivar">@@pkey</span> = <span class="ruby-constant">OpenSSL</span><span class="ruby-operator">::</span><span class="ruby-constant">PKey</span><span class="ruby-operator">::</span><span class="ruby-constant">RSA</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">key</span>.<span class="ruby-identifier">read</span>)
|
21
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-constant">String</span>
|
22
|
-
<span class="ruby-comment cmt"># Get key from a PEM in the form of a string.</span>
|
23
|
-
<span class="ruby-ivar">@@pkey</span> = <span class="ruby-constant">OpenSSL</span><span class="ruby-operator">::</span><span class="ruby-constant">PKey</span><span class="ruby-operator">::</span><span class="ruby-constant">RSA</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">key</span>)
|
24
|
-
<span class="ruby-keyword kw">else</span>
|
25
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-node">"Private Key in wrong format. Require IO, String or OpenSSL::Pkey::RSA, got #{key.class}"</span>
|
26
|
-
<span class="ruby-keyword kw">end</span>
|
27
|
-
<span class="ruby-keyword kw">end</span></pre>
|
28
|
-
</body>
|
29
|
-
</html>
|
@@ -1,22 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>new (GData::GoogleAuthSub)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File googleauthsub.rb, line 75</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">opts</span> = {})
|
15
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">next_url</span> = <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:next_url</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">''</span>
|
16
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">scope</span> = <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:scope_url</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">''</span>
|
17
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">session</span> = <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:session</span>] <span class="ruby-operator">||</span> <span class="ruby-keyword kw">false</span>
|
18
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">secure</span> = <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:secure</span>] <span class="ruby-operator">||</span> <span class="ruby-keyword kw">false</span>
|
19
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">sigalg</span> = <span class="ruby-value str">"rsa-sha1"</span>
|
20
|
-
<span class="ruby-keyword kw">end</span></pre>
|
21
|
-
</body>
|
22
|
-
</html>
|
@@ -1,29 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>set_private_key (GData::GoogleAuthSub)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/googleauthsub.rb, line 63</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">set_private_key</span>(<span class="ruby-identifier">key</span>)
|
15
|
-
<span class="ruby-keyword kw">case</span> <span class="ruby-identifier">key</span>
|
16
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-constant">OpenSSL</span><span class="ruby-operator">::</span><span class="ruby-constant">PKey</span><span class="ruby-operator">::</span><span class="ruby-constant">RSA</span>
|
17
|
-
<span class="ruby-ivar">@@pkey</span> = <span class="ruby-identifier">key</span>
|
18
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-constant">File</span>
|
19
|
-
<span class="ruby-comment cmt"># Read key from a PEM file.</span>
|
20
|
-
<span class="ruby-ivar">@@pkey</span> = <span class="ruby-constant">OpenSSL</span><span class="ruby-operator">::</span><span class="ruby-constant">PKey</span><span class="ruby-operator">::</span><span class="ruby-constant">RSA</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">key</span>.<span class="ruby-identifier">read</span>)
|
21
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-constant">String</span>
|
22
|
-
<span class="ruby-comment cmt"># Get key from a PEM in the form of a string.</span>
|
23
|
-
<span class="ruby-ivar">@@pkey</span> = <span class="ruby-constant">OpenSSL</span><span class="ruby-operator">::</span><span class="ruby-constant">PKey</span><span class="ruby-operator">::</span><span class="ruby-constant">RSA</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">key</span>)
|
24
|
-
<span class="ruby-keyword kw">else</span>
|
25
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-constant">AuthSubError</span>, <span class="ruby-node">"Private Key in wrong format. Require IO, String or OpenSSL::Pkey::RSA, got #{key.class}"</span>
|
26
|
-
<span class="ruby-keyword kw">end</span>
|
27
|
-
<span class="ruby-keyword kw">end</span></pre>
|
28
|
-
</body>
|
29
|
-
</html>
|
@@ -1,22 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>new (GData::GoogleAuthSub)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/googleauthsub.rb, line 86</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">opts</span> = {})
|
15
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">next_url</span> = <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:next_url</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">''</span>
|
16
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">scope</span> = <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:scope_url</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">''</span>
|
17
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">session</span> = <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:session</span>] <span class="ruby-operator">||</span> <span class="ruby-keyword kw">false</span>
|
18
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">secure</span> = <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:secure</span>] <span class="ruby-operator">||</span> <span class="ruby-keyword kw">false</span>
|
19
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">sigalg</span> = <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:sigalg</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">"rsa-sha1"</span>
|
20
|
-
<span class="ruby-keyword kw">end</span></pre>
|
21
|
-
</body>
|
22
|
-
</html>
|