ruby-openid 1.1.2 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of ruby-openid might be problematic. Click here for more details.

@@ -352,16 +352,24 @@ module OpenID
352
352
  resp = @consumer.complete(query, service)
353
353
  end
354
354
 
355
- disco = self.get_discovery(resp.identity_url)
356
-
357
- if [SUCCESS, CANCEL].member?(resp.status)
358
- if resp.identity_url
359
- resp.service = disco.finish
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 = disco.current
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
@@ -19,8 +19,9 @@ module OpenID
19
19
  end
20
20
 
21
21
  def TrustRoot.parse(trust_root)
22
- return nil unless trust_root.instance_of?(String)
22
+ return nil unless trust_root.instance_of?(String)
23
23
 
24
+ trust_root = trust_root.dup
24
25
  unparsed = trust_root.dup
25
26
 
26
27
  # look for wildcard
@@ -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.2
7
- date: 2006-08-23 00:00:00 -07:00
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