ruby-openid 1.1.2 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of ruby-openid might be problematic. Click here for more details.
- data/lib/openid/consumer.rb +14 -6
- data/lib/openid/trustroot.rb +2 -1
- data/test/data/brianellin.mylid.xrds +42 -0
- metadata +3 -2
data/lib/openid/consumer.rb
CHANGED
@@ -352,16 +352,24 @@ module OpenID
|
|
352
352
|
resp = @consumer.complete(query, service)
|
353
353
|
end
|
354
354
|
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
355
|
+
# If the response has an non-nil identity_url attribute,
|
356
|
+
# then we can get te discovery object and finalize the request.
|
357
|
+
# Otherwise it is a failure or replay, and we set the response
|
358
|
+
# servce to nil.
|
359
|
+
if resp.identity_url
|
360
|
+
disco = self.get_discovery(resp.identity_url)
|
361
|
+
if [SUCCESS, CANCEL].member?(resp.status)
|
362
|
+
if resp.identity_url
|
363
|
+
resp.service = disco.finish
|
364
|
+
end
|
365
|
+
else
|
366
|
+
resp.service = disco.current
|
360
367
|
end
|
361
368
|
else
|
362
|
-
resp.service =
|
369
|
+
resp.service = nil
|
363
370
|
end
|
364
371
|
|
372
|
+
|
365
373
|
# want to delete service unless status is SETUP_NEEDED,
|
366
374
|
# because we still need the service info when the user returns from
|
367
375
|
# the server
|
data/lib/openid/trustroot.rb
CHANGED
@@ -0,0 +1,42 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<XRDS xmlns="xri://$xrds" xmlns:xrd="xri://$xrd*($v*2.0)">
|
3
|
+
<xrd:XRD>
|
4
|
+
<xrd:Service priority="1">
|
5
|
+
<xrd:Type>http://lid.netmesh.org/minimum-lid/2.0b9</xrd:Type>
|
6
|
+
<xrd:URI>http://mylid.net/brianellin</xrd:URI>
|
7
|
+
</xrd:Service>
|
8
|
+
<xrd:Service priority="2">
|
9
|
+
<xrd:Type>http://lid.netmesh.org/sso/2.0b9</xrd:Type>
|
10
|
+
<xrd:URI>http://mylid.net/brianellin</xrd:URI>
|
11
|
+
</xrd:Service>
|
12
|
+
<xrd:Service priority="3">
|
13
|
+
<xrd:Type>http://lid.netmesh.org/sso/1.0</xrd:Type>
|
14
|
+
<xrd:URI>http://mylid.net/brianellin</xrd:URI>
|
15
|
+
</xrd:Service>
|
16
|
+
<xrd:Service priority="4">
|
17
|
+
<xrd:Type>http://lid.netmesh.org/relying-party/2.0b9</xrd:Type>
|
18
|
+
<xrd:URI>http://mylid.net/brianellin</xrd:URI>
|
19
|
+
</xrd:Service>
|
20
|
+
<xrd:Service priority="5">
|
21
|
+
<xrd:Type>http://lid.netmesh.org/traversal/2.0b9</xrd:Type>
|
22
|
+
<xrd:URI>http://mylid.net/brianellin</xrd:URI>
|
23
|
+
</xrd:Service>
|
24
|
+
<xrd:Service priority="6">
|
25
|
+
<xrd:Type>http://lid.netmesh.org/format-negotiation/2.0b9</xrd:Type>
|
26
|
+
<xrd:URI>http://mylid.net/brianellin</xrd:URI>
|
27
|
+
</xrd:Service>
|
28
|
+
<xrd:Service priority="7">
|
29
|
+
<xrd:Type>http://lid.netmesh.org/post/sender/2.0b9</xrd:Type>
|
30
|
+
<xrd:URI>http://mylid.net/brianellin</xrd:URI>
|
31
|
+
</xrd:Service>
|
32
|
+
<xrd:Service priority="8">
|
33
|
+
<xrd:Type>http://lid.netmesh.org/post/receiver/2.0b9</xrd:Type>
|
34
|
+
<xrd:URI>http://mylid.net/brianellin</xrd:URI>
|
35
|
+
</xrd:Service>
|
36
|
+
<xrd:Service priority="9">
|
37
|
+
<xrd:Type>http://openid.net/signon/1.0</xrd:Type>
|
38
|
+
<xrd:URI>http://mylid.net/brianellin</xrd:URI>
|
39
|
+
<openid:Delegate xmlns:openid="http://openid.net/xmlns/1.0">http://mylid.net/brianellin</openid:Delegate>
|
40
|
+
</xrd:Service>
|
41
|
+
</xrd:XRD>
|
42
|
+
</XRDS>
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.11
|
|
3
3
|
specification_version: 1
|
4
4
|
name: ruby-openid
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 1.1.
|
7
|
-
date: 2006-
|
6
|
+
version: 1.1.3
|
7
|
+
date: 2006-09-20 00:00:00 -07:00
|
8
8
|
summary: A library for consuming and serving OpenID identities.
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -177,6 +177,7 @@ files:
|
|
177
177
|
- test/urinorm.rb
|
178
178
|
- test/data/urinorm.txt
|
179
179
|
- test/data/brian.xrds
|
180
|
+
- test/data/brianellin.mylid.xrds
|
180
181
|
- README
|
181
182
|
- INSTALL
|
182
183
|
- COPYING
|