ruby-openid 2.0.2 → 2.0.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.

data/CHANGELOG CHANGED
@@ -1,215 +1,60 @@
1
- Mon Jan 23 12:48:00 PST 2006 brian@janrain.com
2
- * fixed bug in expiresIn. added expired? method
1
+ Fri Jan 11 11:31:29 PST 2008 cygnus@janrain.com
2
+ tagged 2.0.3
3
3
 
4
- M ./lib/openid/filestore.rb -1 +1
5
- M ./lib/openid/stores.rb +4
4
+ Fri Jan 11 11:29:57 PST 2008 cygnus@janrain.com
5
+ * Set version to 2.0.3
6
6
 
7
- Mon Jan 23 12:46:37 PST 2006 brian@janrain.com
8
- * removed deps section from INSTALL file. deps are now included in lib because they are so small and to lower to bar of installing the library.
7
+ Thu Jan 10 15:23:31 PST 2008 Kevin Turner <kevin@janrain.com>
8
+ * UPGRADE: formatting
9
9
 
10
- M ./INSTALL -9
11
-
12
- Tue Jan 17 14:45:57 PST 2006 brian@janrain.com
13
- * added better handling of non-URL input
14
-
15
- M ./lib/openid/consumer.rb -1 +5
16
-
17
- Sat Jan 14 19:39:57 PST 2006 brian@janrain.com
18
- * added html and hmac deps into lib since they are so small
19
-
20
- A ./lib/hmac-md5.rb
21
- A ./lib/hmac-rmd160.rb
22
- A ./lib/hmac-sha1.rb
23
- A ./lib/hmac-sha2.rb
24
- A ./lib/hmac.rb
25
- A ./lib/html/
26
- A ./lib/html/htmltokenizer.rb
27
-
28
- Mon Jan 16 15:04:05 PST 2006 Josh Hoyt <josh@janrain.com>
29
- * Add script that will prepare the repository for release
30
-
31
- A ./admin/fixperms
32
- A ./admin/prepare-release
33
-
34
- Mon Jan 16 14:35:27 PST 2006 Josh Hoyt <josh@janrain.com>
35
- * Add custom boring file
36
-
37
- A ./admin/darcs-ignore
38
-
39
- Mon Jan 16 14:07:13 PST 2006 Josh Hoyt <josh@janrain.com>
40
- * Put the build-docs script into the admin directory
41
-
42
- ./build-docs -> ./admin/build-docs
43
- A ./admin/
44
-
45
- Mon Jan 16 14:05:47 PST 2006 Josh Hoyt <josh@janrain.com>
46
- * Add script to build documentation
47
-
48
- A ./build-docs
49
-
50
- Wed Jan 4 16:06:41 PST 2006 brian@janrain.com
51
- tagged ruby-openid-0.9.2
52
-
53
-
54
- Wed Jan 4 16:02:32 PST 2006 brian@janrain.com
55
- * added openid_login_generator rails generator to examples
56
-
57
- A ./examples/openid_login_generator/
58
- A ./examples/openid_login_generator/USAGE
59
- A ./examples/openid_login_generator/openid_login_generator.rb
60
- A ./examples/openid_login_generator/templates/
61
- A ./examples/openid_login_generator/templates/README
62
- A ./examples/openid_login_generator/templates/controller.rb
63
- A ./examples/openid_login_generator/templates/helper.rb
64
- A ./examples/openid_login_generator/templates/login_system.rb
65
- A ./examples/openid_login_generator/templates/user.rb
66
- A ./examples/openid_login_generator/templates/view_login.rhtml
67
- A ./examples/openid_login_generator/templates/view_logout.rhtml
68
- A ./examples/openid_login_generator/templates/view_signup.rhtml
69
- A ./examples/openid_login_generator/templates/view_welcome.rhtml
70
-
71
- Wed Jan 4 16:01:12 PST 2006 brian@janrain.com
72
- * updated examples README to include openid_login_generator
73
-
74
- M ./examples/README +11
75
-
76
- Wed Jan 4 14:58:24 PST 2006 brian@janrain.com
77
- * added link to ruby library from consumer.rb example
78
-
79
- M ./examples/consumer.rb -1 +1
80
-
81
- Wed Jan 4 10:56:45 PST 2006 brian@janrain.com
82
- * ensure Content-type header is present for POSTs
83
-
84
- M ./lib/openid/fetchers.rb -1 +2
85
-
86
- Fri Dec 30 17:05:25 PST 2005 brian@janrain.com
87
- tagged ruby-openid-0.9.1
88
-
89
-
90
- Fri Dec 30 17:03:54 PST 2005 brian@janrain.com
91
- * added Ruby on Rails example consumer
92
-
93
- M ./examples/README -1 +14
94
- A ./examples/openid_rails.tar.gz
95
-
96
- Thu Dec 29 16:00:20 PST 2005 brian@janrain.com
97
- tagged ruby-openid-0.9.0
98
-
99
-
100
- Thu Dec 29 15:43:07 PST 2005 brian@janrain.com
101
- * removed docs directory. generated rdoc html will be added manually to tarballs, and not be kept in repository
102
-
103
- R ./docs/
104
- R ./docs/README
105
-
106
- Thu Dec 29 15:21:21 PST 2005 brian@janrain.com
107
- * added more docs for stores
108
-
109
- M ./TODO -2 +4
110
- M ./lib/openid/filestore.rb -16 +3
111
- M ./lib/openid/stores.rb -9 +1
112
-
113
- Thu Dec 29 14:58:52 PST 2005 brian@janrain.com
114
- * Huge documentation patch
115
-
116
- M ./INSTALL -12 +22
117
- M ./README -1 +1
118
- M ./lib/openid/consumer.rb -24 +370
119
- M ./lib/openid/fetchers.rb -2 +1
120
- M ./lib/openid/filestore.rb -6 +4
121
- M ./lib/openid/stores.rb -2 +1
122
-
123
- Thu Dec 29 10:59:54 PST 2005 brian@janrain.com
124
- * added more info and rdoc formatting to README
125
-
126
- M ./README -10 +26
127
-
128
- Thu Dec 29 09:45:51 PST 2005 brian@janrain.com
129
- * fixed bad comment
130
-
131
- M ./examples/consumer.rb -1 +1
132
-
133
- Wed Dec 28 17:59:48 PST 2005 brian@janrain.com
134
- * added platform agnositc temp dir discovery
135
-
136
- M ./examples/consumer.rb -1 +5
137
-
138
- Wed Dec 28 17:13:21 PST 2005 brian@janrain.com
139
- * moved getOpenIDParamerters to util
140
-
141
- M ./lib/openid/consumer.rb -10 +2
142
- M ./lib/openid/util.rb +8
10
+ Thu Jan 10 15:18:17 PST 2008 Kevin Turner <kevin@janrain.com>
11
+ * Consumer.Response: documentation for identity_url and display_identifier
12
+
13
+ Too bad that rdoc doesn't automatically display this in the documentation for
14
+ SuccessResponse; you have to follow the link to the Response docs.
143
15
 
144
- Wed Dec 28 15:47:51 PST 2005 brian@janrain.com
145
- * code cleanup
16
+ Tue Jan 8 16:14:56 PST 2008 Kevin Turner <kevin@janrain.com>
17
+ * examples/discover: correct namespace of DiscoveryFailure
146
18
 
