ruby-openid 2.0.1 → 2.0.2
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 +215 -0
- data/LICENSE +5 -0
- data/NOTICE +2 -0
- data/examples/active_record_openid_store/XXX_upgrade_open_id_store.rb +1 -1
- data/examples/discover +3 -0
- data/examples/rails_openid/app/controllers/consumer_controller.rb +3 -2
- data/examples/rails_openid/app/controllers/login_controller.rb +2 -0
- data/examples/rails_openid/app/views/consumer/index.rhtml +2 -2
- data/examples/rails_openid/app/views/layouts/server.rhtml +9 -2
- data/examples/rails_openid/app/views/login/index.rhtml +32 -8
- data/examples/rails_openid/config/database.yml +4 -15
- data/lib/openid.rb +14 -0
- data/lib/openid/consumer.rb +16 -12
- data/lib/openid/consumer/idres.rb +10 -10
- data/lib/openid/fetchers.rb +16 -2
- data/lib/openid/util.rb +1 -1
- data/test/test_fetchers.rb +35 -0
- data/test/test_idres.rb +40 -0
- metadata +164 -164
- data/COPYING +0 -13
data/CHANGELOG
ADDED
@@ -0,0 +1,215 @@
|
|
1
|
+
Mon Jan 23 12:48:00 PST 2006 brian@janrain.com
|
2
|
+
* fixed bug in expiresIn. added expired? method
|
3
|
+
|
4
|
+
M ./lib/openid/filestore.rb -1 +1
|
5
|
+
M ./lib/openid/stores.rb +4
|
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.
|
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
|
143
|
+
|
144
|
+
Wed Dec 28 15:47:51 PST 2005 brian@janrain.com
|
145
|
+
* code cleanup
|
146
|
+
|
147
|
+
M ./lib/openid/consumer.rb -5
|
148
|
+
|
149
|
+
Wed Dec 28 15:29:31 PST 2005 brian@janrain.com
|
150
|
+
* added linkparse to test suite script
|
151
|
+
|
152
|
+
M ./test/runtests -1 +1
|
153
|
+
|
154
|
+
Wed Dec 28 15:29:07 PST 2005 brian@janrain.com
|
155
|
+
* added link parsing tests, lots of em
|
156
|
+
|
157
|
+
A ./test/linkparse.rb
|
158
|
+
|
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
|
161
|
+
|
162
|
+
M ./lib/openid/parse.rb -5 +13
|
163
|
+
|
164
|
+
Tue Dec 27 16:11:09 PST 2005 brian@janrain.com
|
165
|
+
* added more tests for openid/util
|
166
|
+
|
167
|
+
M ./test/dh.rb -2 +1
|
168
|
+
M ./test/runtests +1
|
169
|
+
A ./test/util.rb
|
170
|
+
|
171
|
+
Tue Dec 27 16:10:28 PST 2005 brian@janrain.com
|
172
|
+
* change util methods to use all use /dev/urandom if available
|
173
|
+
|
174
|
+
M ./lib/openid/util.rb -15 +35
|
175
|
+
|
176
|
+
Tue Dec 27 16:09:53 PST 2005 brian@janrain.com
|
177
|
+
* changed tmp pathname to something more useful
|
178
|
+
|
179
|
+
M ./examples/consumer.rb -1 +1
|
180
|
+
|
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
|
data/LICENSE
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
The code in lib/hmac/ is Copyright 2001 by Daiki Ueno, and distributed under
|
2
|
+
the terms of the Ruby license. See http://www.ruby-lang.org/en/LICENSE.txt
|
3
|
+
|
4
|
+
The remainder of this package is Copyright 2006-2007 by JanRain, Inc. and
|
5
|
+
distributed under the terms of license below:
|
1
6
|
|
2
7
|
Apache License
|
3
8
|
Version 2.0, January 2004
|
data/NOTICE
ADDED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Use this migration to upgrade the old 1.1 ActiveRecord store schema
|
2
2
|
# to the new 2.0 schema.
|
3
|
-
class
|
3
|
+
class UpgradeOpenIdStore < ActiveRecord::Migration
|
4
4
|
def self.up
|
5
5
|
drop_table "open_id_settings"
|
6
6
|
drop_table "open_id_nonces"
|
data/examples/discover
CHANGED
@@ -50,9 +50,10 @@ class ConsumerController < ApplicationController
|
|
50
50
|
end
|
51
51
|
|
52
52
|
def complete
|
53
|
-
|
53
|
+
# FIXME - url_for some action is not necessarily the current URL.
|
54
|
+
current_url = url_for(:action => 'complete', :only_path => false)
|
54
55
|
parameters = params.reject{|k,v|request.path_parameters[k]}
|
55
|
-
oidresp = consumer.complete(parameters,
|
56
|
+
oidresp = consumer.complete(parameters, current_url)
|
56
57
|
case oidresp.status
|
57
58
|
when OpenID::Consumer::FAILURE
|
58
59
|
if oidresp.display_identifier
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<html>
|
2
2
|
<head>
|
3
|
-
<title>Rails OpenID Example
|
3
|
+
<title>Rails OpenID Example Relying Party</title>
|
4
4
|
</head>
|
5
5
|
<style type="text/css">
|
6
6
|
* {
|
@@ -39,7 +39,7 @@
|
|
39
39
|
}
|
40
40
|
</style>
|
41
41
|
<body>
|
42
|
-
<h1>Rails OpenID Example
|
42
|
+
<h1>Rails OpenID Example Relying Party</h1>
|
43
43
|
<% if flash[:alert] %>
|
44
44
|
<div class='alert'>
|
45
45
|
<%= h(flash[:alert]) %>
|
@@ -32,7 +32,13 @@
|
|
32
32
|
table {
|
33
33
|
padding: 1em;
|
34
34
|
}
|
35
|
-
li {margin-bottom: .5em;}
|
35
|
+
li {margin-bottom: .5em;}
|
36
|
+
span.openid:before {
|
37
|
+
content: url(<%= @base_url %>images/openid_login_bg.gif) ;
|
38
|
+
}
|
39
|
+
span.openid {
|
40
|
+
font-size: smaller;
|
41
|
+
}
|
36
42
|
</style>
|
37
43
|
<body>
|
38
44
|
|
@@ -40,7 +46,8 @@
|
|
40
46
|
|
41
47
|
<% if session[:username] %>
|
42
48
|
<div style="float:right;">
|
43
|
-
Welcome, <%= session[:username] %> | <%= link_to('Log out', :controller => 'login', :action => 'logout')
|
49
|
+
Welcome, <%= session[:username] %> | <%= link_to('Log out', :controller => 'login', :action => 'logout') %><br />
|
50
|
+
<span class="openid"><%= @base_url %>user/<%= session[:username] %></span>
|
44
51
|
</div>
|
45
52
|
<% end %>
|
46
53
|
|
@@ -13,20 +13,44 @@ Type a username:
|
|
13
13
|
|
14
14
|
<% end %>
|
15
15
|
|
16
|
-
<p>
|
17
|
-
|
18
|
-
</
|
16
|
+
<p> Welcome to the Ruby OpenID example. This code is a starting point
|
17
|
+
for developers wishing to implement an OpenID provider or relying
|
18
|
+
party. We've used the <a href="http://rubyonrails.org/">Rails</a>
|
19
|
+
platform to demonstrate, but the library code is not Rails specific.</p>
|
19
20
|
|
20
|
-
<h2>To use the example</h2>
|
21
|
+
<h2>To use the example provider</h2>
|
21
22
|
<p>
|
22
23
|
<ol>
|
23
|
-
|
24
|
-
<li>
|
25
|
-
|
24
|
+
|
25
|
+
<li>Enter a username in the form above. You will be "Logged In"
|
26
|
+
to the server, at which point you may authenticate using an OpenID
|
27
|
+
consumer. Your OpenID URL will be displayed after you log
|
28
|
+
in.<p>The server will automatically create an identity page for
|
29
|
+
you at <%= @base_url %>user/<i>name</i></p></li>
|
30
|
+
|
31
|
+
<li><p>Because WEBrick can only handle one thing at a time, you'll need to
|
32
|
+
run another instance of the example on another port if you want to use
|
33
|
+
a relying party to use with this example provider:</p>
|
34
|
+
<blockquote>
|
35
|
+
<code>script/server --port=3001</code>
|
36
|
+
</blockquote>
|
37
|
+
|
38
|
+
<p>(The RP needs to be able to access the provider, so unless you're
|
39
|
+
running this example on a public IP, you can't use the live example
|
40
|
+
at <a href="http://openidenabled.com/">openidenabled.com</a> on
|
41
|
+
your local provider.)</p>
|
42
|
+
</li>
|
43
|
+
|
44
|
+
<li>Point your browser to this new instance and follow the directions
|
45
|
+
below.</li>
|
46
|
+
<!-- Fun fact: 'url_for :port => 3001' doesn't work very well. -->
|
26
47
|
</ol>
|
27
48
|
|
28
49
|
</p>
|
29
50
|
|
51
|
+
<h2>To use the example relying party</h2>
|
30
52
|
|
31
|
-
|
53
|
+
<p>Visit <a href="<%= url_for :controller => 'consumer' %>">/consumer</a>
|
54
|
+
and enter your OpenID.</p>
|
55
|
+
</p>
|
32
56
|
|
@@ -6,26 +6,15 @@
|
|
6
6
|
# And be sure to use new-style password hashing:
|
7
7
|
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
|
8
8
|
development:
|
9
|
-
adapter:
|
10
|
-
database:
|
11
|
-
username: root
|
12
|
-
password:
|
13
|
-
socket: /path/to/your/mysql.sock
|
14
|
-
|
15
|
-
# Connect on a TCP socket. If omitted, the adapter will connect on the
|
16
|
-
# domain socket given by socket instead.
|
17
|
-
#host: localhost
|
18
|
-
#port: 3306
|
9
|
+
adapter: sqlite3
|
10
|
+
database: db/development.sqlite3
|
19
11
|
|
20
12
|
# Warning: The database defined as 'test' will be erased and
|
21
13
|
# re-generated from your development database when you run 'rake'.
|
22
14
|
# Do not set this db to the same as development or production.
|
23
15
|
test:
|
24
|
-
adapter:
|
25
|
-
database:
|
26
|
-
username: root
|
27
|
-
password:
|
28
|
-
socket: /path/to/your/mysql.sock
|
16
|
+
adapter: sqlite3
|
17
|
+
database: ":memory:"
|
29
18
|
|
30
19
|
production:
|
31
20
|
adapter: mysql
|
data/lib/openid.rb
CHANGED
@@ -1,2 +1,16 @@
|
|
1
|
+
# Copyright 2006-2007 JanRain, Inc.
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License"); you
|
4
|
+
# may not use this file except in compliance with the License. You may
|
5
|
+
# obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
12
|
+
# implied. See the License for the specific language governing
|
13
|
+
# permissions and limitations under the License.
|
14
|
+
|
1
15
|
require "openid/consumer"
|
2
16
|
require 'openid/server'
|
data/lib/openid/consumer.rb
CHANGED
@@ -170,7 +170,7 @@ module OpenID
|
|
170
170
|
#
|
171
171
|
# Get a Consumer instance with the same session and store as before
|
172
172
|
# and call its complete() method, passing in all the received query
|
173
|
-
# arguments and
|
173
|
+
# arguments and URL currently being handled.
|
174
174
|
#
|
175
175
|
# There are multiple possible return types possible from that
|
176
176
|
# method. These indicate the whether or not the login was
|
@@ -265,16 +265,20 @@ module OpenID
|
|
265
265
|
# because <tt>controller</tt> and <tt>action</tt> and other
|
266
266
|
# "path parameters" are included in params.
|
267
267
|
#
|
268
|
-
#
|
269
|
-
#
|
270
|
-
#
|
271
|
-
# openid.return_to
|
272
|
-
#
|
268
|
+
# current_url: Extract the URL of the current request from your
|
269
|
+
# application's web request framework and specify it here to have it
|
270
|
+
# checked against the openid.return_to value in the response. Do not
|
271
|
+
# just pass <tt>args['openid.return_to']</tt> here; that will defeat the
|
272
|
+
# purpose of this check. (See OpenID Authentication 2.0 section 11.1.)
|
273
|
+
#
|
274
|
+
# If the return_to URL check fails, the status of the completion will be
|
275
|
+
# FAILURE.
|
276
|
+
|
273
277
|
#
|
274
278
|
# Returns a subclass of Response. The type of response is
|
275
279
|
# indicated by the status attribute, which will be one of
|
276
280
|
# SUCCESS, CANCEL, FAILURE, or SETUP_NEEDED.
|
277
|
-
def complete(query,
|
281
|
+
def complete(query, current_url)
|
278
282
|
message = Message.from_post_args(query)
|
279
283
|
mode = message.get_arg(OPENID_NS, 'mode', 'invalid')
|
280
284
|
begin
|
@@ -282,7 +286,7 @@ module OpenID
|
|
282
286
|
rescue NameError
|
283
287
|
meth = method(:complete_invalid)
|
284
288
|
end
|
285
|
-
response = meth.call(message,
|
289
|
+
response = meth.call(message, current_url)
|
286
290
|
cleanup_last_requested_endpoint
|
287
291
|
if [SUCCESS, CANCEL].member?(response.status)
|
288
292
|
cleanup_session
|
@@ -338,8 +342,8 @@ module OpenID
|
|
338
342
|
service.compatibility_mode, negotiator)
|
339
343
|
end
|
340
344
|
|
341
|
-
def handle_idres(message,
|
342
|
-
IdResHandler.new(message,
|
345
|
+
def handle_idres(message, current_url)
|
346
|
+
IdResHandler.new(message, current_url, @store, last_requested_endpoint)
|
343
347
|
end
|
344
348
|
|
345
349
|
def complete_invalid(message, unused_return_to)
|
@@ -369,7 +373,7 @@ module OpenID
|
|
369
373
|
end
|
370
374
|
end
|
371
375
|
|
372
|
-
def complete_id_res(message,
|
376
|
+
def complete_id_res(message, current_url)
|
373
377
|
if message.is_openid1
|
374
378
|
setup_url = message.get_arg(OPENID1_NS, 'user_setup_url')
|
375
379
|
if !setup_url.nil?
|
@@ -378,7 +382,7 @@ module OpenID
|
|
378
382
|
end
|
379
383
|
|
380
384
|
begin
|
381
|
-
idres = handle_idres(message,
|
385
|
+
idres = handle_idres(message, current_url)
|
382
386
|
rescue DiscoveryFailure, ProtocolError => why
|
383
387
|
return FailureResponse.new(last_requested_endpoint, why.message)
|
384
388
|
else
|
@@ -47,11 +47,11 @@ module OpenID
|
|
47
47
|
class IdResHandler
|
48
48
|
attr_reader :endpoint, :message
|
49
49
|
|
50
|
-
def initialize(message,
|
50
|
+
def initialize(message, current_url, store=nil, endpoint=nil)
|
51
51
|
@store = store # Fer the nonce and invalidate_handle
|
52
52
|
@message = message
|
53
53
|
@endpoint = endpoint
|
54
|
-
@
|
54
|
+
@current_url = current_url
|
55
55
|
@signed_list = nil
|
56
56
|
|
57
57
|
# Start the verification process
|
@@ -140,11 +140,11 @@ module OpenID
|
|
140
140
|
begin
|
141
141
|
msg_return_to = URI.parse(fetch('return_to'))
|
142
142
|
rescue URI::InvalidURIError
|
143
|
-
raise
|
143
|
+
raise ProtocolError, ("return_to is not a valid URI")
|
144
144
|
end
|
145
145
|
|
146
146
|
verify_return_to_args(msg_return_to)
|
147
|
-
if !@
|
147
|
+
if !@current_url.nil?
|
148
148
|
verify_return_to_base(msg_return_to)
|
149
149
|
end
|
150
150
|
end
|
@@ -177,9 +177,9 @@ module OpenID
|
|
177
177
|
|
178
178
|
def verify_return_to_base(msg_return_to)
|
179
179
|
begin
|
180
|
-
app_parsed = URI.parse(@
|
180
|
+
app_parsed = URI.parse(@current_url)
|
181
181
|
rescue URI::InvalidURIError
|
182
|
-
raise ProtocolError, "
|
182
|
+
raise ProtocolError, "current_url is not a valid URI: #{@current_url}"
|
183
183
|
end
|
184
184
|
|
185
185
|
[:scheme, :host, :port, :path].each do |meth|
|
@@ -425,8 +425,8 @@ module OpenID
|
|
425
425
|
if services.length == 0
|
426
426
|
# XXX: this might want to be something other than
|
427
427
|
# ProtocolError. In Python, it's DiscoveryFailure
|
428
|
-
raise ProtocolError("No OpenID information found at "\
|
429
|
-
|
428
|
+
raise ProtocolError, ("No OpenID information found at "\
|
429
|
+
"#{to_match.claimed_id}")
|
430
430
|
end
|
431
431
|
verify_discovered_services(services, to_match)
|
432
432
|
end
|
@@ -455,8 +455,8 @@ module OpenID
|
|
455
455
|
end
|
456
456
|
|
457
457
|
# XXX: is DiscoveryFailure in Python OpenID
|
458
|
-
raise ProtocolError("No matching endpoint found after "\
|
459
|
-
|
458
|
+
raise ProtocolError, ("No matching endpoint found after "\
|
459
|
+
"discovering #{to_match.claimed_id}")
|
460
460
|
end
|
461
461
|
|
462
462
|
def verify_discovery_single(endpoint, to_match)
|
data/lib/openid/fetchers.rb
CHANGED
@@ -99,6 +99,17 @@ module OpenID
|
|
99
99
|
@fetcher = fetcher
|
100
100
|
end
|
101
101
|
|
102
|
+
# Set the default fetcher to use the HTTP proxy defined in the environment
|
103
|
+
# variable 'http_proxy'.
|
104
|
+
def self.fetcher_use_env_http_proxy
|
105
|
+
proxy_string = ENV['http_proxy']
|
106
|
+
return unless proxy_string
|
107
|
+
|
108
|
+
proxy_uri = URI.parse(proxy_string)
|
109
|
+
@fetcher = StandardFetcher.new(proxy_uri.host, proxy_uri.port,
|
110
|
+
proxy_uri.user, proxy_uri.password)
|
111
|
+
end
|
112
|
+
|
102
113
|
class StandardFetcher
|
103
114
|
|
104
115
|
USER_AGENT = "ruby-openid/#{OpenID::VERSION} (#{PLATFORM})"
|
@@ -107,8 +118,11 @@ module OpenID
|
|
107
118
|
|
108
119
|
attr_accessor :ca_file
|
109
120
|
|
110
|
-
|
121
|
+
# I can fetch through a HTTP proxy; arguments are as for Net::HTTP::Proxy.
|
122
|
+
def initialize(proxy_addr=nil, proxy_port=nil,
|
123
|
+
proxy_user=nil, proxy_pass=nil)
|
111
124
|
@ca_file = nil
|
125
|
+
@proxy = Net::HTTP::Proxy(proxy_addr, proxy_port, proxy_user, proxy_pass)
|
112
126
|
end
|
113
127
|
|
114
128
|
def supports_ssl?(conn)
|
@@ -116,7 +130,7 @@ module OpenID
|
|
116
130
|
end
|
117
131
|
|
118
132
|
def make_http(uri)
|
119
|
-
|
133
|
+
@proxy.new(uri.host, uri.port)
|
120
134
|
end
|
121
135
|
|
122
136
|
def set_verified(conn, verify)
|
data/lib/openid/util.rb
CHANGED
data/test/test_fetchers.rb
CHANGED
@@ -470,3 +470,38 @@ class DefaultFetcherTest < Test::Unit::TestCase
|
|
470
470
|
assert(OpenID.fetcher.is_a?(OpenID::StandardFetcher))
|
471
471
|
end
|
472
472
|
end
|
473
|
+
|
474
|
+
class ProxyTest < Test::Unit::TestCase
|
475
|
+
def test_proxy_unreachable
|
476
|
+
assert_raise(Errno::ECONNREFUSED) {
|
477
|
+
f = OpenID::StandardFetcher.new('127.0.0.1', 1)
|
478
|
+
# If this tries to connect to the proxy (on port 1), I expect
|
479
|
+
# a 'connection refused' error. If it tries to contact the below
|
480
|
+
# URI first, it will get some other sort of error.
|
481
|
+
f.fetch("http://unittest.invalid")
|
482
|
+
}
|
483
|
+
end
|
484
|
+
|
485
|
+
def test_proxy_env
|
486
|
+
ENV['http_proxy'] = 'http://127.0.0.1:3128/'
|
487
|
+
OpenID.fetcher_use_env_http_proxy
|
488
|
+
|
489
|
+
# make_http just to give us something with readable attributes to inspect.
|
490
|
+
conn = OpenID.fetcher.make_http(URI.parse('http://127.0.0.2'))
|
491
|
+
assert_equal('127.0.0.1', conn.proxy_address)
|
492
|
+
assert_equal(3128, conn.proxy_port)
|
493
|
+
end
|
494
|
+
# These aren't fully automated tests, but if you start a proxy
|
495
|
+
# on port 8888 (tinyproxy's default) and check its logs...
|
496
|
+
# def test_proxy
|
497
|
+
# f = OpenID::StandardFetcher.new('127.0.0.1', 8888)
|
498
|
+
# result = f.fetch("http://www.example.com/")
|
499
|
+
# assert_match(/RFC.*2606/, result.body)
|
500
|
+
# end
|
501
|
+
|
502
|
+
# def test_proxy_https
|
503
|
+
# f = OpenID::StandardFetcher.new('127.0.0.1', 8888)
|
504
|
+
# result = f.fetch("https://www.myopenid.com/")
|
505
|
+
# assert_match(/myOpenID/, result.body)
|
506
|
+
# end
|
507
|
+
end
|
data/test/test_idres.rb
CHANGED
@@ -811,6 +811,46 @@ module OpenID
|
|
811
811
|
signed_fields.map {|f|'openid.' + f})
|
812
812
|
end
|
813
813
|
end
|
814
|
+
|
815
|
+
|
816
|
+
class DiscoverAndVerifyTest < Test::Unit::TestCase
|
817
|
+
include ProtocolErrorMixin
|
818
|
+
include TestUtil
|
819
|
+
|
820
|
+
def test_no_services
|
821
|
+
me = self
|
822
|
+
disco = Proc.new do |e|
|
823
|
+
me.assert_equal(e, :sentinel)
|
824
|
+
[:undefined, []]
|
825
|
+
end
|
826
|
+
endpoint = OpenIDServiceEndpoint.new
|
827
|
+
endpoint.claimed_id = :sentinel
|
828
|
+
idres = IdResHandler.new(nil, nil)
|
829
|
+
assert_log_matches('Performing discovery on') do
|
830
|
+
assert_protocol_error('No OpenID information found') do
|
831
|
+
OpenID.with_method_overridden(:discover, disco) do
|
832
|
+
idres.send(:discover_and_verify, endpoint)
|
833
|
+
end
|
834
|
+
end
|
835
|
+
end
|
836
|
+
end
|
837
|
+
end
|
838
|
+
|
839
|
+
class VerifyDiscoveredServicesTest < Test::Unit::TestCase
|
840
|
+
include ProtocolErrorMixin
|
841
|
+
include TestUtil
|
842
|
+
|
843
|
+
def test_no_services
|
844
|
+
endpoint = OpenIDServiceEndpoint.new
|
845
|
+
endpoint.claimed_id = :sentinel
|
846
|
+
idres = IdResHandler.new(nil, nil)
|
847
|
+
assert_log_matches('Discovery verification failure') do
|
848
|
+
assert_protocol_error('No matching endpoint') do
|
849
|
+
idres.send(:verify_discovered_services, [], endpoint)
|
850
|
+
end
|
851
|
+
end
|
852
|
+
end
|
853
|
+
end
|
814
854
|
end
|
815
855
|
end
|
816
856
|
end
|
metadata
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.9.
|
2
|
+
rubygems_version: 0.9.4
|
3
3
|
specification_version: 1
|
4
4
|
name: ruby-openid
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 2.0.
|
7
|
-
date: 2007-12-
|
6
|
+
version: 2.0.2
|
7
|
+
date: 2007-12-21 00:00:00 -08:00
|
8
8
|
summary: A library for consuming and serving OpenID identities.
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -29,251 +29,252 @@ post_install_message:
|
|
29
29
|
authors:
|
30
30
|
- JanRain, Inc
|
31
31
|
files:
|
32
|
-
- examples/README
|
33
|
-
- examples/active_record_openid_store
|
34
32
|
- examples/rails_openid_login_generator
|
35
33
|
- examples/rails_openid
|
34
|
+
- examples/README
|
36
35
|
- examples/discover
|
37
|
-
- examples/active_record_openid_store
|
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
|
49
|
-
- examples/rails_openid_login_generator/gemspec
|
36
|
+
- examples/active_record_openid_store
|
50
37
|
- examples/rails_openid_login_generator/USAGE
|
38
|
+
- examples/rails_openid_login_generator/gemspec
|
51
39
|
- examples/rails_openid_login_generator/openid_login_generator.rb
|
52
|
-
- examples/rails_openid_login_generator/templates
|
40
|
+
- examples/rails_openid_login_generator/templates
|
41
|
+
- examples/rails_openid_login_generator/templates/controller_test.rb
|
53
42
|
- examples/rails_openid_login_generator/templates/README
|
43
|
+
- examples/rails_openid_login_generator/templates/view_logout.rhtml
|
54
44
|
- examples/rails_openid_login_generator/templates/controller.rb
|
55
|
-
- examples/rails_openid_login_generator/templates/helper.rb
|
56
45
|
- examples/rails_openid_login_generator/templates/view_login.rhtml
|
57
|
-
- examples/rails_openid_login_generator/templates/
|
46
|
+
- examples/rails_openid_login_generator/templates/user.rb
|
47
|
+
- examples/rails_openid_login_generator/templates/openid_login_system.rb
|
58
48
|
- examples/rails_openid_login_generator/templates/view_welcome.rhtml
|
59
|
-
- examples/rails_openid_login_generator/templates/controller_test.rb
|
60
|
-
- examples/rails_openid_login_generator/templates/user_test.rb
|
61
49
|
- examples/rails_openid_login_generator/templates/users.yml
|
62
|
-
- examples/rails_openid_login_generator/templates/
|
63
|
-
- examples/
|
64
|
-
- examples/rails_openid/components
|
65
|
-
- examples/rails_openid/config
|
50
|
+
- examples/rails_openid_login_generator/templates/user_test.rb
|
51
|
+
- examples/rails_openid_login_generator/templates/helper.rb
|
66
52
|
- examples/rails_openid/db
|
53
|
+
- examples/rails_openid/app
|
67
54
|
- examples/rails_openid/doc
|
68
55
|
- examples/rails_openid/lib
|
69
56
|
- examples/rails_openid/log
|
70
|
-
- examples/rails_openid/public
|
71
|
-
- examples/rails_openid/script
|
72
57
|
- examples/rails_openid/test
|
73
|
-
- examples/rails_openid/vendor
|
74
58
|
- examples/rails_openid/Rakefile
|
75
59
|
- examples/rails_openid/README
|
60
|
+
- examples/rails_openid/components
|
61
|
+
- examples/rails_openid/config
|
62
|
+
- examples/rails_openid/public
|
63
|
+
- examples/rails_openid/script
|
64
|
+
- examples/rails_openid/vendor
|
65
|
+
- examples/rails_openid/app/views
|
76
66
|
- examples/rails_openid/app/controllers
|
77
|
-
- examples/rails_openid/app/helpers
|
78
67
|
- examples/rails_openid/app/models
|
79
|
-
- examples/rails_openid/app/
|
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
|
87
|
-
- examples/rails_openid/app/views/layouts
|
68
|
+
- examples/rails_openid/app/helpers
|
88
69
|
- examples/rails_openid/app/views/login
|
89
|
-
- examples/rails_openid/app/views/
|
70
|
+
- examples/rails_openid/app/views/layouts
|
90
71
|
- examples/rails_openid/app/views/consumer
|
91
|
-
- examples/rails_openid/app/views/
|
72
|
+
- examples/rails_openid/app/views/server
|
92
73
|
- examples/rails_openid/app/views/login/index.rhtml
|
93
|
-
- examples/rails_openid/app/views/server
|
74
|
+
- examples/rails_openid/app/views/layouts/server.rhtml
|
94
75
|
- examples/rails_openid/app/views/consumer/start.rhtml
|
95
76
|
- 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
|
96
97
|
- examples/rails_openid/config/environments
|
97
98
|
- examples/rails_openid/config/database.yml
|
98
|
-
- examples/rails_openid/config/boot.rb
|
99
99
|
- examples/rails_openid/config/environment.rb
|
100
|
-
- examples/rails_openid/config/
|
100
|
+
- examples/rails_openid/config/boot.rb
|
101
|
+
- examples/rails_openid/config/environments/test.rb
|
101
102
|
- examples/rails_openid/config/environments/development.rb
|
102
103
|
- examples/rails_openid/config/environments/production.rb
|
103
|
-
- examples/rails_openid/
|
104
|
-
- examples/rails_openid/doc/README_FOR_APP
|
105
|
-
- examples/rails_openid/lib/tasks
|
106
|
-
- examples/rails_openid/public/images
|
107
|
-
- examples/rails_openid/public/javascripts
|
108
|
-
- examples/rails_openid/public/stylesheets
|
109
|
-
- examples/rails_openid/public/dispatch.cgi
|
104
|
+
- examples/rails_openid/public/favicon.ico
|
110
105
|
- examples/rails_openid/public/404.html
|
111
|
-
- examples/rails_openid/public/
|
106
|
+
- examples/rails_openid/public/stylesheets
|
107
|
+
- examples/rails_openid/public/javascripts
|
108
|
+
- examples/rails_openid/public/robots.txt
|
109
|
+
- examples/rails_openid/public/images
|
112
110
|
- examples/rails_openid/public/dispatch.fcgi
|
111
|
+
- examples/rails_openid/public/500.html
|
113
112
|
- examples/rails_openid/public/dispatch.rb
|
114
|
-
- examples/rails_openid/public/
|
115
|
-
- examples/rails_openid/public/
|
116
|
-
- examples/rails_openid/public/images/openid_login_bg.gif
|
113
|
+
- examples/rails_openid/public/dispatch.cgi
|
114
|
+
- examples/rails_openid/public/javascripts/prototype.js
|
117
115
|
- examples/rails_openid/public/javascripts/controls.js
|
118
|
-
- examples/rails_openid/public/javascripts/dragdrop.js
|
119
116
|
- examples/rails_openid/public/javascripts/effects.js
|
120
|
-
- examples/rails_openid/public/javascripts/
|
121
|
-
- examples/rails_openid/
|
122
|
-
- examples/rails_openid/script/process
|
117
|
+
- examples/rails_openid/public/javascripts/dragdrop.js
|
118
|
+
- examples/rails_openid/public/images/openid_login_bg.gif
|
123
119
|
- examples/rails_openid/script/console
|
124
|
-
- examples/rails_openid/script/about
|
125
|
-
- examples/rails_openid/script/breakpointer
|
126
120
|
- examples/rails_openid/script/destroy
|
121
|
+
- examples/rails_openid/script/about
|
127
122
|
- examples/rails_openid/script/generate
|
123
|
+
- examples/rails_openid/script/breakpointer
|
128
124
|
- examples/rails_openid/script/plugin
|
129
|
-
- examples/rails_openid/script/runner
|
130
125
|
- examples/rails_openid/script/server
|
131
|
-
- examples/rails_openid/script/
|
132
|
-
- examples/rails_openid/script/
|
126
|
+
- examples/rails_openid/script/runner
|
127
|
+
- examples/rails_openid/script/process
|
128
|
+
- examples/rails_openid/script/performance
|
133
129
|
- examples/rails_openid/script/process/spawner
|
134
|
-
- examples/rails_openid/script/process/reaper
|
135
130
|
- examples/rails_openid/script/process/spinner
|
136
|
-
- examples/rails_openid/
|
137
|
-
- examples/rails_openid/
|
138
|
-
- examples/rails_openid/
|
139
|
-
- examples/
|
140
|
-
- examples/
|
141
|
-
- examples/
|
142
|
-
- examples/
|
143
|
-
- examples/
|
144
|
-
- examples/
|
145
|
-
- lib/
|
131
|
+
- examples/rails_openid/script/process/reaper
|
132
|
+
- examples/rails_openid/script/performance/benchmarker
|
133
|
+
- 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
|
146
145
|
- lib/hmac
|
147
146
|
- lib/openid.rb
|
148
|
-
- lib/openid
|
149
|
-
- lib/
|
147
|
+
- lib/openid
|
148
|
+
- lib/hmac/sha1.rb
|
149
|
+
- lib/hmac/sha2.rb
|
150
|
+
- lib/hmac/hmac.rb
|
151
|
+
- lib/openid/kvform.rb
|
150
152
|
- lib/openid/urinorm.rb
|
151
|
-
- lib/openid/util.rb
|
152
|
-
- lib/openid/trustroot.rb
|
153
153
|
- lib/openid/message.rb
|
154
|
-
- lib/openid/yadis
|
155
|
-
- lib/openid/consumer
|
156
|
-
- lib/openid/fetchers.rb
|
157
|
-
- lib/openid/dh.rb
|
158
|
-
- lib/openid/kvform.rb
|
159
154
|
- lib/openid/association.rb
|
155
|
+
- lib/openid/dh.rb
|
160
156
|
- 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/
|
162
|
+
- lib/openid/consumer
|
163
163
|
- lib/openid/protocolerror.rb
|
164
|
-
- lib/openid/server.rb
|
165
164
|
- lib/openid/extension.rb
|
166
|
-
- lib/openid/
|
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
|
167
175
|
- lib/openid/yadis/htmltokenizer.rb
|
176
|
+
- lib/openid/yadis/discovery.rb
|
168
177
|
- lib/openid/yadis/parsehtml.rb
|
169
|
-
- lib/openid/yadis/filters.rb
|
170
|
-
- lib/openid/yadis/xrds.rb
|
171
178
|
- lib/openid/yadis/accept.rb
|
172
179
|
- lib/openid/yadis/constants.rb
|
173
|
-
- lib/openid/yadis/discovery.rb
|
174
|
-
- lib/openid/yadis/xri.rb
|
175
180
|
- lib/openid/yadis/xrires.rb
|
181
|
+
- lib/openid/yadis/filters.rb
|
182
|
+
- lib/openid/yadis/xri.rb
|
176
183
|
- lib/openid/yadis/services.rb
|
177
|
-
- lib/openid/consumer/html_parse.rb
|
178
|
-
- lib/openid/consumer/idres.rb
|
179
|
-
- lib/openid/consumer/associationmanager.rb
|
180
184
|
- lib/openid/consumer/discovery.rb
|
185
|
+
- lib/openid/consumer/html_parse.rb
|
181
186
|
- lib/openid/consumer/discovery_manager.rb
|
182
|
-
- lib/openid/consumer/
|
187
|
+
- lib/openid/consumer/idres.rb
|
183
188
|
- lib/openid/consumer/responses.rb
|
184
|
-
- lib/openid/
|
185
|
-
- lib/openid/
|
186
|
-
- lib/openid/store/nonce.rb
|
187
|
-
- lib/openid/store/memory.rb
|
188
|
-
- lib/openid/extensions/sreg.rb
|
189
|
+
- lib/openid/consumer/checkid_request.rb
|
190
|
+
- lib/openid/consumer/associationmanager.rb
|
189
191
|
- lib/openid/extensions/ax.rb
|
192
|
+
- lib/openid/extensions/sreg.rb
|
190
193
|
- 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_association.rb
|
196
|
-
- test/test_urinorm.rb
|
197
|
-
- test/testutil.rb
|
198
|
-
- test/test_util.rb
|
199
|
-
- test/test_message.rb
|
200
|
-
- test/test_cryptutil.rb
|
201
|
-
- test/test_extras.rb
|
202
|
-
- test/util.rb
|
203
|
-
- test/test_trustroot.rb
|
204
|
-
- test/test_parsehtml.rb
|
205
|
-
- test/test_fetchers.rb
|
206
|
-
- test/test_dh.rb
|
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
195
|
- test/test_nonce.rb
|
214
|
-
- test/
|
215
|
-
- test/
|
216
|
-
- test/
|
217
|
-
- test/
|
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
|
218
201
|
- test/test_server.rb
|
202
|
+
- test/test_cryptutil.rb
|
219
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
|
220
208
|
- test/test_sreg.rb
|
209
|
+
- test/test_association.rb
|
210
|
+
- test/test_kvpost.rb
|
211
|
+
- test/test_xrires.rb
|
221
212
|
- test/test_idres.rb
|
222
|
-
- test/
|
213
|
+
- test/test_linkparse.rb
|
214
|
+
- 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
|
221
|
+
- test/util.rb
|
223
222
|
- test/test_xri.rb
|
224
|
-
- test/
|
223
|
+
- test/test_trustroot.rb
|
224
|
+
- test/test_extras.rb
|
225
|
+
- test/test_fetchers.rb
|
226
|
+
- test/test_associationmanager.rb
|
227
|
+
- test/testutil.rb
|
228
|
+
- test/test_kvform.rb
|
225
229
|
- test/test_discover.rb
|
226
|
-
- test/test_consumer.rb
|
227
|
-
- test/test_pape.rb
|
228
|
-
- test/test_checkid_request.rb
|
229
230
|
- test/test_discovery_manager.rb
|
230
|
-
- test/test_responses.rb
|
231
|
-
- test/data/test_xrds
|
232
|
-
- test/data/urinorm.txt
|
233
231
|
- test/data/n2b64
|
234
|
-
- test/data/
|
235
|
-
- test/data/dh.txt
|
236
|
-
- test/data/test1-parsehtml.txt
|
232
|
+
- test/data/test_discover
|
237
233
|
- test/data/linkparse.txt
|
234
|
+
- test/data/dh.txt
|
238
235
|
- test/data/accept.txt
|
239
|
-
- test/data/
|
236
|
+
- test/data/test1-parsehtml.txt
|
237
|
+
- test/data/urinorm.txt
|
240
238
|
- 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/
|
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
|
243
262
|
- test/data/test_xrds/README
|
244
263
|
- test/data/test_xrds/delegated-20060809-r1.xrds
|
245
264
|
- 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
|
250
265
|
- test/data/test_xrds/sometimesprefix.xrds
|
251
266
|
- test/data/test_xrds/spoof1.xrds
|
252
267
|
- test/data/test_xrds/spoof2.xrds
|
253
268
|
- test/data/test_xrds/spoof3.xrds
|
254
|
-
- test/data/test_xrds/status222.xrds
|
255
269
|
- test/data/test_xrds/valid-populated-xrds.xml
|
256
|
-
- test/data/test_xrds
|
257
|
-
- test/data/
|
258
|
-
- test/data/
|
259
|
-
- test/data/
|
260
|
-
-
|
261
|
-
-
|
262
|
-
- test/data/test_discover/openid_1_and_2_xrds.xml
|
263
|
-
- test/data/test_discover/openid_and_yadis.html
|
264
|
-
- test/data/test_discover/openid_1_and_2_xrds_bad_delegate.xml
|
265
|
-
- test/data/test_discover/openid_no_delegate.html
|
266
|
-
- test/data/test_discover/yadis_0entries.xml
|
267
|
-
- test/data/test_discover/yadis_2_bad_local_id.xml
|
268
|
-
- test/data/test_discover/yadis_2entries_delegate.xml
|
269
|
-
- test/data/test_discover/yadis_2entries_idp.xml
|
270
|
-
- test/data/test_discover/yadis_another_delegate.xml
|
271
|
-
- test/data/test_discover/yadis_idp.xml
|
272
|
-
- test/data/test_discover/yadis_idp_delegate.xml
|
273
|
-
- test/data/test_discover/yadis_no_delegate.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
|
274
|
+
- NOTICE
|
275
|
+
- CHANGELOG
|
274
276
|
- README
|
275
277
|
- INSTALL
|
276
|
-
- COPYING
|
277
278
|
- LICENSE
|
278
279
|
- UPGRADE
|
279
280
|
test_files:
|
@@ -284,7 +285,6 @@ rdoc_options:
|
|
284
285
|
extra_rdoc_files:
|
285
286
|
- README
|
286
287
|
- INSTALL
|
287
|
-
- COPYING
|
288
288
|
- LICENSE
|
289
289
|
- UPGRADE
|
290
290
|
executables: []
|
data/COPYING
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
Copyright 2006 JanRain, Inc.
|
2
|
-
|
3
|
-
Licensed under the Apache License, Version 2.0 (the "License"); you
|
4
|
-
may not use this file except in compliance with the License. You may
|
5
|
-
obtain a copy of the License at
|
6
|
-
|
7
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
|
9
|
-
Unless required by applicable law or agreed to in writing, software
|
10
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
12
|
-
implied. See the License for the specific language governing
|
13
|
-
permissions and limitations under the License.
|