Permalink
Browse files

[project @ initial checkin]

  • Loading branch information...
0 parents commit bb24b85cb5b14f7742a620e1c046913aaca404c9 tailor committed Dec 16, 2005
Showing with 35,643 additions and 0 deletions.
  1. +20 −0 COPYING
  2. +24 −0 INSTALL
  3. +24 −0 README
  4. +5 −0 TODO
  5. +4 −0 docs/README
  6. +8 −0 examples/README
  7. +238 −0 examples/consumer.rb
  8. +335 −0 lib/openid/consumer.rb
  9. +36 −0 lib/openid/dh.rb
  10. +91 −0 lib/openid/fetchers.rb
  11. +294 −0 lib/openid/filestore.rb
  12. +431 −0 lib/openid/interface.rb
  13. +15 −0 lib/openid/parse.rb
  14. +180 −0 lib/openid/stores.rb
  15. +157 −0 lib/openid/util.rb
  16. +17 −0 ruby-openid.tailor
  17. +215 −0 ruby/CHANGELOG
  18. +36 −0 ruby/CHANGES-2.1.0
  19. +47 −0 ruby/INSTALL
  20. +210 −0 ruby/LICENSE
  21. +2 −0 ruby/NOTICE
  22. +82 −0 ruby/README
  23. +127 −0 ruby/UPGRADE
  24. +12 −0 ruby/admin/build-docs
  25. +36 −0 ruby/admin/darcs-ignore
  26. +11 −0 ruby/admin/fixperms
  27. +47 −0 ruby/admin/gettlds.py
  28. +30 −0 ruby/admin/graph-require.sh
  29. +1 −0 ruby/admin/library-name
  30. +13 −0 ruby/admin/mkassoc
  31. +24 −0 ruby/admin/prepare-release
  32. +15 −0 ruby/admin/runtests
  33. +45 −0 ruby/admin/runtests.rb
  34. +32 −0 ruby/examples/README
  35. +58 −0 ruby/examples/active_record_openid_store/README
  36. +24 −0 ruby/examples/active_record_openid_store/XXX_add_open_id_store_to_db.rb
  37. +26 −0 ruby/examples/active_record_openid_store/XXX_upgrade_open_id_store.rb
  38. +8 −0 ruby/examples/active_record_openid_store/init.rb
  39. +10 −0 ruby/examples/active_record_openid_store/lib/association.rb
  40. +3 −0 ruby/examples/active_record_openid_store/lib/nonce.rb
  41. +4 −0 ruby/examples/active_record_openid_store/lib/open_id_setting.rb
  42. +57 −0 ruby/examples/active_record_openid_store/lib/openid_ar_store.rb
  43. +212 −0 ruby/examples/active_record_openid_store/test/store_test.rb
  44. +49 −0 ruby/examples/discover
  45. +153 −0 ruby/examples/rails_openid/README
  46. +10 −0 ruby/examples/rails_openid/Rakefile
  47. +4 −0 ruby/examples/rails_openid/app/controllers/application.rb
  48. +122 −0 ruby/examples/rails_openid/app/controllers/consumer_controller.rb
  49. +45 −0 ruby/examples/rails_openid/app/controllers/login_controller.rb
  50. +265 −0 ruby/examples/rails_openid/app/controllers/server_controller.rb
  51. +3 −0 ruby/examples/rails_openid/app/helpers/application_helper.rb
  52. +2 −0 ruby/examples/rails_openid/app/helpers/login_helper.rb
  53. +9 −0 ruby/examples/rails_openid/app/helpers/server_helper.rb
  54. +81 −0 ruby/examples/rails_openid/app/views/consumer/index.rhtml
  55. +68 −0 ruby/examples/rails_openid/app/views/layouts/server.rhtml
  56. +56 −0 ruby/examples/rails_openid/app/views/login/index.rhtml
  57. +26 −0 ruby/examples/rails_openid/app/views/server/decide.rhtml
  58. +19 −0 ruby/examples/rails_openid/config/boot.rb
  59. +74 −0 ruby/examples/rails_openid/config/database.yml
  60. +54 −0 ruby/examples/rails_openid/config/environment.rb
  61. +19 −0 ruby/examples/rails_openid/config/environments/development.rb
  62. +19 −0 ruby/examples/rails_openid/config/environments/production.rb
  63. +19 −0 ruby/examples/rails_openid/config/environments/test.rb
  64. +24 −0 ruby/examples/rails_openid/config/routes.rb
  65. +2 −0 ruby/examples/rails_openid/doc/README_FOR_APP
  66. +40 −0 ruby/examples/rails_openid/public/.htaccess
  67. +8 −0 ruby/examples/rails_openid/public/404.html
  68. +8 −0 ruby/examples/rails_openid/public/500.html
  69. +12 −0 ruby/examples/rails_openid/public/dispatch.cgi
  70. +26 −0 ruby/examples/rails_openid/public/dispatch.fcgi
  71. +12 −0 ruby/examples/rails_openid/public/dispatch.rb
  72. 0 ruby/examples/rails_openid/public/favicon.ico
  73. BIN ruby/examples/rails_openid/public/images/openid_login_bg.gif
  74. +750 −0 ruby/examples/rails_openid/public/javascripts/controls.js
  75. +584 −0 ruby/examples/rails_openid/public/javascripts/dragdrop.js
  76. +854 −0 ruby/examples/rails_openid/public/javascripts/effects.js
  77. +1,785 −0 ruby/examples/rails_openid/public/javascripts/prototype.js
  78. +1 −0 ruby/examples/rails_openid/public/robots.txt
  79. +3 −0 ruby/examples/rails_openid/script/about
  80. +3 −0 ruby/examples/rails_openid/script/breakpointer
  81. +3 −0 ruby/examples/rails_openid/script/console
  82. +3 −0 ruby/examples/rails_openid/script/destroy
  83. +3 −0 ruby/examples/rails_openid/script/generate
  84. +3 −0 ruby/examples/rails_openid/script/performance/benchmarker
  85. +3 −0 ruby/examples/rails_openid/script/performance/profiler
  86. +3 −0 ruby/examples/rails_openid/script/plugin
  87. +3 −0 ruby/examples/rails_openid/script/process/reaper
  88. +3 −0 ruby/examples/rails_openid/script/process/spawner
  89. +3 −0 ruby/examples/rails_openid/script/process/spinner
  90. +3 −0 ruby/examples/rails_openid/script/runner
  91. +3 −0 ruby/examples/rails_openid/script/server
  92. +18 −0 ruby/examples/rails_openid/test/functional/login_controller_test.rb
  93. +18 −0 ruby/examples/rails_openid/test/functional/server_controller_test.rb
  94. +28 −0 ruby/examples/rails_openid/test/test_helper.rb
  95. +21 −0 ruby/gemspec
  96. +112 −0 ruby/lib/hmac/hmac.rb
  97. +11 −0 ruby/lib/hmac/sha1.rb
  98. +25 −0 ruby/lib/hmac/sha2.rb
  99. +20 −0 ruby/lib/openid.rb
  100. +249 −0 ruby/lib/openid/association.rb
  101. +395 −0 ruby/lib/openid/consumer.rb
  102. +344 −0 ruby/lib/openid/consumer/associationmanager.rb
  103. +186 −0 ruby/lib/openid/consumer/checkid_request.rb
  104. +498 −0 ruby/lib/openid/consumer/discovery.rb
  105. +123 −0 ruby/lib/openid/consumer/discovery_manager.rb
  106. +134 −0 ruby/lib/openid/consumer/html_parse.rb
  107. +523 −0 ruby/lib/openid/consumer/idres.rb
  108. +148 −0 ruby/lib/openid/consumer/responses.rb
  109. +97 −0 ruby/lib/openid/cryptutil.rb
  110. +89 −0 ruby/lib/openid/dh.rb
  111. +39 −0 ruby/lib/openid/extension.rb
  112. +516 −0 ruby/lib/openid/extensions/ax.rb
  113. +179 −0 ruby/lib/openid/extensions/pape.rb
  114. +277 −0 ruby/lib/openid/extensions/sreg.rb
  115. +11 −0 ruby/lib/openid/extras.rb
  116. +238 −0 ruby/lib/openid/fetchers.rb
  117. +136 −0 ruby/lib/openid/kvform.rb
  118. +58 −0 ruby/lib/openid/kvpost.rb
  119. +553 −0 ruby/lib/openid/message.rb
  120. +8 −0 ruby/lib/openid/protocolerror.rb
  121. +1,544 −0 ruby/lib/openid/server.rb
  122. +271 −0 ruby/lib/openid/store/filesystem.rb
  123. +75 −0 ruby/lib/openid/store/interface.rb
  124. +107 −0 ruby/lib/openid/store/memcache.rb
  125. +84 −0 ruby/lib/openid/store/memory.rb
  126. +68 −0 ruby/lib/openid/store/nonce.rb
  127. +349 −0 ruby/lib/openid/trustroot.rb
  128. +75 −0 ruby/lib/openid/urinorm.rb
  129. +110 −0 ruby/lib/openid/util.rb
  130. +148 −0 ruby/lib/openid/yadis/accept.rb
  131. +21 −0 ruby/lib/openid/yadis/constants.rb
  132. +153 −0 ruby/lib/openid/yadis/discovery.rb
  133. +205 −0 ruby/lib/openid/yadis/filters.rb
  134. +305 −0 ruby/lib/openid/yadis/htmltokenizer.rb
  135. +45 −0 ruby/lib/openid/yadis/parsehtml.rb
  136. +42 −0 ruby/lib/openid/yadis/services.rb
  137. +155 −0 ruby/lib/openid/yadis/xrds.rb
  138. +90 −0 ruby/lib/openid/yadis/xri.rb
  139. +106 −0 ruby/lib/openid/yadis/xrires.rb
  140. +1,551 −0 ruby/setup.rb
  141. +124 −0 ruby/test/data/accept.txt
  142. +29 −0 ruby/test/data/dh.txt
  143. +14 −0 ruby/test/data/example-xrds.xml
  144. +587 −0 ruby/test/data/linkparse.txt
  145. +650 −0 ruby/test/data/n2b64
  146. +137 −0 ruby/test/data/test1-discover.txt
  147. +152 −0 ruby/test/data/test1-parsehtml.txt
  148. +19 −0 ruby/test/data/test_discover/malformed_meta_tag.html
  149. +11 −0 ruby/test/data/test_discover/openid.html
  150. +11 −0 ruby/test/data/test_discover/openid2.html
  151. +12 −0 ruby/test/data/test_discover/openid2_xrds.xml
  152. +11 −0 ruby/test/data/test_discover/openid2_xrds_no_local_id.xml
  153. +11 −0 ruby/test/data/test_discover/openid_1_and_2.html
  154. +16 −0 ruby/test/data/test_discover/openid_1_and_2_xrds.xml
  155. +17 −0 ruby/test/data/test_discover/openid_1_and_2_xrds_bad_delegate.xml
  156. +12 −0 ruby/test/data/test_discover/openid_and_yadis.html
  157. +10 −0 ruby/test/data/test_discover/openid_no_delegate.html
  158. +12 −0 ruby/test/data/test_discover/yadis_0entries.xml
  159. +15 −0 ruby/test/data/test_discover/yadis_2_bad_local_id.xml
  160. +22 −0 ruby/test/data/test_discover/yadis_2entries_delegate.xml
  161. +21 −0 ruby/test/data/test_discover/yadis_2entries_idp.xml
  162. +14 −0 ruby/test/data/test_discover/yadis_another_delegate.xml
  163. +12 −0 ruby/test/data/test_discover/yadis_idp.xml
  164. +13 −0 ruby/test/data/test_discover/yadis_idp_delegate.xml
  165. +11 −0 ruby/test/data/test_discover/yadis_no_delegate.xml
  166. +25 −0 ruby/test/data/test_xrds/=j3h.2007.11.14.xrds
  167. +12 −0 ruby/test/data/test_xrds/README
  168. +34 −0 ruby/test/data/test_xrds/delegated-20060809-r1.xrds
  169. +34 −0 ruby/test/data/test_xrds/delegated-20060809-r2.xrds
  170. +34 −0 ruby/test/data/test_xrds/delegated-20060809.xrds
  171. +7 −0 ruby/test/data/test_xrds/no-xrd.xml
  172. +2 −0 ruby/test/data/test_xrds/not-xrds.xml
  173. +34 −0 ruby/test/data/test_xrds/prefixsometimes.xrds
  174. +109 −0 ruby/test/data/test_xrds/ref.xrds
  175. +34 −0 ruby/test/data/test_xrds/sometimesprefix.xrds
  176. +25 −0 ruby/test/data/test_xrds/spoof1.xrds
  177. +25 −0 ruby/test/data/test_xrds/spoof2.xrds
  178. +37 −0 ruby/test/data/test_xrds/spoof3.xrds
  179. +9 −0 ruby/test/data/test_xrds/status222.xrds
  180. +58 −0 ruby/test/data/test_xrds/subsegments.xrds
  181. +39 −0 ruby/test/data/test_xrds/valid-populated-xrds.xml
  182. +153 −0 ruby/test/data/trustroot.txt
  183. +79 −0 ruby/test/data/urinorm.txt
  184. +131 −0 ruby/test/discoverdata.rb
  185. +170 −0 ruby/test/test_accept.rb
  186. +266 −0 ruby/test/test_association.rb
  187. +917 −0 ruby/test/test_associationmanager.rb
  188. +648 −0 ruby/test/test_ax.rb
  189. +294 −0 ruby/test/test_checkid_request.rb
  190. +257 −0 ruby/test/test_consumer.rb
  191. +119 −0 ruby/test/test_cryptutil.rb
  192. +86 −0 ruby/test/test_dh.rb
  193. +838 −0 ruby/test/test_discover.rb
  194. +262 −0 ruby/test/test_discovery_manager.rb
  195. +46 −0 ruby/test/test_extension.rb
  196. +35 −0 ruby/test/test_extras.rb
  197. +538 −0 ruby/test/test_fetchers.rb
  198. +270 −0 ruby/test/test_filters.rb
  199. +963 −0 ruby/test/test_idres.rb
  200. +165 −0 ruby/test/test_kvform.rb
  201. +65 −0 ruby/test/test_kvpost.rb
  202. +101 −0 ruby/test/test_linkparse.rb
  203. +1,116 −0 ruby/test/test_message.rb
  204. +89 −0 ruby/test/test_nonce.rb
  205. +178 −0 ruby/test/test_openid_yadis.rb
  206. +247 −0 ruby/test/test_pape.rb
  207. +80 −0 ruby/test/test_parsehtml.rb
  208. +63 −0 ruby/test/test_responses.rb
  209. +2,457 −0 ruby/test/test_server.rb
  210. +479 −0 ruby/test/test_sreg.rb
  211. +298 −0 ruby/test/test_stores.rb
  212. +113 −0 ruby/test/test_trustroot.rb
  213. +35 −0 ruby/test/test_urinorm.rb
  214. +145 −0 ruby/test/test_util.rb
  215. +169 −0 ruby/test/test_xrds.rb
  216. +48 −0 ruby/test/test_xri.rb
  217. +63 −0 ruby/test/test_xrires.rb
  218. +220 −0 ruby/test/test_yadis_discovery.rb
  219. +127 −0 ruby/test/testutil.rb
  220. +53 −0 ruby/test/util.rb
  221. +1,551 −0 setup.rb
  222. +19 −0 test/assoc.rb
  223. +21 −0 test/dh.rb
  224. +6 −0 test/runtests
  225. +136 −0 test/teststore.rb
