pelle-ruby-openid 2.1.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (197) hide show
  1. data/CHANGELOG +215 -0
  2. data/CHANGES-2.1.0 +36 -0
  3. data/INSTALL +47 -0
  4. data/LICENSE +210 -0
  5. data/NOTICE +2 -0
  6. data/README +82 -0
  7. data/UPGRADE +127 -0
  8. data/VERSION +1 -0
  9. data/examples/README +32 -0
  10. data/examples/active_record_openid_store/README +58 -0
  11. data/examples/active_record_openid_store/XXX_add_open_id_store_to_db.rb +24 -0
  12. data/examples/active_record_openid_store/XXX_upgrade_open_id_store.rb +26 -0
  13. data/examples/active_record_openid_store/init.rb +8 -0
  14. data/examples/active_record_openid_store/lib/association.rb +10 -0
  15. data/examples/active_record_openid_store/lib/nonce.rb +3 -0
  16. data/examples/active_record_openid_store/lib/open_id_setting.rb +4 -0
  17. data/examples/active_record_openid_store/lib/openid_ar_store.rb +57 -0
  18. data/examples/active_record_openid_store/test/store_test.rb +212 -0
  19. data/examples/discover +49 -0
  20. data/examples/rails_openid/README +153 -0
  21. data/examples/rails_openid/Rakefile +10 -0
  22. data/examples/rails_openid/app/controllers/application.rb +4 -0
  23. data/examples/rails_openid/app/controllers/consumer_controller.rb +122 -0
  24. data/examples/rails_openid/app/controllers/login_controller.rb +45 -0
  25. data/examples/rails_openid/app/controllers/server_controller.rb +265 -0
  26. data/examples/rails_openid/app/helpers/application_helper.rb +3 -0
  27. data/examples/rails_openid/app/helpers/login_helper.rb +2 -0
  28. data/examples/rails_openid/app/helpers/server_helper.rb +9 -0
  29. data/examples/rails_openid/app/views/consumer/index.rhtml +81 -0
  30. data/examples/rails_openid/app/views/layouts/server.rhtml +68 -0
  31. data/examples/rails_openid/app/views/login/index.rhtml +56 -0
  32. data/examples/rails_openid/app/views/server/decide.rhtml +26 -0
  33. data/examples/rails_openid/config/boot.rb +19 -0
  34. data/examples/rails_openid/config/database.yml +74 -0
  35. data/examples/rails_openid/config/environment.rb +54 -0
  36. data/examples/rails_openid/config/environments/development.rb +19 -0
  37. data/examples/rails_openid/config/environments/production.rb +19 -0
  38. data/examples/rails_openid/config/environments/test.rb +19 -0
  39. data/examples/rails_openid/config/routes.rb +24 -0
  40. data/examples/rails_openid/doc/README_FOR_APP +2 -0
  41. data/examples/rails_openid/public/.htaccess +40 -0
  42. data/examples/rails_openid/public/404.html +8 -0
  43. data/examples/rails_openid/public/500.html +8 -0
  44. data/examples/rails_openid/public/dispatch.cgi +12 -0
  45. data/examples/rails_openid/public/dispatch.fcgi +26 -0
  46. data/examples/rails_openid/public/dispatch.rb +12 -0
  47. data/examples/rails_openid/public/favicon.ico +0 -0
  48. data/examples/rails_openid/public/images/openid_login_bg.gif +0 -0
  49. data/examples/rails_openid/public/javascripts/controls.js +750 -0
  50. data/examples/rails_openid/public/javascripts/dragdrop.js +584 -0
  51. data/examples/rails_openid/public/javascripts/effects.js +854 -0
  52. data/examples/rails_openid/public/javascripts/prototype.js +1785 -0
  53. data/examples/rails_openid/public/robots.txt +1 -0
  54. data/examples/rails_openid/script/about +3 -0
  55. data/examples/rails_openid/script/breakpointer +3 -0
  56. data/examples/rails_openid/script/console +3 -0
  57. data/examples/rails_openid/script/destroy +3 -0
  58. data/examples/rails_openid/script/generate +3 -0
  59. data/examples/rails_openid/script/performance/benchmarker +3 -0
  60. data/examples/rails_openid/script/performance/profiler +3 -0
  61. data/examples/rails_openid/script/plugin +3 -0
  62. data/examples/rails_openid/script/process/reaper +3 -0
  63. data/examples/rails_openid/script/process/spawner +3 -0
  64. data/examples/rails_openid/script/process/spinner +3 -0
  65. data/examples/rails_openid/script/runner +3 -0
  66. data/examples/rails_openid/script/server +3 -0
  67. data/examples/rails_openid/test/functional/login_controller_test.rb +18 -0
  68. data/examples/rails_openid/test/functional/server_controller_test.rb +18 -0
  69. data/examples/rails_openid/test/test_helper.rb +28 -0
  70. data/lib/hmac/hmac.rb +112 -0
  71. data/lib/hmac/sha1.rb +11 -0
  72. data/lib/hmac/sha2.rb +25 -0
  73. data/lib/openid/association.rb +249 -0
  74. data/lib/openid/consumer/associationmanager.rb +344 -0
  75. data/lib/openid/consumer/checkid_request.rb +186 -0
  76. data/lib/openid/consumer/discovery.rb +498 -0
  77. data/lib/openid/consumer/discovery_manager.rb +123 -0
  78. data/lib/openid/consumer/html_parse.rb +134 -0
  79. data/lib/openid/consumer/idres.rb +523 -0
  80. data/lib/openid/consumer/responses.rb +148 -0
  81. data/lib/openid/consumer.rb +395 -0
  82. data/lib/openid/cryptutil.rb +97 -0
  83. data/lib/openid/dh.rb +89 -0
  84. data/lib/openid/extension.rb +39 -0
  85. data/lib/openid/extensions/ax.rb +516 -0
  86. data/lib/openid/extensions/oauth.rb +91 -0
  87. data/lib/openid/extensions/pape.rb +179 -0
  88. data/lib/openid/extensions/sreg.rb +277 -0
  89. data/lib/openid/extras.rb +11 -0
  90. data/lib/openid/fetchers.rb +238 -0
  91. data/lib/openid/kvform.rb +136 -0
  92. data/lib/openid/kvpost.rb +58 -0
  93. data/lib/openid/message.rb +553 -0
  94. data/lib/openid/protocolerror.rb +8 -0
  95. data/lib/openid/server.rb +1544 -0
  96. data/lib/openid/store/filesystem.rb +271 -0
  97. data/lib/openid/store/interface.rb +75 -0
  98. data/lib/openid/store/memcache.rb +107 -0
  99. data/lib/openid/store/memory.rb +84 -0
  100. data/lib/openid/store/nonce.rb +68 -0
  101. data/lib/openid/trustroot.rb +349 -0
  102. data/lib/openid/urinorm.rb +75 -0
  103. data/lib/openid/util.rb +110 -0
  104. data/lib/openid/yadis/accept.rb +148 -0
  105. data/lib/openid/yadis/constants.rb +21 -0
  106. data/lib/openid/yadis/discovery.rb +153 -0
  107. data/lib/openid/yadis/filters.rb +205 -0
  108. data/lib/openid/yadis/htmltokenizer.rb +305 -0
  109. data/lib/openid/yadis/parsehtml.rb +45 -0
  110. data/lib/openid/yadis/services.rb +42 -0
  111. data/lib/openid/yadis/xrds.rb +155 -0
  112. data/lib/openid/yadis/xri.rb +90 -0
  113. data/lib/openid/yadis/xrires.rb +106 -0
  114. data/lib/openid.rb +20 -0
  115. data/setup.rb +1551 -0
  116. data/test/data/accept.txt +124 -0
  117. data/test/data/dh.txt +29 -0
  118. data/test/data/example-xrds.xml +14 -0
  119. data/test/data/linkparse.txt +587 -0
  120. data/test/data/n2b64 +650 -0
  121. data/test/data/test1-discover.txt +137 -0
  122. data/test/data/test1-parsehtml.txt +152 -0
  123. data/test/data/test_discover/malformed_meta_tag.html +19 -0
  124. data/test/data/test_discover/openid.html +11 -0
  125. data/test/data/test_discover/openid2.html +11 -0
  126. data/test/data/test_discover/openid2_xrds.xml +12 -0
  127. data/test/data/test_discover/openid2_xrds_no_local_id.xml +11 -0
  128. data/test/data/test_discover/openid_1_and_2.html +11 -0
  129. data/test/data/test_discover/openid_1_and_2_xrds.xml +16 -0
  130. data/test/data/test_discover/openid_1_and_2_xrds_bad_delegate.xml +17 -0
  131. data/test/data/test_discover/openid_and_yadis.html +12 -0
  132. data/test/data/test_discover/openid_no_delegate.html +10 -0
  133. data/test/data/test_discover/yadis_0entries.xml +12 -0
  134. data/test/data/test_discover/yadis_2_bad_local_id.xml +15 -0
  135. data/test/data/test_discover/yadis_2entries_delegate.xml +22 -0
  136. data/test/data/test_discover/yadis_2entries_idp.xml +21 -0
  137. data/test/data/test_discover/yadis_another_delegate.xml +14 -0
  138. data/test/data/test_discover/yadis_idp.xml +12 -0
  139. data/test/data/test_discover/yadis_idp_delegate.xml +13 -0
  140. data/test/data/test_discover/yadis_no_delegate.xml +11 -0
  141. data/test/data/test_xrds/=j3h.2007.11.14.xrds +25 -0
  142. data/test/data/test_xrds/README +12 -0
  143. data/test/data/test_xrds/delegated-20060809-r1.xrds +34 -0
  144. data/test/data/test_xrds/delegated-20060809-r2.xrds +34 -0
  145. data/test/data/test_xrds/delegated-20060809.xrds +34 -0
  146. data/test/data/test_xrds/no-xrd.xml +7 -0
  147. data/test/data/test_xrds/not-xrds.xml +2 -0
  148. data/test/data/test_xrds/prefixsometimes.xrds +34 -0
  149. data/test/data/test_xrds/ref.xrds +109 -0
  150. data/test/data/test_xrds/sometimesprefix.xrds +34 -0
  151. data/test/data/test_xrds/spoof1.xrds +25 -0
  152. data/test/data/test_xrds/spoof2.xrds +25 -0
  153. data/test/data/test_xrds/spoof3.xrds +37 -0
  154. data/test/data/test_xrds/status222.xrds +9 -0
  155. data/test/data/test_xrds/subsegments.xrds +58 -0
  156. data/test/data/test_xrds/valid-populated-xrds.xml +39 -0
  157. data/test/data/trustroot.txt +153 -0
  158. data/test/data/urinorm.txt +79 -0
  159. data/test/discoverdata.rb +131 -0
  160. data/test/test_accept.rb +170 -0
  161. data/test/test_association.rb +266 -0
  162. data/test/test_associationmanager.rb +917 -0
  163. data/test/test_ax.rb +648 -0
  164. data/test/test_checkid_request.rb +294 -0
  165. data/test/test_consumer.rb +257 -0
  166. data/test/test_cryptutil.rb +119 -0
  167. data/test/test_dh.rb +86 -0
  168. data/test/test_discover.rb +838 -0
  169. data/test/test_discovery_manager.rb +262 -0
  170. data/test/test_extension.rb +46 -0
  171. data/test/test_extras.rb +35 -0
  172. data/test/test_fetchers.rb +538 -0
  173. data/test/test_filters.rb +270 -0
  174. data/test/test_idres.rb +963 -0
  175. data/test/test_kvform.rb +165 -0
  176. data/test/test_kvpost.rb +65 -0
  177. data/test/test_linkparse.rb +101 -0
  178. data/test/test_message.rb +1116 -0
  179. data/test/test_nonce.rb +89 -0
  180. data/test/test_oauth.rb +175 -0
  181. data/test/test_openid_yadis.rb +178 -0
  182. data/test/test_pape.rb +247 -0
  183. data/test/test_parsehtml.rb +80 -0
  184. data/test/test_responses.rb +63 -0
  185. data/test/test_server.rb +2457 -0
  186. data/test/test_sreg.rb +479 -0
  187. data/test/test_stores.rb +298 -0
  188. data/test/test_trustroot.rb +113 -0
  189. data/test/test_urinorm.rb +35 -0
  190. data/test/test_util.rb +145 -0
  191. data/test/test_xrds.rb +169 -0
  192. data/test/test_xri.rb +48 -0
  193. data/test/test_xrires.rb +63 -0
  194. data/test/test_yadis_discovery.rb +220 -0
  195. data/test/testutil.rb +127 -0
  196. data/test/util.rb +53 -0
  197. metadata +316 -0
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/CHANGES-2.1.0 ADDED
@@ -0,0 +1,36 @@
1
+
2
+ * API Changes
3
+ * PAPE (Provider Authentication Policy Extension) module
4
+ * Updated extension for specification draft 2
5
+ * PAPE::Request::from_success_response returns nil if PAPE
6
+ response arguments were not signed
7
+ * Added functions to generate request/response HTML forms with
8
+ auto-submission javascript
9
+ * Consumer (relying party) API:
10
+ Auth_OpenID_AuthRequest::htmlMarkup
11
+ * Server API: Auth_OpenID_OpenIDResponse::toHTML
12
+ * Removed Rails login generator
13
+ * SReg::Response::from_success_response returns nil when no signed
14
+ arguments were found
15
+
16
+ * New Features
17
+ * Fetchers now only read/request first megabyte of response
18
+
19
+ * Bug fixes
20
+ * NOT NULL constraints to tables created by ActiveRecordStore
21
+ * check_authentication requests: copy entire response, not just
22
+ signed fields. Fixes missing namespace in check_authentication
23
+ requests
24
+ * OpenID 1 association requests no longer explicitly set
25
+ no-encryption session type
26
+ * Improved HTML parsing
27
+ * AssociationRequest::answer: include session_type in
28
+ no-encryption assoc responses
29
+ * normalize return_to URL before performing return_to verification
30
+ * OpenID::Consumer::IdResHandler.verify_discovery_results_openid1:
31
+ fall back to OpenID 1.0 type if 1.1 endpoint cannot be found
32
+ * StandardFetcher now includes a timeout setting
33
+ * Handle blank content types in
34
+ OpenID::Yadis::DiscoveryResult.where_is_yadis?
35
+ * Properly convert timestamps to ints before storing in DB, and vise
36
+ versa
data/INSTALL ADDED
@@ -0,0 +1,47 @@
1
+ = Ruby OpenID Library Installation
2
+
3
+ == Rubygems Installation
4
+
5
+ Rubygems is a tool for installing ruby libraries and their
6
+ dependancies. If you have rubygems installed, simply:
7
+
8
+ gem install ruby-openid
9
+
10
+ == Manual Installation
11
+
12
+ Unpack the archive and run setup.rb to install:
13
+
14
+ ruby setup.rb
15
+
16
+ setup.rb installs the library into your system ruby. If don't want to
17
+ add openid to you system ruby, you may instead add the *lib* directory of
18
+ the extracted tarball to your RUBYLIB environment variable:
19
+
20
+ $ export RUBYLIB=${RUBYLIB}:/path/to/ruby-openid/lib
21
+
22
+
23
+ == Testing the Installation
24
+
25
+ Make sure everything installed ok:
26
+ $> irb
27
+ irb$> require "openid"
28
+ => true
29
+
30
+ Or, if you installed via rubygems:
31
+
32
+ $> irb
33
+ irb$> require "rubygems"
34
+ => true
35
+ irb$> require_gem "ruby-openid"
36
+ => true
37
+
38
+ == Run the test suite
39
+
40
+ Go into the test directory and execute the *runtests.rb* script.
41
+
42
+ == Next steps
43
+
44
+ * Run consumer.rb in the examples directory.
45
+ * Get started writing your own consumer using OpenID::Consumer
46
+ * Write your own server with OpenID::Server
47
+ * Use the OpenIDLoginGenerator! Read example/README for more info.
data/LICENSE ADDED
@@ -0,0 +1,210 @@
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
+ lib/openid/yadis/htmltokenizer.rb is Copyright 2004 by Ben Giddings and
5
+ distributed under the terms of the Ruby license.
6
+
7
+ The remainder of this package is Copyright 2006-2008 by JanRain, Inc. and
8
+ distributed under the terms of license below:
9
+
10
+ Apache License
11
+ Version 2.0, January 2004
12
+ http://www.apache.org/licenses/
13
+
14
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
15
+
16
+ 1. Definitions.
17
+
18
+ "License" shall mean the terms and conditions for use, reproduction,
19
+ and distribution as defined by Sections 1 through 9 of this document.
20
+
21
+ "Licensor" shall mean the copyright owner or entity authorized by
22
+ the copyright owner that is granting the License.
23
+
24
+ "Legal Entity" shall mean the union of the acting entity and all
25
+ other entities that control, are controlled by, or are under common
26
+ control with that entity. For the purposes of this definition,
27
+ "control" means (i) the power, direct or indirect, to cause the
28
+ direction or management of such entity, whether by contract or
29
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
30
+ outstanding shares, or (iii) beneficial ownership of such entity.
31
+
32
+ "You" (or "Your") shall mean an individual or Legal Entity
33
+ exercising permissions granted by this License.
34
+
35
+ "Source" form shall mean the preferred form for making modifications,
36
+ including but not limited to software source code, documentation
37
+ source, and configuration files.
38
+
39
+ "Object" form shall mean any form resulting from mechanical
40
+ transformation or translation of a Source form, including but
41
+ not limited to compiled object code, generated documentation,
42
+ and conversions to other media types.
43
+
44
+ "Work" shall mean the work of authorship, whether in Source or
45
+ Object form, made available under the License, as indicated by a
46
+ copyright notice that is included in or attached to the work
47
+ (an example is provided in the Appendix below).
48
+
49
+ "Derivative Works" shall mean any work, whether in Source or Object
50
+ form, that is based on (or derived from) the Work and for which the
51
+ editorial revisions, annotations, elaborations, or other modifications
52
+ represent, as a whole, an original work of authorship. For the purposes
53
+ of this License, Derivative Works shall not include works that remain
54
+ separable from, or merely link (or bind by name) to the interfaces of,
55
+ the Work and Derivative Works thereof.
56
+
57
+ "Contribution" shall mean any work of authorship, including
58
+ the original version of the Work and any modifications or additions
59
+ to that Work or Derivative Works thereof, that is intentionally
60
+ submitted to Licensor for inclusion in the Work by the copyright owner
61
+ or by an individual or Legal Entity authorized to submit on behalf of
62
+ the copyright owner. For the purposes of this definition, "submitted"
63
+ means any form of electronic, verbal, or written communication sent
64
+ to the Licensor or its representatives, including but not limited to
65
+ communication on electronic mailing lists, source code control systems,
66
+ and issue tracking systems that are managed by, or on behalf of, the
67
+ Licensor for the purpose of discussing and improving the Work, but
68
+ excluding communication that is conspicuously marked or otherwise
69
+ designated in writing by the copyright owner as "Not a Contribution."
70
+
71
+ "Contributor" shall mean Licensor and any individual or Legal Entity
72
+ on behalf of whom a Contribution has been received by Licensor and
73
+ subsequently incorporated within the Work.
74
+
75
+ 2. Grant of Copyright License. Subject to the terms and conditions of
76
+ this License, each Contributor hereby grants to You a perpetual,
77
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
78
+ copyright license to reproduce, prepare Derivative Works of,
79
+ publicly display, publicly perform, sublicense, and distribute the
80
+ Work and such Derivative Works in Source or Object form.
81
+
82
+ 3. Grant of Patent License. Subject to the terms and conditions of
83
+ this License, each Contributor hereby grants to You a perpetual,
84
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
85
+ (except as stated in this section) patent license to make, have made,
86
+ use, offer to sell, sell, import, and otherwise transfer the Work,
87
+ where such license applies only to those patent claims licensable
88
+ by such Contributor that are necessarily infringed by their
89
+ Contribution(s) alone or by combination of their Contribution(s)
90
+ with the Work to which such Contribution(s) was submitted. If You
91
+ institute patent litigation against any entity (including a
92
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
93
+ or a Contribution incorporated within the Work constitutes direct
94
+ or contributory patent infringement, then any patent licenses
95
+ granted to You under this License for that Work shall terminate
96
+ as of the date such litigation is filed.
97
+
98
+ 4. Redistribution. You may reproduce and distribute copies of the
99
+ Work or Derivative Works thereof in any medium, with or without
100
+ modifications, and in Source or Object form, provided that You
101
+ meet the following conditions:
102
+
103
+ (a) You must give any other recipients of the Work or
104
+ Derivative Works a copy of this License; and
105
+
106
+ (b) You must cause any modified files to carry prominent notices
107
+ stating that You changed the files; and
108
+
109
+ (c) You must retain, in the Source form of any Derivative Works
110
+ that You distribute, all copyright, patent, trademark, and
111
+ attribution notices from the Source form of the Work,
112
+ excluding those notices that do not pertain to any part of
113
+ the Derivative Works; and
114
+
115
+ (d) If the Work includes a "NOTICE" text file as part of its
116
+ distribution, then any Derivative Works that You distribute must
117
+ include a readable copy of the attribution notices contained
118
+ within such NOTICE file, excluding those notices that do not
119
+ pertain to any part of the Derivative Works, in at least one
120
+ of the following places: within a NOTICE text file distributed
121
+ as part of the Derivative Works; within the Source form or
122
+ documentation, if provided along with the Derivative Works; or,
123
+ within a display generated by the Derivative Works, if and
124
+ wherever such third-party notices normally appear. The contents
125
+ of the NOTICE file are for informational purposes only and
126
+ do not modify the License. You may add Your own attribution
127
+ notices within Derivative Works that You distribute, alongside
128
+ or as an addendum to the NOTICE text from the Work, provided
129
+ that such additional attribution notices cannot be construed
130
+ as modifying the License.
131
+
132
+ You may add Your own copyright statement to Your modifications and
133
+ may provide additional or different license terms and conditions
134
+ for use, reproduction, or distribution of Your modifications, or
135
+ for any such Derivative Works as a whole, provided Your use,
136
+ reproduction, and distribution of the Work otherwise complies with
137
+ the conditions stated in this License.
138
+
139
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
140
+ any Contribution intentionally submitted for inclusion in the Work
141
+ by You to the Licensor shall be under the terms and conditions of
142
+ this License, without any additional terms or conditions.
143
+ Notwithstanding the above, nothing herein shall supersede or modify
144
+ the terms of any separate license agreement you may have executed
145
+ with Licensor regarding such Contributions.
146
+
147
+ 6. Trademarks. This License does not grant permission to use the trade
148
+ names, trademarks, service marks, or product names of the Licensor,
149
+ except as required for reasonable and customary use in describing the
150
+ origin of the Work and reproducing the content of the NOTICE file.
151
+
152
+ 7. Disclaimer of Warranty. Unless required by applicable law or
153
+ agreed to in writing, Licensor provides the Work (and each
154
+ Contributor provides its Contributions) on an "AS IS" BASIS,
155
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
156
+ implied, including, without limitation, any warranties or conditions
157
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
158
+ PARTICULAR PURPOSE. You are solely responsible for determining the
159
+ appropriateness of using or redistributing the Work and assume any
160
+ risks associated with Your exercise of permissions under this License.
161
+
162
+ 8. Limitation of Liability. In no event and under no legal theory,
163
+ whether in tort (including negligence), contract, or otherwise,
164
+ unless required by applicable law (such as deliberate and grossly
165
+ negligent acts) or agreed to in writing, shall any Contributor be
166
+ liable to You for damages, including any direct, indirect, special,
167
+ incidental, or consequential damages of any character arising as a
168
+ result of this License or out of the use or inability to use the
169
+ Work (including but not limited to damages for loss of goodwill,
170
+ work stoppage, computer failure or malfunction, or any and all
171
+ other commercial damages or losses), even if such Contributor
172
+ has been advised of the possibility of such damages.
173
+
174
+ 9. Accepting Warranty or Additional Liability. While redistributing
175
+ the Work or Derivative Works thereof, You may choose to offer,
176
+ and charge a fee for, acceptance of support, warranty, indemnity,
177
+ or other liability obligations and/or rights consistent with this
178
+ License. However, in accepting such obligations, You may act only
179
+ on Your own behalf and on Your sole responsibility, not on behalf
180
+ of any other Contributor, and only if You agree to indemnify,
181
+ defend, and hold each Contributor harmless for any liability
182
+ incurred by, or claims asserted against, such Contributor by reason
183
+ of your accepting any such warranty or additional liability.
184
+
185
+ END OF TERMS AND CONDITIONS
186
+
187
+ APPENDIX: How to apply the Apache License to your work.
188
+
189
+ To apply the Apache License to your work, attach the following
190
+ boilerplate notice, with the fields enclosed by brackets "[]"
191
+ replaced with your own identifying information. (Don't include
192
+ the brackets!) The text should be enclosed in the appropriate
193
+ comment syntax for the file format. We also recommend that a
194
+ file or class name and description of purpose be included on the
195
+ same "printed page" as the copyright notice for easier
196
+ identification within third-party archives.
197
+
198
+ Copyright [yyyy] [name of copyright owner]
199
+
200
+ Licensed under the Apache License, Version 2.0 (the "License");
201
+ you may not use this file except in compliance with the License.
202
+ You may obtain a copy of the License at
203
+
204
+ http://www.apache.org/licenses/LICENSE-2.0
205
+
206
+ Unless required by applicable law or agreed to in writing, software
207
+ distributed under the License is distributed on an "AS IS" BASIS,
208
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
209
+ See the License for the specific language governing permissions and
210
+ limitations under the License.
data/NOTICE ADDED
@@ -0,0 +1,2 @@
1
+ This product includes software developed by JanRain,
2
+ available from http://openidenabled.com/
data/README ADDED
@@ -0,0 +1,82 @@
1
+ =Ruby OpenID
2
+
3
+ A Ruby library for verifying and serving OpenID identities.
4
+
5
+ ==Features
6
+ * Easy to use API for verifying OpenID identites - OpenID::Consumer
7
+ * Support for serving OpenID identites - OpenID::Server
8
+ * Does not depend on underlying web framework
9
+ * Supports multiple storage mechanisms (Filesystem, ActiveRecord, Memory)
10
+ * Example code to help you get started, including:
11
+ * Ruby on Rails based consumer and server
12
+ * OpenIDLoginGenerator for quickly getting creating a rails app that uses
13
+ OpenID for authentication
14
+ * ActiveRecordOpenIDStore plugin
15
+ * Comprehensive test suite
16
+ * Supports both OpenID 1 and OpenID 2 transparently
17
+
18
+ ==Installing
19
+ Before running the examples or writing your own code you'll need to install
20
+ the library. See the INSTALL file or use rubygems:
21
+
22
+ gem install ruby-openid
23
+
24
+ Check the installation:
25
+
26
+ $ irb
27
+ irb> require 'rubygems'
28
+ irb> require_gem 'ruby-openid'
29
+ => true
30
+
31
+ The library is known to work with Ruby 1.8.4 on Unix, Max OSX and
32
+ Win32. Examples have been tested with Rails 1.1 and 1.2, and 2.0.
33
+
34
+ ==Getting Started
35
+ The best way to start is to look at the rails_openid example.
36
+ You can run it with:
37
+ cd examples/rails_openid
38
+ script/server
39
+
40
+ If you are writing an OpenID Relying Party, a good place to start is:
41
+ examples/rails_openid/app/controllers/consumer_controller.rb
42
+
43
+ And if you are writing an OpenID provider:
44
+ examples/rails_openid/app/controllers/server_controller.rb
45
+
46
+ The library code is quite well documented, so don't be squeamish, and
47
+ look at the library itself if there's anything you don't understand in
48
+ the examples.
49
+
50
+ ==Homepage
51
+ http://openidenabled.com/ruby-openid/
52
+
53
+ See also:
54
+ http://openid.net/
55
+ http://openidenabled.com/
56
+
57
+ ==Community
58
+ Discussion regarding the Ruby OpenID library and other JanRain OpenID
59
+ libraries takes place on the the OpenID mailing list on
60
+ openidenabled.com.
61
+
62
+ http://lists.openidenabled.com/mailman/listinfo/dev
63
+
64
+ Please join this list to discuss, ask implementation questions, report
65
+ bugs, etc. Also check out the openid channel on the freenode IRC
66
+ network.
67
+
68
+ If you have a bugfix or feature you'd like to contribute, don't
69
+ hesitate to send it to us. For more detailed information on how to
70
+ contribute, see
71
+
72
+ http://openidenabled.com/contribute/
73
+
74
+ ==Author
75
+ Copyright 2006-2008, JanRain, Inc.
76
+
77
+ Contact openid@janrain.com or visit the OpenID channel on pibb.com:
78
+
79
+ http://pibb.com/go/openid
80
+
81
+ ==License
82
+ Apache Software License. For more information see the LICENSE file.