Permalink
Browse files

Import from darcs HEAD from http://openidenabled.com/files/ruby-openi…

  • Loading branch information...
pelle committed Sep 26, 2009
0 parents commit 3714803c704a65ec15d4af299a83f869439c9dd9
Showing with 32,032 additions and 0 deletions.
  1. +1 −0 .gitignore
  2. +215 −0 CHANGELOG
  3. +36 −0 CHANGES-2.1.0
  4. +47 −0 INSTALL
  5. +210 −0 LICENSE
  6. +2 −0 NOTICE
  7. +82 −0 README
  8. +127 −0 UPGRADE
  9. +12 −0 admin/build-docs
  10. +36 −0 admin/darcs-ignore
  11. +11 −0 admin/fixperms
  12. +47 −0 admin/gettlds.py
  13. +30 −0 admin/graph-require.sh
  14. +1 −0 admin/library-name
  15. +13 −0 admin/mkassoc
  16. +24 −0 admin/prepare-release
  17. +15 −0 admin/runtests
  18. +45 −0 admin/runtests.rb
  19. +32 −0 examples/README
  20. +58 −0 examples/active_record_openid_store/README
  21. +24 −0 examples/active_record_openid_store/XXX_add_open_id_store_to_db.rb
  22. +26 −0 examples/active_record_openid_store/XXX_upgrade_open_id_store.rb
  23. +8 −0 examples/active_record_openid_store/init.rb
  24. +10 −0 examples/active_record_openid_store/lib/association.rb
  25. +3 −0 examples/active_record_openid_store/lib/nonce.rb
  26. +4 −0 examples/active_record_openid_store/lib/open_id_setting.rb
  27. +57 −0 examples/active_record_openid_store/lib/openid_ar_store.rb
  28. +212 −0 examples/active_record_openid_store/test/store_test.rb
  29. +49 −0 examples/discover
  30. +153 −0 examples/rails_openid/README
  31. +10 −0 examples/rails_openid/Rakefile
  32. +4 −0 examples/rails_openid/app/controllers/application.rb
  33. +122 −0 examples/rails_openid/app/controllers/consumer_controller.rb
  34. +45 −0 examples/rails_openid/app/controllers/login_controller.rb
  35. +265 −0 examples/rails_openid/app/controllers/server_controller.rb
  36. +3 −0 examples/rails_openid/app/helpers/application_helper.rb
  37. +2 −0 examples/rails_openid/app/helpers/login_helper.rb
  38. +9 −0 examples/rails_openid/app/helpers/server_helper.rb
  39. +81 −0 examples/rails_openid/app/views/consumer/index.rhtml
  40. +68 −0 examples/rails_openid/app/views/layouts/server.rhtml
  41. +56 −0 examples/rails_openid/app/views/login/index.rhtml
  42. +26 −0 examples/rails_openid/app/views/server/decide.rhtml
  43. +19 −0 examples/rails_openid/config/boot.rb
  44. +74 −0 examples/rails_openid/config/database.yml
  45. +54 −0 examples/rails_openid/config/environment.rb
  46. +19 −0 examples/rails_openid/config/environments/development.rb
  47. +19 −0 examples/rails_openid/config/environments/production.rb
  48. +19 −0 examples/rails_openid/config/environments/test.rb
  49. +24 −0 examples/rails_openid/config/routes.rb
  50. +2 −0 examples/rails_openid/doc/README_FOR_APP
  51. +40 −0 examples/rails_openid/public/.htaccess
  52. +8 −0 examples/rails_openid/public/404.html
  53. +8 −0 examples/rails_openid/public/500.html
  54. +12 −0 examples/rails_openid/public/dispatch.cgi
  55. +26 −0 examples/rails_openid/public/dispatch.fcgi
  56. +12 −0 examples/rails_openid/public/dispatch.rb
  57. 0 examples/rails_openid/public/favicon.ico
  58. BIN examples/rails_openid/public/images/openid_login_bg.gif
  59. +750 −0 examples/rails_openid/public/javascripts/controls.js
  60. +584 −0 examples/rails_openid/public/javascripts/dragdrop.js
  61. +854 −0 examples/rails_openid/public/javascripts/effects.js
  62. +1,785 −0 examples/rails_openid/public/javascripts/prototype.js
  63. +1 −0 examples/rails_openid/public/robots.txt
  64. +3 −0 examples/rails_openid/script/about
  65. +3 −0 examples/rails_openid/script/breakpointer
  66. +3 −0 examples/rails_openid/script/console
  67. +3 −0 examples/rails_openid/script/destroy
  68. +3 −0 examples/rails_openid/script/generate
  69. +3 −0 examples/rails_openid/script/performance/benchmarker
  70. +3 −0 examples/rails_openid/script/performance/profiler
  71. +3 −0 examples/rails_openid/script/plugin
  72. +3 −0 examples/rails_openid/script/process/reaper
  73. +3 −0 examples/rails_openid/script/process/spawner
  74. +3 −0 examples/rails_openid/script/process/spinner
  75. +3 −0 examples/rails_openid/script/runner
  76. +3 −0 examples/rails_openid/script/server
  77. +18 −0 examples/rails_openid/test/functional/login_controller_test.rb
  78. +18 −0 examples/rails_openid/test/functional/server_controller_test.rb
  79. +28 −0 examples/rails_openid/test/test_helper.rb
  80. +21 −0 gemspec
  81. +112 −0 lib/hmac/hmac.rb
  82. +11 −0 lib/hmac/sha1.rb
  83. +25 −0 lib/hmac/sha2.rb
  84. +20 −0 lib/openid.rb
  85. +249 −0 lib/openid/association.rb
  86. +395 −0 lib/openid/consumer.rb
  87. +344 −0 lib/openid/consumer/associationmanager.rb
  88. +186 −0 lib/openid/consumer/checkid_request.rb
  89. +498 −0 lib/openid/consumer/discovery.rb
  90. +123 −0 lib/openid/consumer/discovery_manager.rb
  91. +134 −0 lib/openid/consumer/html_parse.rb
  92. +523 −0 lib/openid/consumer/idres.rb
  93. +148 −0 lib/openid/consumer/responses.rb
  94. +97 −0 lib/openid/cryptutil.rb
  95. +89 −0 lib/openid/dh.rb
  96. +39 −0 lib/openid/extension.rb
  97. +516 −0 lib/openid/extensions/ax.rb
  98. +179 −0 lib/openid/extensions/pape.rb
  99. +277 −0 lib/openid/extensions/sreg.rb
  100. +11 −0 lib/openid/extras.rb
  101. +238 −0 lib/openid/fetchers.rb
  102. +136 −0 lib/openid/kvform.rb
  103. +58 −0 lib/openid/kvpost.rb
  104. +553 −0 lib/openid/message.rb
  105. +8 −0 lib/openid/protocolerror.rb
  106. +1,544 −0 lib/openid/server.rb
  107. +271 −0 lib/openid/store/filesystem.rb
  108. +75 −0 lib/openid/store/interface.rb
  109. +107 −0 lib/openid/store/memcache.rb
  110. +84 −0 lib/openid/store/memory.rb
  111. +68 −0 lib/openid/store/nonce.rb
  112. +349 −0 lib/openid/trustroot.rb
  113. +75 −0 lib/openid/urinorm.rb
  114. +110 −0 lib/openid/util.rb
  115. +148 −0 lib/openid/yadis/accept.rb
  116. +21 −0 lib/openid/yadis/constants.rb
  117. +153 −0 lib/openid/yadis/discovery.rb
  118. +205 −0 lib/openid/yadis/filters.rb
  119. +305 −0 lib/openid/yadis/htmltokenizer.rb
  120. +45 −0 lib/openid/yadis/parsehtml.rb
  121. +42 −0 lib/openid/yadis/services.rb
  122. +155 −0 lib/openid/yadis/xrds.rb
  123. +90 −0 lib/openid/yadis/xri.rb
  124. +106 −0 lib/openid/yadis/xrires.rb
  125. +1,551 −0 setup.rb
  126. +124 −0 test/data/accept.txt
  127. +29 −0 test/data/dh.txt
  128. +14 −0 test/data/example-xrds.xml
  129. +587 −0 test/data/linkparse.txt
  130. +650 −0 test/data/n2b64
  131. +137 −0 test/data/test1-discover.txt
  132. +152 −0 test/data/test1-parsehtml.txt
  133. +19 −0 test/data/test_discover/malformed_meta_tag.html
  134. +11 −0 test/data/test_discover/openid.html
  135. +11 −0 test/data/test_discover/openid2.html
  136. +12 −0 test/data/test_discover/openid2_xrds.xml
  137. +11 −0 test/data/test_discover/openid2_xrds_no_local_id.xml
  138. +11 −0 test/data/test_discover/openid_1_and_2.html
  139. +16 −0 test/data/test_discover/openid_1_and_2_xrds.xml
  140. +17 −0 test/data/test_discover/openid_1_and_2_xrds_bad_delegate.xml
  141. +12 −0 test/data/test_discover/openid_and_yadis.html
  142. +10 −0 test/data/test_discover/openid_no_delegate.html
  143. +12 −0 test/data/test_discover/yadis_0entries.xml
  144. +15 −0 test/data/test_discover/yadis_2_bad_local_id.xml
  145. +22 −0 test/data/test_discover/yadis_2entries_delegate.xml
  146. +21 −0 test/data/test_discover/yadis_2entries_idp.xml
  147. +14 −0 test/data/test_discover/yadis_another_delegate.xml
  148. +12 −0 test/data/test_discover/yadis_idp.xml
  149. +13 −0 test/data/test_discover/yadis_idp_delegate.xml
  150. +11 −0 test/data/test_discover/yadis_no_delegate.xml
  151. +25 −0 test/data/test_xrds/=j3h.2007.11.14.xrds
  152. +12 −0 test/data/test_xrds/README
  153. +34 −0 test/data/test_xrds/delegated-20060809-r1.xrds
  154. +34 −0 test/data/test_xrds/delegated-20060809-r2.xrds
  155. +34 −0 test/data/test_xrds/delegated-20060809.xrds
  156. +7 −0 test/data/test_xrds/no-xrd.xml
  157. +2 −0 test/data/test_xrds/not-xrds.xml
  158. +34 −0 test/data/test_xrds/prefixsometimes.xrds
  159. +109 −0 test/data/test_xrds/ref.xrds
  160. +34 −0 test/data/test_xrds/sometimesprefix.xrds
  161. +25 −0 test/data/test_xrds/spoof1.xrds
  162. +25 −0 test/data/test_xrds/spoof2.xrds
  163. +37 −0 test/data/test_xrds/spoof3.xrds
  164. +9 −0 test/data/test_xrds/status222.xrds
  165. +58 −0 test/data/test_xrds/subsegments.xrds
  166. +39 −0 test/data/test_xrds/valid-populated-xrds.xml
  167. +153 −0 test/data/trustroot.txt
  168. +79 −0 test/data/urinorm.txt
  169. +131 −0 test/discoverdata.rb
  170. +170 −0 test/test_accept.rb
  171. +266 −0 test/test_association.rb
  172. +917 −0 test/test_associationmanager.rb
  173. +648 −0 test/test_ax.rb
  174. +294 −0 test/test_checkid_request.rb
  175. +257 −0 test/test_consumer.rb
  176. +119 −0 test/test_cryptutil.rb
  177. +86 −0 test/test_dh.rb
  178. +838 −0 test/test_discover.rb
  179. +262 −0 test/test_discovery_manager.rb
  180. +46 −0 test/test_extension.rb
  181. +35 −0 test/test_extras.rb
  182. +538 −0 test/test_fetchers.rb
  183. +270 −0 test/test_filters.rb
  184. +963 −0 test/test_idres.rb
  185. +165 −0 test/test_kvform.rb
  186. +65 −0 test/test_kvpost.rb
  187. +101 −0 test/test_linkparse.rb
  188. +1,116 −0 test/test_message.rb
  189. +89 −0 test/test_nonce.rb
  190. +178 −0 test/test_openid_yadis.rb
  191. +247 −0 test/test_pape.rb
  192. +80 −0 test/test_parsehtml.rb
  193. +63 −0 test/test_responses.rb
  194. +2,457 −0 test/test_server.rb
  195. +479 −0 test/test_sreg.rb
  196. +298 −0 test/test_stores.rb
  197. +113 −0 test/test_trustroot.rb
  198. +35 −0 test/test_urinorm.rb
  199. +145 −0 test/test_util.rb
  200. +169 −0 test/test_xrds.rb
  201. +48 −0 test/test_xri.rb
  202. +63 −0 test/test_xrires.rb
  203. +220 −0 test/test_yadis_discovery.rb
  204. +127 −0 test/testutil.rb
  205. +53 −0 test/util.rb