147
- M ./lib/openid/consumer.rb -5
19
+ Thu Jan 10 10:15:04 PST 2008 cygnus@janrain.com
20
+ * Catch HTTPStatusError when making KV post in association manager
148
21
 
149
- Wed Dec 28 15:29:31 PST 2005 brian@janrain.com
150
- * added linkparse to test suite script
22
+ Wed Jan 9 17:39:53 PST 2008 cygnus@janrain.com
23
+ * Fix FetchRequest.ns_uri
151
24
 
152
- M ./test/runtests -1 +1
25
+ Wed Jan 9 17:02:49 PST 2008 cygnus@janrain.com
26
+ * Fix FetchResponse.from_success_response, assign correct NS_URI value for AX messages
153
27
 
154
- Wed Dec 28 15:29:07 PST 2005 brian@janrain.com
155
- * added link parsing tests, lots of em
28
+ Tue Jan 8 15:46:43 PST 2008 Kevin Turner <kevin@janrain.com>
29
+ * examples/rails_openid/app/controllers: render_text was deprecated, use render :text.
156
30
 
157
- A ./test/linkparse.rb
31
+ Tue Jan 8 13:56:39 PST 2008 Kevin Turner <kevin@janrain.com>
32
+ * Yadis.discover: add more information to exception messages.
158
33
 