20 COPYING
@@ -0,0 +1,20 @@
+Ruby-OpenID-Consumer Library
+
+Copyright (C) 2005 Janrain, Inc
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+Contact:
+eng+ruby@janrain.com
24 INSTALL
@@ -0,0 +1,24 @@
+Ruby-OpenID-Consumer Installation
+
+Requirements:
+
+These packages are required by the OpenID library.
+
+htmltokenizer - http://rubyforge.org/projects/htmltokenizer/
+ - Debian users may: apt-get install libhtml-htmltokenizer-ruby
+
+ruby-hmac - http://deisui.org/~ueno/ruby/hmac.html
+
+Installation:
+
+unpack the archive and run setup.rb (you may need to be root)
+
+ruby setup.rb
+
+Make sure everything installed ok:
+$> irb
+irb(main):001:0> require "openid/consumer"
+=> true
+
+
+
24 README
@@ -0,0 +1,24 @@
+Ruby OpenID Consumer
+
+Author: Janrain, Inc - Brian Ellin - brian@janrain.com
+Copyright: 2005, Janrain, In
+License: LGPL
+
+This OpenID consumer library is a port of the consumer functionality
+of the Python-OpenID library - http://www.openidenabled.com/openid/libraries/python/
+
+Please read the INSTALL file, and then have a look at the examples
+directory. A fully functional example using Ruby's WEBrick HTTP
+server library is available. I encorage you to run the example, and
+have a look at the code.
+
+The library is well documented. To get started, have a look at the
+example source code(examples/consumer.rb) and lib/openid/consumer.rb.
+
+To run the test suite, make sure the library is installed, use the
+runtests script in the test directory.
+
+The library and dependancies have been tested using Ruby 1.8 only,
+though it may work with earlier versions.
+
+
5 TODO
@@ -0,0 +1,5 @@
+12/15/2005
+
+* Add more store types (SQL, etc)
+* Server support?
+
@@ -0,0 +1,4 @@
+Ruby library documentation is being written. In the meantime, please
+see the Python API documentation. The two libraries use the exact same API.
+
+http://www.openidenabled.com/openid/libraries/python/
@@ -0,0 +1,8 @@
+This directory contains examples that demonstrate use of the OpenID
+conusmer library.
+
+consumer.rb runs a simple web server (webrick) and will verify OpenID identities. To test this out, you'll need a valid OpenID URL, and to install the library (see ../INSTALL), and run ruby consumer.rb
+
+Point your web browser at http://localhost:2000/ to test.
+
+
@@ -0,0 +1,238 @@
+#!/usr/bin/env ruby
+require "cgi"
+require "uri"
+require "webrick"
+include WEBrick
+
+require "openid/consumer"
+require "openid/filestore"
+
+################ endconfig ##########################
+# use your desired store implementation here
+store = OpenID::FilesystemOpenIDStore.new("/tmp/simpleopenid/")
+
+$host = "localhost"
+$port = 2000
+################ end config ##########################
+
+$consumer = OpenID::OpenIDConsumer.new(store)
+
+if $port.nil?
+ $base_url = "http://#{$host}/"
+else
+ $base_url = "http://#{$host}:#{$port}/"
+end
+
+
+server = HTTPServer.new(:Port=>$port)
+
+class SimpleServlet < HTTPServlet::AbstractServlet
+
+ def do_GET(req, res)
+ @req = req
+ @res = res
+ begin
+ case req.path
+ when "", "/", "/start"
+ self.render
+ when "/begin"
+ self.doBegin
+ when "/complete"
+ self.doComplete
+ else
+ self.redirect(self.buildURL("/"))
+ end
+ ensure
+ @req = nil
+ @res = nil
+ end
+ end
+
+ def doBegin
+ # First make sure the user entered something
+ openid_url = @req.query.fetch("openid_url", "")
+ if openid_url.empty?
+ self.render("Enter an identity URL to verify",
+ css_class="error", form_contents=openid_url)
+ return HTTPStatus::Success
+ end
+
+ # Then ask the openid library to begin the authorization
+ status, info = $consumer.beginAuth(openid_url)
+
+ # If the URL was unusable (either because of network conditions,
+ # a server error, or that the response returned was not an OpenID
+ # identity page), the library will return HTTP_FAILURE or PARSE_ERROR.
+ # Let the user know that the URL is unusable.
+ case status
+ when OpenID::HTTP_FAILURE
+ self.render("Failed to retrieve <q>#{openid_url}</q>",
+ css_class="error", form_contents=openid_url)
+ return HTTPStatus::Success
+
+ when OpenID::PARSE_ERROR
+ self.render("Failed to retrieve <q>#{openid_url}</q>",
+ css_class="error", form_contents=openid_url)
+ return HTTPStatus::Success
+
+ when OpenID::SUCCESS
+ # The URL was a valid identity URL. Now we construct a URL
+ # that will get us to process the server response. We will
+ # need the token from the auth request when processing the
+ # response, so we have to save it somewhere. The obvious
+ # options are including it in the URL, storing it in a
+ # cookie, and storing it in a session object if one is
+ # available. For this example, we have no session and we
+ # do not want to deal with cookies, so just add it as a
+ # query parameter to the URL.
+ return_to = self.buildURL("/complete", {"token"=>info.token})
+
+ # Now ask the library for the URL to redirect the user to
+ # his OpenID server. The auth request is what the library
+ # returned before. We just constructed the return_to. The
+ # return_to URL must be under the specified trust_root. We
+ # just use the base_url for this server as a trust root.
+ redirect_url = $consumer.constructRedirect(info,
+ return_to,
+ trust_root=$base_url)
+
+ # Send the redirect response
+ self.redirect(redirect_url)
+ else
+ # Should never get here
+ raise "Not Reached"
+ end
+ end
+
+ # handle the redirect from the OpenID server
+ def doComplete
+ # get the token from the environment (in this case, the URL)
+ token = @req.query.fetch("token", "")
+
+ # Ask the library to check the response that the server sent
+ # us. Status is a code indicating the response type. info is
+ # either nil or a string containing more information about
+ # the return type.
+ status, info = $consumer.completeAuth(token, @req.query)
+
+ css_class = "error"
+ openid_url = nil
+
+ if status == OpenID::FAILURE and info
+ # In the case of failure, if info is non-nil, it is the
+ # URL that we were verifying. We include it in the error
+ # message to help the user figure out what happened.
+ openid_url = info
+ message = "Verification of #{openid_url} failed"
+
+ elsif status == OpenID::SUCCESS
+ # Success means that the transaction completed without
+ # error. If info is nil, it means that the user cancelled
+ # the verification.
+ css_class = "alert"
+ if info
+ openid_url = info
+ message = "You have successfully verified #{openid_url} as your identity."
+ else
+ # cancelled
+ message = "Verification cancelled."
+ end
+ else
+ # Either we don't understand the code or there is no
+ # openid_url included with the error. Give a generic
+ # failure message. The library should supply debug
+ # information in a log.
+ message = "Verification failed."
+ end
+ self.render(message, css_class, openid_url)
+ end
+
+ # build a URL relative to the server base URL, with the given query
+ # parameters added.
+ def buildURL(action, query=nil)
+ url = @req.request_uri.merge(action).to_s
+ url = OpenID::Util.appendArgs(url, query) unless query.nil?
+ url
+ end
+
+ def redirect(url)
+ @res.set_redirect(HTTPStatus::MovedPermanently, url)
+ end
+
+ def render(message=nil, css_class="alert", form_contents="")
+ @res.body = self.pageHeader
+ unless message.nil?
+ @res.body << "<div class=\"#{css_class}\">#{message}</div>"
+ end
+ @res.body << self.pageFooter(form_contents)
+ end
+
+ def pageHeader(title="Ruby OpenID WEBrick example")
+ header = <<END_OF_STRING
+<html>
+ <head><title>#{title}</title></head>
+ <style type="text/css">
+ * {
+ font-family: verdana,sans-serif;
+ }
+ body {
+ width: 50em;
+ margin: 1em;
+ }
+ div {
+ padding: .5em;
+ }
+ table {
+ margin: none;
+ padding: none;
+ }
+ .alert {
+ border: 1px solid #e7dc2b;
+ background: #fff888;
+ }
+ .error {
+ border: 1px solid #ff0000;
+ background: #ffaaaa;
+ }
+ #verify-form {
+ border: 1px solid #777777;
+ background: #dddddd;
+ margin-top: 1em;
+ padding-bottom: 0em;
+ }
+ </style>
+ <body>
+ <h1>#{title}</h1>
+ <p>
+ This example consumer uses the Ruby-OpenID-Consumer library
+ on a WEBrick platform. The example just verifies that the URL that
+ you enter is your identity URL.
+ </p>
+END_OF_STRING
+ end
+
+
+ def pageFooter(form_contents="")
+ form_contents = "" if form_contents == "/"
+ footer = <<END_OF_STRING
+ <div id="verify-form">
+ <form method="get" action=#{self.buildURL("/begin")}>
+ Identity&nbsp;URL:
+ <input type="text" name="openid_url" value="#{form_contents}" />
+ <input type="submit" value="Verify" />
+ </form>
+ </div>
+ </body>
+</html>
+END_OF_STRING
+ end
+
+
+end
+
+# Bootstrap the example
+server.mount("/", SimpleServlet)
+trap("INT") {server.shutdown}
+print "\nVisit http://#{$host}:#{$port}/ in your browser.\n\n"
+server.start
+
Oops, something went wrong.

0 comments on commit bb24b85

Please sign in to comment.