@@ -0,0 +1 @@
+_darcs
215 CHANGELOG
@@ -0,0 +1,215 @@
+Mon Jan 23 12:48:00 PST 2006 brian@janrain.com
+ * fixed bug in expiresIn. added expired? method
+
+ M ./lib/openid/filestore.rb -1 +1
+ M ./lib/openid/stores.rb +4
+
+Mon Jan 23 12:46:37 PST 2006 brian@janrain.com
+ * 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.
+
+ M ./INSTALL -9
+
+Tue Jan 17 14:45:57 PST 2006 brian@janrain.com
+ * added better handling of non-URL input
+
+ M ./lib/openid/consumer.rb -1 +5
+
+Sat Jan 14 19:39:57 PST 2006 brian@janrain.com
+ * added html and hmac deps into lib since they are so small
+
+ A ./lib/hmac-md5.rb
+ A ./lib/hmac-rmd160.rb
+ A ./lib/hmac-sha1.rb
+ A ./lib/hmac-sha2.rb
+ A ./lib/hmac.rb
+ A ./lib/html/
+ A ./lib/html/htmltokenizer.rb
+
+Mon Jan 16 15:04:05 PST 2006 Josh Hoyt <josh@janrain.com>
+ * Add script that will prepare the repository for release
+
+ A ./admin/fixperms
+ A ./admin/prepare-release
+
+Mon Jan 16 14:35:27 PST 2006 Josh Hoyt <josh@janrain.com>
+ * Add custom boring file
+
+ A ./admin/darcs-ignore
+
+Mon Jan 16 14:07:13 PST 2006 Josh Hoyt <josh@janrain.com>
+ * Put the build-docs script into the admin directory
+
+ ./build-docs -> ./admin/build-docs
+ A ./admin/
+
+Mon Jan 16 14:05:47 PST 2006 Josh Hoyt <josh@janrain.com>
+ * Add script to build documentation
+
+ A ./build-docs
+
+Wed Jan 4 16:06:41 PST 2006 brian@janrain.com
+ tagged ruby-openid-0.9.2
+
+
+Wed Jan 4 16:02:32 PST 2006 brian@janrain.com
+ * added openid_login_generator rails generator to examples
+
+ A ./examples/openid_login_generator/
+ A ./examples/openid_login_generator/USAGE
+ A ./examples/openid_login_generator/openid_login_generator.rb
+ A ./examples/openid_login_generator/templates/
+ A ./examples/openid_login_generator/templates/README
+ A ./examples/openid_login_generator/templates/controller.rb
+ A ./examples/openid_login_generator/templates/helper.rb
+ A ./examples/openid_login_generator/templates/login_system.rb
+ A ./examples/openid_login_generator/templates/user.rb
+ A ./examples/openid_login_generator/templates/view_login.rhtml
+ A ./examples/openid_login_generator/templates/view_logout.rhtml
+ A ./examples/openid_login_generator/templates/view_signup.rhtml
+ A ./examples/openid_login_generator/templates/view_welcome.rhtml
+
+Wed Jan 4 16:01:12 PST 2006 brian@janrain.com
+ * updated examples README to include openid_login_generator
+
+ M ./examples/README +11
+
+Wed Jan 4 14:58:24 PST 2006 brian@janrain.com
+ * added link to ruby library from consumer.rb example
+
+ M ./examples/consumer.rb -1 +1
+
+Wed Jan 4 10:56:45 PST 2006 brian@janrain.com
+ * ensure Content-type header is present for POSTs
+
+ M ./lib/openid/fetchers.rb -1 +2
+
+Fri Dec 30 17:05:25 PST 2005 brian@janrain.com
+ tagged ruby-openid-0.9.1
+
+
+Fri Dec 30 17:03:54 PST 2005 brian@janrain.com
+ * added Ruby on Rails example consumer
+
+ M ./examples/README -1 +14
+ A ./examples/openid_rails.tar.gz
+
+Thu Dec 29 16:00:20 PST 2005 brian@janrain.com
+ tagged ruby-openid-0.9.0
+
+
+Thu Dec 29 15:43:07 PST 2005 brian@janrain.com
+ * removed docs directory. generated rdoc html will be added manually to tarballs, and not be kept in repository
+
+ R ./docs/
+ R ./docs/README
+
+Thu Dec 29 15:21:21 PST 2005 brian@janrain.com
+ * added more docs for stores
+
+ M ./TODO -2 +4
+ M ./lib/openid/filestore.rb -16 +3
+ M ./lib/openid/stores.rb -9 +1
+
+Thu Dec 29 14:58:52 PST 2005 brian@janrain.com
+ * Huge documentation patch
+
+ M ./INSTALL -12 +22
+ M ./README -1 +1
+ M ./lib/openid/consumer.rb -24 +370
+ M ./lib/openid/fetchers.rb -2 +1
+ M ./lib/openid/filestore.rb -6 +4
+ M ./lib/openid/stores.rb -2 +1
+
+Thu Dec 29 10:59:54 PST 2005 brian@janrain.com
+ * added more info and rdoc formatting to README
+
+ M ./README -10 +26
+
+Thu Dec 29 09:45:51 PST 2005 brian@janrain.com
+ * fixed bad comment
+
+ M ./examples/consumer.rb -1 +1
+
+Wed Dec 28 17:59:48 PST 2005 brian@janrain.com
+ * added platform agnositc temp dir discovery
+
+ M ./examples/consumer.rb -1 +5
+
+Wed Dec 28 17:13:21 PST 2005 brian@janrain.com
+ * moved getOpenIDParamerters to util
+
+ M ./lib/openid/consumer.rb -10 +2
+ M ./lib/openid/util.rb +8
+
+Wed Dec 28 15:47:51 PST 2005 brian@janrain.com
+ * code cleanup
+
+ M ./lib/openid/consumer.rb -5
+
+Wed Dec 28 15:29:31 PST 2005 brian@janrain.com
+ * added linkparse to test suite script
+
+ M ./test/runtests -1 +1
+
+Wed Dec 28 15:29:07 PST 2005 brian@janrain.com
+ * added link parsing tests, lots of em
+
+ A ./test/linkparse.rb
+
+Wed Dec 28 15:28:07 PST 2005 brian@janrain.com
+ * link parsing more robust: handle non-html data, and make sure link tag is in head
+
+ M ./lib/openid/parse.rb -5 +13
+
+Tue Dec 27 16:11:09 PST 2005 brian@janrain.com
+ * added more tests for openid/util
+
+ M ./test/dh.rb -2 +1
+ M ./test/runtests +1
+ A ./test/util.rb
+
+Tue Dec 27 16:10:28 PST 2005 brian@janrain.com
+ * change util methods to use all use /dev/urandom if available
+
+ M ./lib/openid/util.rb -15 +35
+
+Tue Dec 27 16:09:53 PST 2005 brian@janrain.com
+ * changed tmp pathname to something more useful
+
+ M ./examples/consumer.rb -1 +1
+
+Fri Dec 16 09:04:59 PST 2005 Josh Hoyt <josh@janrain.com>
+ * Removed (now obsolete) interface.rb
+
+ This has been subsumed by consumer.rb
+
+ R ./lib/openid/interface.rb
+
+Thu Dec 15 18:25:04 PST 2005 brian@janrain.com
+ * initial checkin
+
+ A ./COPYING
+ A ./INSTALL
+ A ./README
+ A ./TODO
+ A ./docs/
+ A ./docs/README
+ A ./examples/
+ A ./examples/README
+ A ./examples/consumer.rb
+ A ./lib/
+ A ./lib/openid/
+ A ./lib/openid/consumer.rb
+ A ./lib/openid/dh.rb
+ A ./lib/openid/fetchers.rb
+ A ./lib/openid/filestore.rb
+ A ./lib/openid/interface.rb
+ A ./lib/openid/parse.rb
+ A ./lib/openid/stores.rb
+ A ./lib/openid/util.rb
+ A ./setup.rb
+ A ./test/
+ A ./test/assoc.rb
+ A ./test/dh.rb
+ A ./test/runtests
+ A ./test/teststore.rb
@@ -0,0 +1,36 @@
+
+* API Changes
+ * PAPE (Provider Authentication Policy Extension) module
+ * Updated extension for specification draft 2
+ * PAPE::Request::from_success_response returns nil if PAPE
+ response arguments were not signed
+ * Added functions to generate request/response HTML forms with
+ auto-submission javascript
+ * Consumer (relying party) API:
+ Auth_OpenID_AuthRequest::htmlMarkup
+ * Server API: Auth_OpenID_OpenIDResponse::toHTML
+ * Removed Rails login generator
+ * SReg::Response::from_success_response returns nil when no signed
+ arguments were found
+
+* New Features
+ * Fetchers now only read/request first megabyte of response
+
+* Bug fixes
+ * NOT NULL constraints to tables created by ActiveRecordStore
+ * check_authentication requests: copy entire response, not just
+ signed fields. Fixes missing namespace in check_authentication
+ requests
+ * OpenID 1 association requests no longer explicitly set
+ no-encryption session type
+ * Improved HTML parsing
+ * AssociationRequest::answer: include session_type in
+ no-encryption assoc responses
+ * normalize return_to URL before performing return_to verification
+ * OpenID::Consumer::IdResHandler.verify_discovery_results_openid1:
+ fall back to OpenID 1.0 type if 1.1 endpoint cannot be found
+ * StandardFetcher now includes a timeout setting
+ * Handle blank content types in
+ OpenID::Yadis::DiscoveryResult.where_is_yadis?
+ * Properly convert timestamps to ints before storing in DB, and vise
+ versa
47 INSTALL
@@ -0,0 +1,47 @@
+= Ruby OpenID Library Installation
+
+== Rubygems Installation
+
+Rubygems is a tool for installing ruby libraries and their
+dependancies. If you have rubygems installed, simply:
+
+ gem install ruby-openid
+
+== Manual Installation
+
+Unpack the archive and run setup.rb to install:
+
+ ruby setup.rb
+
+setup.rb installs the library into your system ruby. If don't want to
+add openid to you system ruby, you may instead add the *lib* directory of
+the extracted tarball to your RUBYLIB environment variable:
+
+ $ export RUBYLIB=${RUBYLIB}:/path/to/ruby-openid/lib
+
+
+== Testing the Installation
+
+Make sure everything installed ok:
+ $> irb
+ irb$> require "openid"
+ => true
+
+Or, if you installed via rubygems:
+
+ $> irb
+ irb$> require "rubygems"
+ => true
+ irb$> require_gem "ruby-openid"
+ => true
+
+== Run the test suite
+
+Go into the test directory and execute the *runtests.rb* script.
+
+== Next steps
+
+* Run consumer.rb in the examples directory.
+* Get started writing your own consumer using OpenID::Consumer
+* Write your own server with OpenID::Server
+* Use the OpenIDLoginGenerator! Read example/README for more info.
Oops, something went wrong.

0 comments on commit 3714803

Please sign in to comment.