159
- Wed Dec 28 15:28:07 PST 2005 brian@janrain.com
160
- * link parsing more robust: handle non-html data, and make sure link tag is in head
34
+ Mon Jan 7 18:48:50 PST 2008 Kevin Turner <kevin@janrain.com>
35
+ * OpenIDServiceEndpoint.display_identifier: leave off the fragment from claimed_id. [#99]
161
36
 
162
- M ./lib/openid/parse.rb -5 +13
37
+ Tue Jan 8 09:32:27 PST 2008 http://j3h.us/
38
+ * MalformedTrustRoot raised by the library now gets passed the OpenID Message object instead of nil
163
39
 
164
- Tue Dec 27 16:11:09 PST 2005 brian@janrain.com
165
- * added more tests for openid/util
40
+ Fri Dec 21 15:05:32 PST 2007 http://j3h.us/
41
+ * whitespace
166
42
 
167
- M ./test/dh.rb -2 +1
168
- M ./test/runtests +1
169
- A ./test/util.rb
43
+ Mon Jan 7 17:40:45 PST 2008 Kevin Turner <kevin@janrain.com>
44
+ * Yadis: remove mkXRDTag, mkXRDSTag. These don't seem to make as much sense with REXML as they did with ElementTree.
170
45
 
171
- Tue Dec 27 16:10:28 PST 2005 brian@janrain.com
172
- * change util methods to use all use /dev/urandom if available
46
+ Mon Jan 7 17:33:41 PST 2008 Kevin Turner <kevin@janrain.com>
47
+ * remove comment applicable to Python
173
48
 
174
- M ./lib/openid/util.rb -15 +35
49
+ Mon Jan 7 17:00:17 PST 2008 Kevin Turner <kevin@janrain.com>
50
+ * test_xrds: add test for Yadis.get_canonical_id with subsegments [#93]
175
51
 
176
- Tue Dec 27 16:09:53 PST 2005 brian@janrain.com
177
- * changed tmp pathname to something more useful
52
+ Fri Dec 28 16:25:19 PST 2007 Kevin Turner <kevin@janrain.com>
53
+ * Yadis::get_canonical_id: fixes for delegated xris [#93]
54
+ patch contributed by =masaki
178
55
 
179
- M ./examples/consumer.rb -1 +1
56
+ Thu Jan 3 14:46:44 PST 2008 Kevin Turner <kevin@janrain.com>
57
+ * examples/discover: correct fetcher_use_env_http_proxy
180
58
 
181
- Fri Dec 16 09:04:59 PST 2005 Josh Hoyt <josh@janrain.com>
182
- * Removed (now obsolete) interface.rb
183
-
184
- This has been subsumed by consumer.rb
185
-
186
- R ./lib/openid/interface.rb
187
-
188
- Thu Dec 15 18:25:04 PST 2005 brian@janrain.com
189
- * initial checkin
190
-
191
- A ./COPYING
192
- A ./INSTALL
193
- A ./README
194
- A ./TODO
195
- A ./docs/
196
- A ./docs/README
197
- A ./examples/
198
- A ./examples/README
199
- A ./examples/consumer.rb
200
- A ./lib/
201
- A ./lib/openid/
202
- A ./lib/openid/consumer.rb
203
- A ./lib/openid/dh.rb
204
- A ./lib/openid/fetchers.rb
205
- A ./lib/openid/filestore.rb
206
- A ./lib/openid/interface.rb
207
- A ./lib/openid/parse.rb
208
- A ./lib/openid/stores.rb
209
- A ./lib/openid/util.rb
210
- A ./setup.rb
211
- A ./test/
212
- A ./test/assoc.rb
213
- A ./test/dh.rb
214
- A ./test/runtests
215
- A ./test/teststore.rb
59
+ Fri Dec 21 20:44:22 PST 2007 Kevin Turner <kevin@janrain.com>
60
+ tagged 2.0.2
data/UPGRADE CHANGED
@@ -1,12 +1,13 @@
1
- == Upgrading from the OpenID 1.x series library
1
+ = Upgrading from the OpenID 1.x series library
2
2
 
3
- = Consumer Upgrade
3
+ == Consumer Upgrade
4
4
 
5
5
  The flow is largely the same, however there are a number of significant
6
6
  changes. The consumer example is helpful to look at:
7
7
  examples/ruby_openid/app/controllers/consumer_controller.rb
8
8
 
9
- + Stores
9
+
10
+ === Stores
10
11
 
11
12
  You will need to require the file for the store that you are using.
12
13
  For the filesystem store, this is 'openid/stores/filesystem'
@@ -22,7 +23,7 @@ Also, note that the stores now can be garbage collected with the method
22
23
  store.cleanup
23
24
 
24
25
 
25
- + Starting the OpenID transaction
26
+ === Starting the OpenID transaction
26
27
 
27
28
  The OpenIDRequest object no longer has status codes. Instead,
28
29
  consumer.begin raises an OpenID::OpenIDError if there is a problem
@@ -56,7 +57,8 @@ additional arguments to the return_to url, use
56
57
  Generating the redirect is the same as before, but add any extensions
57
58
  first.
58
59
 
59
- + Requesting Simple Registration Data
60
+
61
+ === Requesting Simple Registration Data
60
62
 
61
63
  You'll need to require the code for the extension
62
64
  require 'openid/extensions/sreg'
@@ -74,7 +76,8 @@ Exchange (AX) and Provider Authentication Policy Extension (PAPE) are
74
76
  included with the library, and additional extensions can be implemented
75
77
  subclassing OpenID::Extension.
76
78
 
77
- + Completing the transaction
79
+
80
+ === Completing the transaction
78
81
 
79
82
  The return_to and its arguments are verified, so you need to pass in
80
83
  the base URL and the arguments. With Rails, the params method mashes
@@ -102,7 +105,9 @@ with
102
105
  nickname = sreg_response['nickname']
103
106
  # etc.
104
107
 
108
+
105
109
  == Server Upgrade
110
+
106
111
  The server code is mostly the same as before, with the exception of
107
112
  extensions. Also, you must pass in the endpoint URL to the server
108
113
  constructor:
@@ -2,7 +2,7 @@
2
2
  require "openid/consumer/discovery"
3
3
  require 'openid/fetchers'
4
4
 
5
- OpenID::fetcher_use_env_proxy
5
+ OpenID::fetcher_use_env_http_proxy
6
6
 
7
7
  $names = [[:server_url, "Server URL "],
8
8
  [:local_id, "Local ID "],
@@ -40,7 +40,7 @@ ARGV.each do |openid_identifier|
40
40
  puts "Running discovery on #{openid_identifier}"
41
41
  begin
42
42
  normalized_identifier, services = OpenID.discover(openid_identifier)
43
- rescue OpenID::Yadis::DiscoveryFailure => why
43
+ rescue OpenID::DiscoveryFailure => why
44
44
  puts "Discovery failed: #{why.message}"
45
45
  puts
46
46
  else
@@ -23,13 +23,13 @@ class ServerController < ApplicationController
23
23
  oidreq = server.decode_request(params)
24
24
  rescue ProtocolError => e
25
25
  # invalid openid request, so just display a page with an error message
26
- render_text e.to_s
26
+ render :text => e.to_s, :status => 500
27
27
  return
28
28
  end
29
29
 
30
30
  # no openid.mode was given
31
31
  unless oidreq
32
- render_text "This is an OpenID server endpoint."
32
+ render :text => "This is an OpenID server endpoint."
33
33
  return
34
34
  end
35
35
 
@@ -114,7 +114,7 @@ EOS
114
114
  # Also add the Yadis location header, so that they don't have
115
115
  # to parse the html unless absolutely necessary.
116
116
  response.headers['X-XRDS-Location'] = xrds_url
117
- render_text identity_page
117
+ render :text => identity_page
118
118
  end
119
119
 
120
120
  def user_xrds
@@ -214,7 +214,7 @@ EOS
214
214
  EOS
215
215
 
216
216
  response.headers['content-type'] = 'application/xrds+xml'
217
- render_text yadis
217
+ render :text => yadis
218
218
  end
219
219
 
220
220
  def add_sreg(oidreq, oidresp)
@@ -187,10 +187,12 @@ module OpenID
187
187
  def request_association(assoc_type, session_type)
188
188
  assoc_session, args = create_associate_request(assoc_type, session_type)
189
189
 
190
- response = OpenID.make_kv_post(args, @server_url)
191
-
192
190
  begin
191
+ response = OpenID.make_kv_post(args, @server_url)
193
192
  return extract_association(response, assoc_session)
193
+ rescue HTTPStatusError => why
194
+ Util.log("Got HTTP status error when requesting association: #{why}")
195
+ return nil
194
196
  rescue Message::KeyNotFound => why
195
197
  Util.log("Missing required parameter in response from "\
196
198
  "#{@server_url}: #{why}")
@@ -13,7 +13,7 @@ module OpenID
13
13
  # server. It also has serialization options that let you encode
14
14
  # the authentication request as a URL or as a form POST.
15
15
  class CheckIDRequest
16
- attr_accessor :return_to_args
16
+ attr_accessor :return_to_args, :message
17
17
  attr_reader :endpoint
18
18
 
19
19
  # Users of this library should not create instances of this
@@ -56,7 +56,13 @@ module OpenID
56
56
  end
57
57
 
58
58
  def display_identifier
59
- @display_identifier || @claimed_id
59
+ return @display_identifier if @display_identifier
60
+ return @claimed_id if @claimed_id.nil? or not URI.parse(@claimed_id).fragment
61
+
62
+ disp = URI.parse(@claimed_id)
63
+ disp.fragment = nil
64
+
65
+ return disp.to_s
60
66
  end
61
67
 
62
68
  def display_identifier=(display_identifier)
@@ -114,11 +120,6 @@ module OpenID
114
120
  def get_local_id
115
121
  # Return the identifier that should be sent as the
116
122
  # openid.identity parameter to the server.
117
-
118
- # I looked at this conditional and thought "ah-hah! there's the
119
- # bug!" but Python actually makes that one big expression
120
- # somehow, i.e. "x is x is x" is not the same thing as "(x is
121
- # x) is x". That's pretty weird, dude. -- kmt, 1/07
122
123
  if @local_id.nil? and @canonical_id.nil?
123
124
  return @claimed_id
124
125
  else
@@ -26,10 +26,25 @@ module OpenID
26
26
  self.class::STATUS
27
27
  end
28
28
 
29
+ # The identity URL that has been authenticated; the Claimed Identifier.
30
+ # See also display_identifier.
29
31
  def identity_url
30
32
  @endpoint ? @endpoint.claimed_id : nil
31
33
  end
32
34
 
35
+ # The display identifier is related to the Claimed Identifier, but the
36
+ # two are not always identical. The display identifier is something the
37
+ # user should recognize as what they entered, whereas the response's
38
+ # claimed identifier (in the identity_url attribute) may have extra
39
+ # information for better persistence.
40
+ #
41
+ # URLs will be stripped of their fragments for display. XRIs will
42
+ # display the human-readable identifier (i-name) instead of the
43
+ # persistent identifier (i-number).
44
+ #
45
+ # Use the display identifier in your user interface. Use identity_url
46
+ # for querying your database or authorization server, or other
47
+ # identifier equality comparisons.
33
48
  def display_identifier
34
49
  @endpoint ? @endpoint.display_identifier : nil
35
50
  end
@@ -29,6 +29,7 @@ module OpenID
29
29
  NS_URI = 'http://openid.net/srv/ax/1.0'
30
30
  def initialize
31
31
  @ns_alias = 'ax'
32
+ @ns_uri = NS_URI
32
33
  @mode = nil
33
34
  end
34
35
 
@@ -111,6 +112,7 @@ module OpenID
111
112
  attr_accessor :update_url
112
113
 
113
114
  def initialize(update_url = nil)
115
+ super()
114
116
  @mode = 'fetch_request'
115
117
  @requested_attributes = {}
116
118
  @update_url = update_url
@@ -262,6 +264,7 @@ module OpenID
262
264
  class KeyValueMessage < AXMessage
263
265
  attr_reader :data
264
266
  def initialize
267
+ super()
265
268
  @mode = nil
266
269
  @data = {}
267
270
  @data.default = []
@@ -446,12 +449,19 @@ module OpenID
446
449
  # Construct a FetchResponse object from an OpenID library
447
450
  # SuccessResponse object.
448
451
  def self.from_success_response(success_response, signed=true)
452
+ obj = self.new
449
453
  if signed
450
- ax_args = success_response.get_signed_ns(@ns_uri)
454
+ ax_args = success_response.get_signed_ns(obj.ns_uri)
451
455
  else
452
- ax_args = success_response.message.get_args(@ns_uri)
456
+ ax_args = success_response.message.get_args(obj.ns_uri)
457
+ end
458
+
459
+ begin
460
+ obj.parse_extension_args(ax_args)
461
+ return obj
462
+ rescue Error => e
463
+ return nil
453
464
  end
454
- new.parse_extension_args(ax_args)
455
465
  end
456
466
  end
457
467
 
@@ -576,7 +576,7 @@ module OpenID
576
576
 
577
577
  tr = TrustRoot::TrustRoot.parse(@trust_root)
578
578
  if !tr
579
- raise MalformedTrustRoot.new(nil, @trust_root)
579
+ raise MalformedTrustRoot.new(@message, @trust_root)
580
580
  end
581
581
 
582
582
  if @return_to
@@ -12,7 +12,7 @@ module OpenID
12
12
  class AssertionError < Exception
13
13
  end
14
14
 
15
- VERSION = "2.0.2"
15
+ VERSION = "2.0.3"
16
16
 
17
17
  # Exceptions that are raised by the library are subclasses of this
18
18
  # exception type, so if you want to catch all exceptions raised by
@@ -76,12 +76,12 @@ module OpenID
76
76
  begin
77
77
  resp = OpenID.fetch(uri, nil, {'Accept' => YADIS_ACCEPT_HEADER})
78
78
  rescue Exception
79
- raise DiscoveryFailure.new("Failed to fetch identity URL.",$!)
79
+ raise DiscoveryFailure.new("Failed to fetch identity URL #{uri} : #{$!}", $!)
80
80
  end
81
81
  if resp.code != "200"
82
82
  raise DiscoveryFailure.new(
83
- "HTTP Response status from identity URL host is not \"200\""\
84
- ". Got status #{resp.code.inspect}", resp)
83
+ "HTTP Response status from identity URL host is not \"200\"."\
84
+ "Got status #{resp.code.inspect} for #{resp.final_url}", resp)
85
85
  end
86
86
 
87
87
  # Note the URL after following redirects
@@ -97,12 +97,12 @@ module OpenID
97
97
  begin
98
98
  resp = OpenID.fetch(result.xrds_uri)
99
99
  rescue
100
- raise DiscoveryFailure.new("Failed to fetch Yadis URL.", $!)
100
+ raise DiscoveryFailure.new("Failed to fetch Yadis URL #{result.xrds_uri} : #{$!}", $!)
101
101
  end
102
102
  if resp.code != "200"
103
103
  exc = DiscoveryFailure.new(
104
104
  "HTTP Response status from Yadis host is not \"200\". " +
105
- "Got status #{resp.code.inspect}", resp)
105
+ "Got status #{resp.code.inspect} for #{resp.final_url}", resp)
106
106
  exc.identity_url = result.normalized_uri
107
107
  raise exc
108
108
  end
@@ -2,6 +2,8 @@ require 'rexml/document'
2
2
  require 'rexml/element'
3
3
  require 'rexml/xpath'
4
4
 
5
+ require 'openid/yadis/xri'
6
+
5
7
  module OpenID
6
8
  module Yadis
7
9
 
@@ -65,8 +67,8 @@ module OpenID
65
67
  parent_sought = childID[0...childID.rindex('!')]
66
68
 
67
69
  parent_list = []
68
- xrd.elements.each_element(CANONICALID_TAG) { |c|
69
- XRI.make_xri(c.text)
70
+ xrd.elements.each("CanonicalID") { |c|
71
+ parent_list.push(XRI.make_xri(c.text))
70
72
  }
71
73
 
72
74
  if !parent_list.member?(parent_sought)
@@ -85,21 +87,6 @@ module OpenID
85
87
  return canonicalID
86
88
  end
87
89
 
88
- def Yadis::mkXRDSTag(name)
89
- e = REXML::Element.new('xrds:' + name)
90
- e.add_namespace('xrds', XRDS_NS)
91
- return e
92
- end
93
-
94
- def Yadis::mkXRDTag(name)
95
- e = REXML::Element.new('xrd:' + name)
96
- e.add_namespace('xrd', XRD_NS_2_0)
97
- return e
98
- end
99
-
100
- ROOT_TAG = Yadis::mkXRDSTag('XRDS')
101
- CANONICALID_TAG = mkXRDTag('CanonicalID')
102
-
103
90
  class XRDSError < StandardError
104
91
  end
105
92
 
@@ -124,8 +111,8 @@ module OpenID
124
111
  def Yadis::is_xrds?(xrds_tree)
125
112
  xrds_root = xrds_tree.root
126
113
  return (!xrds_root.nil? and
127
- xrds_root.name == ROOT_TAG.name and
128
- xrds_root.namespace == ROOT_TAG.namespace)
114
+ xrds_root.name == 'XRDS' and
115
+ xrds_root.namespace == XRDS_NS)
129
116
  end
130
117
 
131
118
  def Yadis::get_yadis_xrd(xrds_tree)
@@ -0,0 +1,58 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <XRDS ref="xri://=nishitani*masaki" xmlns="xri://$xrds">
3
+ <XRD xmlns="xri://$xrd*($v*2.0)">
4
+ <Query>*nishitani</Query>
5
+ <Status code="100"/>
6
+ <Expires>2007-12-25T11:33:39.000Z</Expires>
7
+ <ProviderID>xri://=</ProviderID>
8
+ <LocalID priority="10">!E117.EF2F.454B.C707</LocalID>
9
+ <CanonicalID priority="10">=!E117.EF2F.454B.C707</CanonicalID>
10
+ <Service priority="10">
11
+ <Type select="true">http://openid.net/signon/1.0</Type>
12
+ <ProviderID>xri://!!1003!103</ProviderID>
13
+ <URI append="none" priority="1">https://linksafe.ezibroker.net/server/</URI>
14
+ </Service>
15
+ <Service priority="10">
16
+ <Type select="true">xri://$res*auth*($v*2.0)</Type>
17
+ <ProviderID>xri://!!1003!103</ProviderID>
18
+ <MediaType>application/xrds+xml;trust=none</MediaType>
19
+ <URI priority="10">http://resolve.ezibroker.net/resolve/=nishitani/</URI>
20
+ </Service>
21
+ <Service priority="1">
22
+ <Type match="content" select="true">xri://+i-service*(+forwarding)*($v*1.0)</Type>
23
+ <Type match="null" select="false"/>
24
+ <ProviderID>xri://!!1003!103</ProviderID>
25
+ <Path match="content">(+index)</Path>
26
+ <Path match="default"/>
27
+ <URI append="qxri" priority="1">http://linksafe-forward.ezibroker.net/forwarding/</URI>
28
+ </Service>
29
+ </XRD>
30
+ <XRD xmlns="xri://$xrd*($v*2.0)">
31
+ <Query>*masaki</Query>
32
+ <Status code="100">SUCCESS</Status>
33
+ <ProviderID>xri://!!1003</ProviderID>
34
+ <LocalID>!0000.0000.3B9A.CA01</LocalID>
35
+ <CanonicalID>=!E117.EF2F.454B.C707!0000.0000.3B9A.CA01</CanonicalID>
36
+ <Service>
37
+ <Type select="true">http://openid.net/signon/1.0</Type>
38
+ <ProviderID>xri://!!1003!103</ProviderID>
39
+ <URI append="none" priority="1">https://linksafe.ezibroker.net/server/</URI>
40
+ </Service>
41
+ <Service>
42
+ <Type select="true">xri://+i-service*(+contact)*($v*1.0)</Type>
43
+ <Type match="null"/>
44
+ <ProviderID>xri://!!1003!103</ProviderID>
45
+ <Path select="true">(+contact)</Path>
46
+ <Path match="null"/>
47
+ <URI append="authority" priority="1">http://linksafe-contact.ezibroker.net/contact/</URI>
48
+ </Service>
49
+ <Service priority="1">
50
+ <Type match="content" select="true">xri://+i-service*(+forwarding)*($v*1.0)</Type>
51
+ <Type match="null" select="false"/>
52
+ <ProviderID>xri://!!1003!103</ProviderID>
53
+ <Path match="content">(+index)</Path>
54
+ <Path match="default"/>
55
+ <URI append="qxri" priority="1">http://linksafe-forward.ezibroker.net/forwarding/</URI>
56
+ </Service>
57
+ </XRD>
58
+ </XRDS>
@@ -800,6 +800,9 @@ module OpenID
800
800
  end
801
801
 
802
802
  class TestAssocManagerGetAssociation < Test::Unit::TestCase
803
+ include FetcherMixin
804
+ include TestUtil
805
+
803
806
  attr_reader :negotiate_association
804
807
 
805
808
  def setup
@@ -839,6 +842,21 @@ module OpenID
839
842
  @store.store_association(@server_url, @assoc)
840
843
  assert_equal(@assoc, @assoc_manager.get_association)
841
844
  end
845
+
846
+ def test_request_assoc_with_status_error
847
+ fetcher_class = Class.new do
848
+ define_method(:fetch) do |*args|
849
+ MockResponse.new(500, '')
850
+ end
851
+ end
852
+ with_fetcher(fetcher_class.new) do
853
+ assert_log_matches('Got HTTP status error when requesting') {
854
+ result = @assoc_manager.send(:request_association, 'HMAC-SHA1',
855
+ 'no-encryption')
856
+ assert(result.nil?)
857
+ }
858
+ end
859
+ end
842
860
  end
843
861
 
844
862
  class TestAssocManagerRequestAssociation < Test::Unit::TestCase
@@ -1,5 +1,8 @@
1
1
  require 'openid/extensions/ax'
2
2
  require 'openid/message'
3
+ require 'openid/consumer/responses'
4
+ require 'openid/consumer/discovery'
5
+ require 'openid/consumer/checkid_request'
3
6
 
4
7
  module OpenID
5
8
  module AX
@@ -430,6 +433,32 @@ module OpenID
430
433
  assert(fr.is_a?(FetchRequest))
431
434
  end
432
435
 
436
+ def test_add_extension
437
+ openid_req_msg = Message.from_openid_args({
438
+ 'mode' => 'checkid_setup',
439
+ 'ns' => OPENID2_NS,
440
+ 'return_to' => 'http://example.com/realm',
441
+ })
442
+
443
+ e = OpenID::OpenIDServiceEndpoint.new
444
+ openid_req = Consumer::CheckIDRequest.new(nil, e)
445
+ openid_req.message = openid_req_msg
446
+
447
+ fr = FetchRequest.new
448
+ fr.add(AttrInfo.new("urn:bogus"))
449
+
450
+ openid_req.add_extension(fr)
451
+
452
+ expected = {
453
+ 'mode' => 'fetch_request',
454
+ 'if_available' => 'ext0',
455
+ 'type.ext0' => 'urn:bogus',
456
+ }
457
+
458
+ expected.each { |k,v|
459
+ assert(openid_req.message.get_arg(AXMessage::NS_URI, k) == v)
460
+ }
461
+ end
433
462
  end
434
463
 
435
464
  class FetchResponseTest < Test::Unit::TestCase
@@ -522,6 +551,38 @@ module OpenID
522
551
  assert_raises(Error) { @msg.get_single(@type_a) }
523
552
  end
524
553
 
554
+ def test_from_success_response
555
+ uri = 'http://under.the.sea/'
556
+ name = 'ext0'
557
+ value = 'snarfblat'
558
+
559
+ m = OpenID::Message.from_openid_args({
560
+ 'mode' => 'id_res',
561
+ 'ns' => OPENID2_NS,
562
+ 'ns.ax' => AXMessage::NS_URI,
563
+ 'ax.update_url' => 'http://example.com/realm/update_path',
564
+ 'ax.mode' => 'fetch_response',
565
+ 'ax.type.' + name => uri,
566
+ 'ax.count.' + name => '1',
567
+ 'ax.value.' + name + '.1' => value,
568
+ })
569
+
570
+ e = OpenID::OpenIDServiceEndpoint.new()
571
+ resp = OpenID::Consumer::SuccessResponse.new(e, m, [])
572
+
573
+ ax_resp = FetchResponse.from_success_response(resp, false)
574
+
575
+ values = ax_resp[uri]
576
+ assert_equal(values, [value])
577
+ end
578
+
579
+ def test_from_success_response_empty
580
+ e = OpenID::OpenIDServiceEndpoint.new()
581
+ m = OpenID::Message.from_openid_args({'mode' => 'id_res'})
582
+ resp = OpenID::Consumer::SuccessResponse.new(e, m, [])
583
+ ax_resp = FetchResponse.from_success_response(resp)
584
+ assert(ax_resp.nil?)
585
+ end
525
586
  end
526
587
 
527
588
  class StoreRequestTest < Test::Unit::TestCase
@@ -769,4 +769,12 @@ module OpenID
769
769
  OPENID_IDP_2_0_TYPE)
770
770
  end
771
771
  end
772
+
773
+ class TestEndpointDisplayIdentifier < Test::Unit::TestCase
774
+ def test_strip_fragment
775
+ @endpoint = OpenIDServiceEndpoint.new()
776
+ @endpoint.claimed_id = 'http://recycled.invalid/#123'
777
+ assert_equal 'http://recycled.invalid/', @endpoint.display_identifier
778
+ end
779
+ end
772
780
  end
@@ -320,7 +320,7 @@ module OpenID
320
320
  msg = Message.new(OPENID2_NS)
321
321
  raise ServerError.from_message(msg), 'For you!'
322
322
  end
323
-
323
+
324
324
  OpenID.with_method_overridden(:make_kv_post, send_error) do
325
325
  assert_protocol_error("Error from") {
326
326
  call_check_auth do |idres|
@@ -337,7 +337,7 @@ module OpenID
337
337
  me.assert_equal(:req, req)
338
338
  :expected_response
339
339
  end
340
-
340
+
341
341
  OpenID.with_method_overridden(:make_kv_post, send_resp) do
342
342
  final_resp = call_check_auth do |idres|
343
343
  idres.instance_def(:create_check_auth_request) {
@@ -975,9 +975,14 @@ module OpenID
975
975
 
976
976
  def test_trustRootInvalid_modified
977
977
  @request.trust_root = "does://not.parse/"
978
- assert_raise(Server::MalformedTrustRoot) {
979
- @request.trust_root_valid()
980
- }
978
+ @request.message = :sentinel
979
+ begin
980
+ result = @request.trust_root_valid
981
+ rescue Server::MalformedTrustRoot => why
982
+ assert_equal(:sentinel, why.openid_message)
983
+ else
984
+ flunk("Expected MalformedTrustRoot, got #{result.inspect}")
985
+ end
981
986
  end
982
987
 
983
988
  def test_trustRootvalid_absent_trust_root
@@ -156,5 +156,14 @@ END
156
156
  assert_same e7, sorted[3]
157
157
  end
158
158
  end
159
+
160
+ class GetCanonicalIDTestCase < Test::Unit::TestCase
161
+ include XRDSTestMixin
162
+
163
+ def test_multisegment_xri
164
+ xmldoc = Yadis.parseXRDS(read_data_file('subsegments.xrds'))
165
+ result = Yadis.get_canonical_id('xri://=nishitani*masaki', xmldoc)
166
+ end
167
+ end
159
168
  end
160
169
  end
metadata CHANGED
@@ -1,10 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.9.4
2
+ rubygems_version: 0.9.0
3
3
  specification_version: 1
4
4
  name: ruby-openid
5
5
  version: !ruby/object:Gem::Version
6
- version: 2.0.2
7
- date: 2007-12-21 00:00:00 -08:00
6
+ version: 2.0.3
7
+ date: 2008-01-11 00:00:00 -08:00
8
8
  summary: A library for consuming and serving OpenID identities.
9
9
  require_paths:
10
10
  - lib
@@ -29,248 +29,249 @@ post_install_message:
29
29
  authors:
30
30
  - JanRain, Inc
31
31
  files:
32
+ - examples/README
33
+ - examples/active_record_openid_store
32
34
  - examples/rails_openid_login_generator
33
35
  - examples/rails_openid
34
- - examples/README
35
36
  - examples/discover
36
- - examples/active_record_openid_store
37
- - examples/rails_openid_login_generator/USAGE
37
+ - examples/active_record_openid_store/lib
38
+ - examples/active_record_openid_store/test
39
+ - examples/active_record_openid_store/init.rb
40
+ - examples/active_record_openid_store/README
41
+ - examples/active_record_openid_store/XXX_add_open_id_store_to_db.rb
42
+ - examples/active_record_openid_store/XXX_upgrade_open_id_store.rb
43
+ - examples/active_record_openid_store/lib/association.rb
44
+ - examples/active_record_openid_store/lib/nonce.rb
45
+ - examples/active_record_openid_store/lib/open_id_setting.rb
46
+ - examples/active_record_openid_store/lib/openid_ar_store.rb
47
+ - examples/active_record_openid_store/test/store_test.rb
48
+ - examples/rails_openid_login_generator/templates
38
49
  - examples/rails_openid_login_generator/gemspec
50
+ - examples/rails_openid_login_generator/USAGE
39
51
  - examples/rails_openid_login_generator/openid_login_generator.rb
40
- - examples/rails_openid_login_generator/templates
41
- - examples/rails_openid_login_generator/templates/controller_test.rb
52
+ - examples/rails_openid_login_generator/templates/user.rb
42
53
  - examples/rails_openid_login_generator/templates/README
43
- - examples/rails_openid_login_generator/templates/view_logout.rhtml
44
54
  - examples/rails_openid_login_generator/templates/controller.rb
55
+ - examples/rails_openid_login_generator/templates/helper.rb
45
56
  - examples/rails_openid_login_generator/templates/view_login.rhtml
46
- - examples/rails_openid_login_generator/templates/user.rb
47
- - examples/rails_openid_login_generator/templates/openid_login_system.rb
57
+ - examples/rails_openid_login_generator/templates/view_logout.rhtml
48
58
  - examples/rails_openid_login_generator/templates/view_welcome.rhtml
49
- - examples/rails_openid_login_generator/templates/users.yml
59
+ - examples/rails_openid_login_generator/templates/controller_test.rb
50
60
  - examples/rails_openid_login_generator/templates/user_test.rb
51
- - examples/rails_openid_login_generator/templates/helper.rb
52
- - examples/rails_openid/db
61
+ - examples/rails_openid_login_generator/templates/users.yml
62
+ - examples/rails_openid_login_generator/templates/openid_login_system.rb
53
63
  - examples/rails_openid/app
64
+ - examples/rails_openid/components
65
+ - examples/rails_openid/config
66
+ - examples/rails_openid/db
54
67
  - examples/rails_openid/doc
55
68
  - examples/rails_openid/lib
56
69
  - examples/rails_openid/log
57
- - examples/rails_openid/test
58
- - examples/rails_openid/Rakefile
59
- - examples/rails_openid/README
60
- - examples/rails_openid/components
61
- - examples/rails_openid/config
62
70
  - examples/rails_openid/public
63
71
  - examples/rails_openid/script
72
+ - examples/rails_openid/test
64
73
  - examples/rails_openid/vendor
65
- - examples/rails_openid/app/views
74
+ - examples/rails_openid/Rakefile
75
+ - examples/rails_openid/README
66
76
  - examples/rails_openid/app/controllers
67
- - examples/rails_openid/app/models
68
77
  - examples/rails_openid/app/helpers
69
- - examples/rails_openid/app/views/login
78
+ - examples/rails_openid/app/models
79
+ - examples/rails_openid/app/views
80
+ - examples/rails_openid/app/controllers/application.rb
81
+ - examples/rails_openid/app/controllers/login_controller.rb
82
+ - examples/rails_openid/app/controllers/server_controller.rb
83
+ - examples/rails_openid/app/controllers/consumer_controller.rb
84
+ - examples/rails_openid/app/helpers/application_helper.rb
85
+ - examples/rails_openid/app/helpers/login_helper.rb
86
+ - examples/rails_openid/app/helpers/server_helper.rb
70
87
  - examples/rails_openid/app/views/layouts
71
- - examples/rails_openid/app/views/consumer
88
+ - examples/rails_openid/app/views/login
72
89
  - examples/rails_openid/app/views/server
73
- - examples/rails_openid/app/views/login/index.rhtml
90
+ - examples/rails_openid/app/views/consumer
74
91
  - examples/rails_openid/app/views/layouts/server.rhtml
92
+ - examples/rails_openid/app/views/login/index.rhtml
93
+ - examples/rails_openid/app/views/server/decide.rhtml
75
94
  - examples/rails_openid/app/views/consumer/start.rhtml
76
95
  - examples/rails_openid/app/views/consumer/index.rhtml
77
- - examples/rails_openid/app/views/server/decide.rhtml
78
- - examples/rails_openid/app/controllers/consumer_controller.rb
79
- - examples/rails_openid/app/controllers/login_controller.rb
80
- - examples/rails_openid/app/controllers/server_controller.rb
81
- - examples/rails_openid/app/controllers/application.rb
82
- - examples/rails_openid/app/helpers/server_helper.rb
83
- - examples/rails_openid/app/helpers/login_helper.rb
84
- - examples/rails_openid/app/helpers/application_helper.rb
85
- - examples/rails_openid/doc/README_FOR_APP
86
- - examples/rails_openid/lib/tasks
87
- - examples/rails_openid/test/unit
88
- - examples/rails_openid/test/mocks
89
- - examples/rails_openid/test/functional
90
- - examples/rails_openid/test/fixtures
91
- - examples/rails_openid/test/test_helper.rb
92
- - examples/rails_openid/test/mocks/test
93
- - examples/rails_openid/test/mocks/development
94
- - examples/rails_openid/test/functional/login_controller_test.rb
95
- - examples/rails_openid/test/functional/server_controller_test.rb
96
- - examples/rails_openid/config/routes.rb
97
96
  - examples/rails_openid/config/environments
98
97
  - examples/rails_openid/config/database.yml
99
- - examples/rails_openid/config/environment.rb
100
98
  - examples/rails_openid/config/boot.rb
101
- - examples/rails_openid/config/environments/test.rb
99
+ - examples/rails_openid/config/environment.rb
100
+ - examples/rails_openid/config/routes.rb
102
101
  - examples/rails_openid/config/environments/development.rb
103
102
  - examples/rails_openid/config/environments/production.rb
104
- - examples/rails_openid/public/favicon.ico
105
- - examples/rails_openid/public/404.html
106
- - examples/rails_openid/public/stylesheets
107
- - examples/rails_openid/public/javascripts
108
- - examples/rails_openid/public/robots.txt
103
+ - examples/rails_openid/config/environments/test.rb
104
+ - examples/rails_openid/doc/README_FOR_APP
105
+ - examples/rails_openid/lib/tasks
109
106
  - examples/rails_openid/public/images
110
- - examples/rails_openid/public/dispatch.fcgi
107
+ - examples/rails_openid/public/javascripts
108
+ - examples/rails_openid/public/stylesheets
109
+ - examples/rails_openid/public/dispatch.cgi
110
+ - examples/rails_openid/public/404.html
111
111
  - examples/rails_openid/public/500.html
112
+ - examples/rails_openid/public/dispatch.fcgi
112
113
  - examples/rails_openid/public/dispatch.rb
113
- - examples/rails_openid/public/dispatch.cgi
114
- - examples/rails_openid/public/javascripts/prototype.js
114
+ - examples/rails_openid/public/favicon.ico
115
+ - examples/rails_openid/public/robots.txt
116
+ - examples/rails_openid/public/images/openid_login_bg.gif
115
117
  - examples/rails_openid/public/javascripts/controls.js
116
- - examples/rails_openid/public/javascripts/effects.js
117
118
  - examples/rails_openid/public/javascripts/dragdrop.js
118
- - examples/rails_openid/public/images/openid_login_bg.gif
119
+ - examples/rails_openid/public/javascripts/effects.js
120
+ - examples/rails_openid/public/javascripts/prototype.js
121
+ - examples/rails_openid/script/performance
122
+ - examples/rails_openid/script/process
119
123
  - examples/rails_openid/script/console
120
- - examples/rails_openid/script/destroy
121
124
  - examples/rails_openid/script/about
122
- - examples/rails_openid/script/generate
123
125
  - examples/rails_openid/script/breakpointer
126
+ - examples/rails_openid/script/destroy
127
+ - examples/rails_openid/script/generate
124
128
  - examples/rails_openid/script/plugin
125
- - examples/rails_openid/script/server
126
129
  - examples/rails_openid/script/runner
127
- - examples/rails_openid/script/process
128
- - examples/rails_openid/script/performance
129
- - examples/rails_openid/script/process/spawner
130
- - examples/rails_openid/script/process/spinner
131
- - examples/rails_openid/script/process/reaper
130
+ - examples/rails_openid/script/server
132
131
  - examples/rails_openid/script/performance/benchmarker
133
132
  - examples/rails_openid/script/performance/profiler
134
- - examples/active_record_openid_store/lib
135
- - examples/active_record_openid_store/test
136
- - examples/active_record_openid_store/README
137
- - examples/active_record_openid_store/XXX_add_open_id_store_to_db.rb
138
- - examples/active_record_openid_store/XXX_upgrade_open_id_store.rb
139
- - examples/active_record_openid_store/init.rb
140
- - examples/active_record_openid_store/lib/nonce.rb
141
- - examples/active_record_openid_store/lib/open_id_setting.rb
142
- - examples/active_record_openid_store/lib/openid_ar_store.rb
143
- - examples/active_record_openid_store/lib/association.rb
144
- - examples/active_record_openid_store/test/store_test.rb
133
+ - examples/rails_openid/script/process/spawner
134
+ - examples/rails_openid/script/process/reaper
135
+ - examples/rails_openid/script/process/spinner
136
+ - examples/rails_openid/test/fixtures
137
+ - examples/rails_openid/test/functional
138
+ - examples/rails_openid/test/mocks
139
+ - examples/rails_openid/test/unit
140
+ - examples/rails_openid/test/test_helper.rb
141
+ - examples/rails_openid/test/functional/login_controller_test.rb
142
+ - examples/rails_openid/test/functional/server_controller_test.rb
143
+ - examples/rails_openid/test/mocks/development
144
+ - examples/rails_openid/test/mocks/test
145
+ - lib/openid
145
146
  - lib/hmac
146
147
  - lib/openid.rb
147
- - lib/openid
148
- - lib/hmac/sha1.rb
149
- - lib/hmac/sha2.rb
150
- - lib/hmac/hmac.rb
151
- - lib/openid/kvform.rb
148
+ - lib/openid/cryptutil.rb
149
+ - lib/openid/extras.rb
152
150
  - lib/openid/urinorm.rb
151
+ - lib/openid/util.rb
152
+ - lib/openid/trustroot.rb
153
153
  - lib/openid/message.rb
154
- - lib/openid/association.rb
154
+ - lib/openid/yadis
155
+ - lib/openid/consumer
156
+ - lib/openid/fetchers.rb
155
157
  - lib/openid/dh.rb
158
+ - lib/openid/kvform.rb
159
+ - lib/openid/association.rb
156
160
  - lib/openid/store
157
- - lib/openid/yadis
158
- - lib/openid/server.rb
159
- - lib/openid/trustroot.rb
160
- - lib/openid/consumer.rb
161
161
  - lib/openid/kvpost.rb
162
- - lib/openid/consumer
162
+ - lib/openid/extensions
163
163
  - lib/openid/protocolerror.rb
164
+ - lib/openid/server.rb
164
165
  - lib/openid/extension.rb
165
- - lib/openid/cryptutil.rb
166
- - lib/openid/util.rb
167
- - lib/openid/extensions
168
- - lib/openid/extras.rb
169
- - lib/openid/fetchers.rb
170
- - lib/openid/store/nonce.rb
171
- - lib/openid/store/filesystem.rb
172
- - lib/openid/store/interface.rb
173
- - lib/openid/store/memory.rb
174
- - lib/openid/yadis/xrds.rb
166
+ - lib/openid/consumer.rb
175
167
  - lib/openid/yadis/htmltokenizer.rb
176
- - lib/openid/yadis/discovery.rb
177
168
  - lib/openid/yadis/parsehtml.rb
169
+ - lib/openid/yadis/filters.rb
170
+ - lib/openid/yadis/xrds.rb
178
171
  - lib/openid/yadis/accept.rb
179
172
  - lib/openid/yadis/constants.rb
180
- - lib/openid/yadis/xrires.rb
181
- - lib/openid/yadis/filters.rb
173
+ - lib/openid/yadis/discovery.rb
182
174
  - lib/openid/yadis/xri.rb
175
+ - lib/openid/yadis/xrires.rb
183
176
  - lib/openid/yadis/services.rb
184
- - lib/openid/consumer/discovery.rb
185
177
  - lib/openid/consumer/html_parse.rb
186
- - lib/openid/consumer/discovery_manager.rb
187
178
  - lib/openid/consumer/idres.rb
188
- - lib/openid/consumer/responses.rb
189
- - lib/openid/consumer/checkid_request.rb
190
179
  - lib/openid/consumer/associationmanager.rb
191
- - lib/openid/extensions/ax.rb
180
+ - lib/openid/consumer/discovery.rb
181
+ - lib/openid/consumer/discovery_manager.rb
182
+ - lib/openid/consumer/checkid_request.rb
183
+ - lib/openid/consumer/responses.rb
184
+ - lib/openid/store/filesystem.rb
185
+ - lib/openid/store/interface.rb
186
+ - lib/openid/store/nonce.rb
187
+ - lib/openid/store/memory.rb
192
188
  - lib/openid/extensions/sreg.rb
189
+ - lib/openid/extensions/ax.rb
193
190
  - lib/openid/extensions/pape.rb
191
+ - lib/hmac/hmac.rb
192
+ - lib/hmac/sha1.rb
193
+ - lib/hmac/sha2.rb
194
194
  - test/data
195
- - test/test_nonce.rb
196
- - test/test_ax.rb
197
- - test/test_xrds.rb
198
- - test/test_dh.rb
199
- - test/test_urinorm.rb
200
- - test/test_checkid_request.rb
201
- - test/test_server.rb
202
- - test/test_cryptutil.rb
203
- - test/test_yadis_discovery.rb
204
- - test/test_message.rb
205
- - test/test_consumer.rb
206
- - test/test_accept.rb
207
- - test/test_responses.rb
208
- - test/test_sreg.rb
209
195
  - test/test_association.rb
210
- - test/test_kvpost.rb
211
- - test/test_xrires.rb
212
- - test/test_idres.rb
213
- - test/test_linkparse.rb
196
+ - test/test_urinorm.rb
197
+ - test/testutil.rb
214
198
  - test/test_util.rb
215
- - test/test_openid_yadis.rb
216
- - test/test_filters.rb
217
- - test/test_pape.rb
218
- - test/discoverdata.rb
219
- - test/test_parsehtml.rb
220
- - test/test_stores.rb
199
+ - test/test_message.rb
200
+ - test/test_cryptutil.rb
201
+ - test/test_extras.rb
221
202
  - test/util.rb
222
- - test/test_xri.rb
223
203
  - test/test_trustroot.rb
224
- - test/test_extras.rb
204
+ - test/test_parsehtml.rb
225
205
  - test/test_fetchers.rb
226
- - test/test_associationmanager.rb
227
- - test/testutil.rb
206
+ - test/test_dh.rb
228
207
  - test/test_kvform.rb
208
+ - test/test_openid_yadis.rb
209
+ - test/test_linkparse.rb
210
+ - test/test_stores.rb
211
+ - test/test_filters.rb
212
+ - test/test_xrds.rb
213
+ - test/test_nonce.rb
214
+ - test/test_accept.rb
215
+ - test/test_kvpost.rb
216
+ - test/test_associationmanager.rb
217
+ - test/discoverdata.rb
218
+ - test/test_server.rb
219
+ - test/test_yadis_discovery.rb
220
+ - test/test_sreg.rb
221
+ - test/test_idres.rb
222
+ - test/test_ax.rb
223
+ - test/test_xri.rb
224
+ - test/test_xrires.rb
229
225
  - test/test_discover.rb
226
+ - test/test_consumer.rb
227
+ - test/test_pape.rb
228
+ - test/test_checkid_request.rb
230
229
  - test/test_discovery_manager.rb
230
+ - test/test_responses.rb
231
+ - test/data/test_xrds
232
+ - test/data/urinorm.txt
231
233
  - test/data/n2b64
232
- - test/data/test_discover
233
- - test/data/linkparse.txt
234
+ - test/data/trustroot.txt
234
235
  - test/data/dh.txt
235
- - test/data/accept.txt
236
236
  - test/data/test1-parsehtml.txt
237
- - test/data/urinorm.txt
237
+ - test/data/linkparse.txt
238
+ - test/data/accept.txt
239
+ - test/data/test_discover
238
240
  - test/data/example-xrds.xml
239
- - test/data/trustroot.txt
240
- - test/data/test_xrds
241
241
  - test/data/test1-discover.txt
242
- - test/data/test_discover/openid_and_yadis.html
243
- - test/data/test_discover/yadis_0entries.xml
244
- - test/data/test_discover/yadis_another_delegate.xml
245
- - test/data/test_discover/yadis_2entries_idp.xml
246
- - test/data/test_discover/openid_1_and_2.html
247
- - test/data/test_discover/openid2.html
248
- - test/data/test_discover/openid_1_and_2_xrds_bad_delegate.xml
249
- - test/data/test_discover/openid.html
250
- - test/data/test_discover/yadis_idp_delegate.xml
251
- - test/data/test_discover/yadis_idp.xml
252
- - test/data/test_discover/openid_1_and_2_xrds.xml
253
- - test/data/test_discover/openid2_xrds.xml
254
- - test/data/test_discover/yadis_2_bad_local_id.xml
255
- - test/data/test_discover/openid_no_delegate.html
256
- - test/data/test_discover/yadis_2entries_delegate.xml
257
- - test/data/test_discover/openid2_xrds_no_local_id.xml
258
- - test/data/test_discover/yadis_no_delegate.xml
259
- - test/data/test_xrds/=j3h.2007.11.14.xrds
260
- - test/data/test_xrds/delegated-20060809.xrds
261
- - test/data/test_xrds/status222.xrds
242
+ - test/data/test_xrds/ref.xrds
262
243
  - test/data/test_xrds/README
263
244
  - test/data/test_xrds/delegated-20060809-r1.xrds
264
245
  - test/data/test_xrds/delegated-20060809-r2.xrds
246
+ - test/data/test_xrds/delegated-20060809.xrds
247
+ - test/data/test_xrds/no-xrd.xml
248
+ - test/data/test_xrds/not-xrds.xml
249
+ - test/data/test_xrds/prefixsometimes.xrds
265
250
  - test/data/test_xrds/sometimesprefix.xrds
266
251
  - test/data/test_xrds/spoof1.xrds
267
252
  - test/data/test_xrds/spoof2.xrds
268
253
  - test/data/test_xrds/spoof3.xrds
254
+ - test/data/test_xrds/status222.xrds
269
255
  - test/data/test_xrds/valid-populated-xrds.xml
270
- - test/data/test_xrds/prefixsometimes.xrds
271
- - test/data/test_xrds/no-xrd.xml
272
- - test/data/test_xrds/not-xrds.xml
273
- - test/data/test_xrds/ref.xrds
256
+ - test/data/test_xrds/=j3h.2007.11.14.xrds
257
+ - test/data/test_xrds/subsegments.xrds
258
+ - test/data/test_discover/openid2_xrds.xml
259
+ - test/data/test_discover/openid.html
260
+ - test/data/test_discover/openid2.html
261
+ - test/data/test_discover/openid2_xrds_no_local_id.xml
262
+ - test/data/test_discover/openid_1_and_2.html
263
+ - test/data/test_discover/openid_1_and_2_xrds.xml
264
+ - test/data/test_discover/openid_and_yadis.html
265
+ - test/data/test_discover/openid_1_and_2_xrds_bad_delegate.xml
266
+ - test/data/test_discover/openid_no_delegate.html
267
+ - test/data/test_discover/yadis_0entries.xml
268
+ - test/data/test_discover/yadis_2_bad_local_id.xml
269
+ - test/data/test_discover/yadis_2entries_delegate.xml
270
+ - test/data/test_discover/yadis_2entries_idp.xml
271
+ - test/data/test_discover/yadis_another_delegate.xml
272
+ - test/data/test_discover/yadis_idp.xml
273
+ - test/data/test_discover/yadis_idp_delegate.xml
274
+ - test/data/test_discover/yadis_no_delegate.xml
274
275
  - NOTICE
275
276
  - CHANGELOG
276
277
  - README