Showing preview only (1,427K chars total). Download the full file or copy to clipboard to get everything.
Repository: openid/ruby-openid
Branch: master
Commit: 13a88ad64421
Files: 226
Total size: 1.3 MB
Directory structure:
gitextract_dyyu04vx/
├── .gitignore
├── .travis.yml
├── CHANGELOG.md
├── CHANGES-2.0.0
├── CHANGES-2.1.0
├── Gemfile
├── INSTALL.md
├── LICENSE
├── NOTICE
├── README.md
├── Rakefile
├── UPGRADE.md
├── admin/
│ ├── build-docs
│ ├── fixperms
│ ├── gettlds.py
│ ├── graph-require.sh
│ ├── library-name
│ ├── mkassoc
│ ├── prepare-release
│ └── runtests
├── examples/
│ ├── README.md
│ ├── active_record_openid_store/
│ │ ├── README
│ │ ├── XXX_add_open_id_store_to_db.rb
│ │ ├── XXX_upgrade_open_id_store.rb
│ │ ├── init.rb
│ │ ├── lib/
│ │ │ ├── association.rb
│ │ │ ├── nonce.rb
│ │ │ ├── open_id_setting.rb
│ │ │ └── openid_ar_store.rb
│ │ └── test/
│ │ └── store_test.rb
│ ├── discover
│ └── rails_openid/
│ ├── Gemfile
│ ├── README
│ ├── README.rdoc
│ ├── Rakefile
│ ├── app/
│ │ ├── assets/
│ │ │ ├── javascripts/
│ │ │ │ └── application.js
│ │ │ └── stylesheets/
│ │ │ └── application.css
│ │ ├── controllers/
│ │ │ ├── application_controller.rb
│ │ │ ├── consumer_controller.rb
│ │ │ ├── login_controller.rb
│ │ │ └── server_controller.rb
│ │ ├── helpers/
│ │ │ ├── application_helper.rb
│ │ │ ├── login_helper.rb
│ │ │ └── server_helper.rb
│ │ ├── mailers/
│ │ │ └── .gitkeep
│ │ ├── models/
│ │ │ └── .gitkeep
│ │ └── views/
│ │ ├── consumer/
│ │ │ └── index.html.erb
│ │ ├── layouts/
│ │ │ └── server.html.erb
│ │ ├── login/
│ │ │ └── index.html.erb
│ │ └── server/
│ │ └── decide.html.erb
│ ├── config/
│ │ ├── application.rb
│ │ ├── boot.rb
│ │ ├── database.yml
│ │ ├── environment.rb
│ │ ├── environments/
│ │ │ ├── development.rb
│ │ │ ├── production.rb
│ │ │ └── test.rb
│ │ ├── initializers/
│ │ │ ├── backtrace_silencers.rb
│ │ │ ├── inflections.rb
│ │ │ ├── mime_types.rb
│ │ │ ├── rails_root.rb
│ │ │ ├── secret_token.rb
│ │ │ ├── session_store.rb
│ │ │ └── wrap_parameters.rb
│ │ ├── locales/
│ │ │ └── en.yml
│ │ └── routes.rb
│ ├── config.ru
│ ├── db/
│ │ ├── development.sqlite3
│ │ └── seeds.rb
│ ├── lib/
│ │ ├── assets/
│ │ │ └── .gitkeep
│ │ └── tasks/
│ │ └── .gitkeep
│ ├── log/
│ │ ├── .gitkeep
│ │ └── development.log
│ ├── public/
│ │ ├── 404.html
│ │ ├── 422.html
│ │ ├── 500.html
│ │ ├── dispatch.cgi
│ │ ├── dispatch.fcgi
│ │ ├── dispatch.rb
│ │ ├── javascripts/
│ │ │ ├── application.js
│ │ │ ├── controls.js
│ │ │ ├── dragdrop.js
│ │ │ ├── effects.js
│ │ │ └── prototype.js
│ │ └── robots.txt
│ ├── script/
│ │ └── rails
│ └── test/
│ ├── fixtures/
│ │ └── .gitkeep
│ ├── functional/
│ │ ├── .gitkeep
│ │ ├── login_controller_test.rb
│ │ └── server_controller_test.rb
│ ├── integration/
│ │ └── .gitkeep
│ ├── performance/
│ │ └── browsing_test.rb
│ ├── test_helper.rb
│ └── unit/
│ └── .gitkeep
├── lib/
│ ├── hmac/
│ │ ├── hmac.rb
│ │ ├── sha1.rb
│ │ └── sha2.rb
│ ├── openid/
│ │ ├── association.rb
│ │ ├── consumer/
│ │ │ ├── associationmanager.rb
│ │ │ ├── checkid_request.rb
│ │ │ ├── discovery.rb
│ │ │ ├── discovery_manager.rb
│ │ │ ├── html_parse.rb
│ │ │ ├── idres.rb
│ │ │ ├── responses.rb
│ │ │ └── session.rb
│ │ ├── consumer.rb
│ │ ├── cryptutil.rb
│ │ ├── dh.rb
│ │ ├── extension.rb
│ │ ├── extensions/
│ │ │ ├── ax.rb
│ │ │ ├── oauth.rb
│ │ │ ├── pape.rb
│ │ │ ├── sreg.rb
│ │ │ └── ui.rb
│ │ ├── fetchers.rb
│ │ ├── kvform.rb
│ │ ├── kvpost.rb
│ │ ├── message.rb
│ │ ├── protocolerror.rb
│ │ ├── server.rb
│ │ ├── store/
│ │ │ ├── filesystem.rb
│ │ │ ├── interface.rb
│ │ │ ├── memcache.rb
│ │ │ ├── memory.rb
│ │ │ └── nonce.rb
│ │ ├── trustroot.rb
│ │ ├── urinorm.rb
│ │ ├── util.rb
│ │ ├── version.rb
│ │ └── yadis/
│ │ ├── accept.rb
│ │ ├── constants.rb
│ │ ├── discovery.rb
│ │ ├── filters.rb
│ │ ├── htmltokenizer.rb
│ │ ├── parsehtml.rb
│ │ ├── services.rb
│ │ ├── xrds.rb
│ │ ├── xri.rb
│ │ └── xrires.rb
│ ├── openid.rb
│ └── ruby-openid.rb
├── ruby-openid.gemspec
├── setup.rb
└── test/
├── data/
│ ├── accept.txt
│ ├── dh.txt
│ ├── example-xrds.xml
│ ├── linkparse.txt
│ ├── n2b64
│ ├── test1-discover.txt
│ ├── test1-parsehtml.txt
│ ├── test_discover/
│ │ ├── malformed_meta_tag.html
│ │ ├── openid.html
│ │ ├── openid2.html
│ │ ├── openid2_xrds.xml
│ │ ├── openid2_xrds_no_local_id.xml
│ │ ├── openid_1_and_2.html
│ │ ├── openid_1_and_2_xrds.xml
│ │ ├── openid_1_and_2_xrds_bad_delegate.xml
│ │ ├── openid_and_yadis.html
│ │ ├── openid_no_delegate.html
│ │ ├── openid_utf8.html
│ │ ├── yadis_0entries.xml
│ │ ├── yadis_2_bad_local_id.xml
│ │ ├── yadis_2entries_delegate.xml
│ │ ├── yadis_2entries_idp.xml
│ │ ├── yadis_another_delegate.xml
│ │ ├── yadis_idp.xml
│ │ ├── yadis_idp_delegate.xml
│ │ └── yadis_no_delegate.xml
│ ├── test_xrds/
│ │ ├── =j3h.2007.11.14.xrds
│ │ ├── README
│ │ ├── delegated-20060809-r1.xrds
│ │ ├── delegated-20060809-r2.xrds
│ │ ├── delegated-20060809.xrds
│ │ ├── no-xrd.xml
│ │ ├── not-xrds.xml
│ │ ├── prefixsometimes.xrds
│ │ ├── ref.xrds
│ │ ├── sometimesprefix.xrds
│ │ ├── spoof1.xrds
│ │ ├── spoof2.xrds
│ │ ├── spoof3.xrds
│ │ ├── status222.xrds
│ │ ├── subsegments.xrds
│ │ └── valid-populated-xrds.xml
│ ├── trustroot.txt
│ └── urinorm.txt
├── discoverdata.rb
├── test_accept.rb
├── test_association.rb
├── test_associationmanager.rb
├── test_ax.rb
├── test_checkid_request.rb
├── test_consumer.rb
├── test_cryptutil.rb
├── test_dh.rb
├── test_discover.rb
├── test_discovery_manager.rb
├── test_extension.rb
├── test_fetchers.rb
├── test_filters.rb
├── test_idres.rb
├── test_kvform.rb
├── test_kvpost.rb
├── test_linkparse.rb
├── test_message.rb
├── test_nonce.rb
├── test_oauth.rb
├── test_openid_yadis.rb
├── test_pape.rb
├── test_parsehtml.rb
├── test_responses.rb
├── test_server.rb
├── test_sreg.rb
├── test_stores.rb
├── test_trustroot.rb
├── test_ui.rb
├── test_urinorm.rb
├── test_util.rb
├── test_xrds.rb
├── test_xri.rb
├── test_xrires.rb
├── test_yadis_discovery.rb
├── testutil.rb
└── util.rb
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
*.gem
*.rbc
.bundle
.config
.yardoc
Gemfile.lock
InstalledFiles
_yardoc
coverage
doc/
lib/bundler/man
pkg
rdoc
spec/reports
test/tmp
test/version_tmp
tmp
================================================
FILE: .travis.yml
================================================
language: ruby
sudo: required
dist: trusty
script: rake
rvm:
- "1.9"
- "2.0"
- "2.1"
- "2.2"
- "2.3"
- "2.4"
- "2.5"
- "2.6"
- ruby-head
- jruby
- jruby-head
- jruby-19mode
- rubinius-3
before_install:
- "gem install bundler || gem install bundler --version '< 2'"
matrix:
allow_failures:
- rvm: "ruby-head"
- rvm: "jruby-head"
================================================
FILE: CHANGELOG.md
================================================
# Changelog
## 2.9.2
* Perform all checks before verifying endpoints.
[#126](https://github.com/openid/ruby-openid/pull/126)
## 2.9.1
* Updated CHANGELOG.md
## 2.9.0
* Remove deprecated `autorequire` from gemspec.
[#123](https://github.com/openid/ruby-openid/pull/123)
* Rescue from `Yadis::XRI::XRIHTTPError` on discovery.
[#106](https://github.com/openid/ruby-openid/pull/106)
* Avoid SSRF for claimed_id request.
[#121](https://github.com/openid/ruby-openid/pull/121)
* Updated documentation.
[#115](https://github.com/openid/ruby-openid/pull/115), [#116](https://github.com/openid/ruby-openid/pull/116), [#117](https://github.com/openid/ruby-openid/pull/117), [#118](https://github.com/openid/ruby-openid/pull/118)
* Reduce warnings output in test runs.
[#119](https://github.com/openid/ruby-openid/pull/119)
* Drop deprecated option from gemspec.
[#120](https://github.com/openid/ruby-openid/pull/120)
* Remove circular require.
[#113](https://github.com/openid/ruby-openid/pull/113)
* Updated Travis CI config with Ruby 2.6
[#114](https://github.com/openid/ruby-openid/pull/114)
* Simplify Bundler require; remove need for extra `:require`.
[#112](https://github.com/openid/ruby-openid/pull/112)
## 2.8.0
* Fix `admin/mkassoc` script.
See https://github.com/openid/ruby-openid/pull/103
* Allow specifying timeout for `OpenID::StandardFetcher` in environment variables.
See https://github.com/openid/ruby-openid/pull/109
* Fixed some documentation.
See https://github.com/openid/ruby-openid/pull/111
* Fixed example server.
See https://github.com/openid/ruby-openid/pull/91
* Fixed tests.
See https://github.com/openid/ruby-openid/pull/86
* Misc. changes to the CI setup.
See
- https://github.com/openid/ruby-openid/pull/110
- https://github.com/openid/ruby-openid/pull/108
- https://github.com/openid/ruby-openid/pull/107
## 2.7.0
* Use RFC 2396 compatible URI parser for trustroot - 7c84ec9ced3ccbdad575e02dbfa81e53b52f909e
See https://github.com/openid/ruby-openid/pull/85
* Use HMAC from OpenSSL rather than Digest - ce2e30d7ff3308f17ef7d8c19d6f4752f76c9c40
See https://github.com/openid/ruby-openid/pull/84
* Check if OpenSSL is loaded - 751e55820d958ee781f5abb466a576d83ddde6fd
## 2.6.0
* More safely build filenames - 1c4a90630b183e7572b8ab5f2e3a3e0c0fecd2c7
See https://github.com/openid/ruby-openid/pull/80
* The session serializer of Rails4.1 is json - b44a1eb511dec3be25a07930121bc80cacec0f1c
* Handle boolean value to fix signature issue - d65076269b77754da7db6e4b189edeeb9201600d
See https://github.com/openid/ruby-openid/pull/76
## 2.5.0
* Revert json serialization - 8dc60e553369df2300ebb4b83a29618aff643c2c
See https://github.com/openid/ruby-openid/pull/73
## 2.4.0
* Allow expecting a parameter to be nil during return_to verification - 708e992ab3e6c26d478283fc11faa6a0a74bfec0
* Serialize to objects that can be stored as json - db1d8f7b171a333dec4e861fe0fa53ac1d98b188
* Fixed missing XRDS HTTP header in sample provider - dc15fa07fd59fdcf46d659cce34c6ef7a6768fde
## 2.3.0
* Deprecated Ruby 1.8 support - 0694bebc83de0313cfef73a5d0ffd9a293ae71a0
* Fixed encoding errors in test suite - 7ac8e3978f9c733bd5ee8d6b742b515b5427ded2
* Be aware when using Hash or Array as default value for unknown Hash keys - #58
* Stop overwriting String#starts_with? and String#ends_with? if defined - #55
* Ignore Associations For OpenID2 (Google's Security Bug Fix) - #53
* Change "oauth" to "ui" in variable name in the UI extension - #52
* Eliminating runtime warnings - #50 #56
* Upgrade example Rails provider/consumer app to Rails 3 - #49
## 2.2.3
* Fixed 'invalid byte sequence in UTF-8' error in parse_link_attrs - 0f46921a97677b83b106366c805063105c5e9f20
* Fixed license information in gemspec - f032e949e1ca9078ab7508d9629398ca2c36980a
* Update starts/ends_with? to handle nil prefix - beee5e8d1dc24ad55725cfcc720eefba6bdbd279
## 2.2.2
* Limit fetching file size & disable XML entity expansion - be2bab5c21f04735045e071411b349afb790078f
Avoid DoS attack to RPs using large XRDS / too many XML entity expansion in XRDS.
## 2.2.1
* Make bundle exec rake work - 2100f281172427d1557ebe76afbd24072a22d04f
* State license in gemspec for automated tools / rubygems.org page - 2d5c3cd8f2476b28d60609822120c79d71919b7b
* Use default-external encoding instead of ascii for badly encoded pages - a68d2591ac350459c874da10108e6ff5a8c08750
* Colorize output and reveal tests that never ran - 4b0143f0a3b10060d5f52346954219bba3375039
## 2.2.0
* Bundler compatibility and bundler gem tasks - 72d551945f9577bf5d0e516c673c648791b0e795
* register_namespace_alias for AX message - aeaf050d21aeb681a220758f1cc61b9086f73152
* Fixed JRuby (1.9 mode) incompatibilty - 40baed6cf7326025058a131c2b76047345618539
* Added UI extension support - a276a63d68639e985c1f327cf817489ccc5f9a17
* Add attr_reader for setup_url on SetupNeededResponse - 75a7e98005542ede6db3fc7f1fc551e0a2ca044a
* Encode form inputs - c9e9b5b52f8a23df3159c2387b6330d5df40f35b
* Fixed cleanup AR associations whose expiry is past, not upcoming - 2265179a6d5c8b51ccc741180db46b618dd3caf9
* Fixed issue with Memcache store and Dalli - ef84bf73da9c99c67b0632252bf0349e2360cbc7
* Improvements to ActiveRecordStore's gc rake task - 847e19bf60a6b8163c1e0d2e96dbd805c64e2880
================================================
FILE: CHANGES-2.0.0
================================================
* 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
================================================
FILE: CHANGES-2.1.0
================================================
* 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
================================================
FILE: Gemfile
================================================
source 'https://rubygems.org'
# Specify your gem's dependencies in ruby-openid.gemspec
gemspec
gem 'rake'
================================================
FILE: INSTALL.md
================================================
# Ruby OpenID Library Installation
## Install as a gem
`ruby-openid` is distributed on [RubyGems](https://rubygems.org/).
Install it:
gem install ruby-openid
This is probably what you need.
## 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
## 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 `examples/README.md` for more info.
================================================
FILE: LICENSE
================================================
The code in lib/hmac/ is Copyright 2001 by Daiki Ueno, and distributed under
the terms of the Ruby license. See http://www.ruby-lang.org/en/LICENSE.txt
lib/openid/yadis/htmltokenizer.rb is Copyright 2004 by Ben Giddings and
distributed under the terms of the Ruby license.
The remainder of this package is Copyright 2006-2008 by JanRain, Inc. and
distributed under the terms of license below:
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
================================================
FILE: NOTICE
================================================
This product includes software developed by JanRain,
available from http://github.com/openid/ruby-openid
================================================
FILE: README.md
================================================
# Ruby OpenID
A Ruby library for verifying and serving OpenID identities.
[](http://travis-ci.org/openid/ruby-openid)
## Features
* Easy to use API for verifying OpenID identites - OpenID::Consumer
* Support for serving OpenID identites - OpenID::Server
* Does not depend on underlying web framework
* Supports multiple storage mechanisms (Filesystem, ActiveRecord, Memory)
* Example code to help you get started, including:
* Ruby on Rails based consumer and server
* OpenIDLoginGenerator for quickly getting creating a rails app that uses
OpenID for authentication
* ActiveRecordOpenIDStore plugin
* Comprehensive test suite
* Supports both OpenID 1 and OpenID 2 transparently
## Installing
Before running the examples or writing your own code you'll need to install
the library. See the INSTALL file or use rubygems:
gem install ruby-openid
Check the installation:
$ irb
irb> require 'rubygems'
=> false
irb> gem 'ruby-openid'
=> true
The library is known to work with Ruby 1.9.2 and above on Unix, Max OS X and Win32.
## Getting Started
The best way to start is to look at the rails_openid example.
You can run it with:
cd examples/rails_openid
script/server
If you are writing an OpenID Relying Party, a good place to start is:
`examples/rails_openid/app/controllers/consumer_controller.rb`
And if you are writing an OpenID provider:
`examples/rails_openid/app/controllers/server_controller.rb`
The library code is quite well documented, so don't be squeamish, and
look at the library itself if there's anything you don't understand in
the examples.
## Homepage
* GitHub repository: [openid/ruby-openid](http://github.com/openid/ruby-openid)
* Homepage: [OpenID.net](http://openid.net/)
## Community
Discussion regarding the Ruby OpenID library and other JanRain OpenID
libraries takes place on the [OpenID mailing list](http://openid.net/developers/dev-mailing-lists/).
Please join this list to discuss, ask implementation questions, report
bugs, etc. Also check out the openid channel on the freenode IRC
network.
If you have a bugfix or feature you'd like to contribute, don't
hesitate to send it to us: [How to contribute](http://openidenabled.com/contribute/).
## Author
Copyright 2006-2012, JanRain, Inc.
Contact openid@janrain.com.
## License
Apache Software License. For more information see the LICENSE file.
================================================
FILE: Rakefile
================================================
#!/usr/bin/env rake
require 'bundler/gem_tasks'
require 'rake/testtask'
desc "Run tests"
Rake::TestTask.new('test') do |t|
t.libs << 'lib'
t.libs << 'test'
t.test_files = FileList["test/**/test_*.rb"]
t.verbose = false
end
task :default => :test
================================================
FILE: UPGRADE.md
================================================
# Upgrading from the OpenID 1.x series library
## Consumer Upgrade
The flow is largely the same, however there are a number of significant
changes. The consumer example is helpful to look at:
`examples/rails_openid/app/controllers/consumer_controller.rb`
### Stores
You will need to require the file for the store that you are using.
For the filesystem store, this is 'openid/stores/filesystem'
They are also now in modules. The filesystem store is
`OpenID::Store::Filesystem`
The format has changed, and you should remove your old store directory.
The ActiveRecord store (`examples/active_record_openid_store`) still needs
to be put in a plugin directory for your rails app. There's a migration
that needs to be run; examine the `README` in that directory.
Also, note that the stores now can be garbage collected with the method
`store.cleanup`
### Starting the OpenID transaction
The OpenIDRequest object no longer has status codes. Instead,
consumer.begin raises an OpenID::OpenIDError if there is a problem
initiating the transaction, so you'll want something along the lines of:
begin
openid_request = consumer.begin(params[:openid_identifier])
rescue OpenID::OpenIDError => e
# display error e
return
end
#success case
Data regarding the OpenID server once lived in
`openid_request.service`
The corresponding object in the 2.0 lib can be retrieved with
`openid_request.endpoint`
Getting the unverified identifier: Where you once had
`openid_request.identity_url`
you will now want
`openid_request.endpoint.claimed_id`
which might be different from what you get at the end of the transaction,
since it is now possible for users to enter their server's url directly.
Arguments on the return_to URL are now verified, so if you want to add
additional arguments to the return_to url, use
`openid_request.return_to_args['param'] = value`
Generating the redirect is the same as before, but add any extensions
first.
If you need to set up an SSL certificate authority list for the fetcher,
use the 'ca_file' attr_accessor on the `OpenID::StandardFetcher`. This has
changed from 'ca_path' in the 1.x.x series library. That is, set
`OpenID.fetcher.ca_file = '/path/to/ca.list'`
before calling consumer.begin.
### Requesting Simple Registration Data
You'll need to require the code for the extension
require 'openid/extensions/sreg'
The new code for adding an SReg request now looks like:
sreg_request = OpenID::SReg::Request.new
sreg_request.request_fields(['email', 'dob'], true) # required
sreg_request.request_fields(['nickname', 'fullname'], false) # optional
sreg_request.policy_url = policy_url
openid_request.add_extension(sreg_request)
The code for adding other extensions is similar. Code for the Attribute
Exchange (AX) and Provider Authentication Policy Extension (PAPE) are
included with the library, and additional extensions can be implemented
subclassing `OpenID::Extension`.
### Completing the transaction
The return_to and its arguments are verified, so you need to pass in
the base URL and the arguments. With Rails, the params method mashes
together parameters from GET, POST, and the path, so you'll need to pull
off the path "parameters" with something like
return_to = url_for(:only_path => false,
:controller => 'openid',
:action => 'complete')
parameters = params.reject{|k,v| request.path_parameters[k] }
openid_response = consumer.complete(parameters, return_to)
The response still uses the status codes, but they are now namespaced
slightly differently, for example `OpenID::Consumer::SUCCESS`
In the case of failure, the error message is now found in
`openid_response.message`
The identifier to display to the user can be found in
`openid_response.endpoint.display_identifier`
The Simple Registration response can be read from the OpenID response
with
sreg_response = OpenID::SReg::Response.from_success_response(openid_response)
nickname = sreg_response['nickname']
# etc.
## Server Upgrade
The server code is mostly the same as before, with the exception of
extensions. Also, you must pass in the endpoint URL to the server
constructor:
@server = OpenID::Server.new(store, server_url)
I recommend looking at
`examples/rails_openid/app/controllers/server_controller.rb`
for an example of the new way of doing extensions.
--
Dag Arneson, JanRain Inc.
Please direct questions to openid@janrain.com
================================================
FILE: admin/build-docs
================================================
#!/usr/bin/env bash
#
# Build the HTML documentation for the JanRain PHP OpenID library
#
# Usage:
# build-docs
#
# Must be run from the base of the repository
RDOC_FILES="README INSTALL LICENSE UPGRADE lib/openid examples/README"
MAIN=README
rdoc --main="$MAIN" $RDOC_FILES
================================================
FILE: admin/fixperms
================================================
#!/usr/bin/env bash
cat <<EOF | xargs chmod +x
admin/prepare-release
admin/build-docs
admin/fixperms
admin/runtests
admin/graph-require.sh
examples/discover
EOF
find "examples/rails_openid/script/" -type f | xargs chmod +x
================================================
FILE: admin/gettlds.py
================================================
"""
Fetch the current TLD list from the IANA Web site, parse it, and print
an expression suitable for direct insertion into each library's trust
root validation module
Usage:
python gettlds.py (php|python|ruby)
Then cut-n-paste.
"""
import urllib2
import sys
langs = {
'php': (r"'/\.(",
"'", "|", "|' .",
r")\.?$/'"),
'python': ("['",
"'", "', '", "',",
"']"),
'ruby': ("%w'",
"", " ", "",
"'"),
}
lang = sys.argv[1]
prefix, line_prefix, separator, line_suffix, suffix = langs[lang]
f = urllib2.urlopen('http://data.iana.org/TLD/tlds-alpha-by-domain.txt')
tlds = []
output_line = ""
for input_line in f:
if input_line.startswith('#'):
continue
tld = input_line.strip().lower()
new_output_line = output_line + prefix + tld
if len(new_output_line) > 60:
print output_line + line_suffix
output_line = line_prefix + tld
else:
output_line = new_output_line
prefix = separator
print output_line + suffix
================================================
FILE: admin/graph-require.sh
================================================
#!/usr/bin/env bash
OUTPUT_FILE="deps.png"
if [ ! "$1" ] ; then
echo "Usage: graph-require.sh <lib_directory> [output_filename]"
exit 1
fi
if [ "$2" ] ; then
OUTPUT_FILE=$2
fi
grep -r '^ *require ['"'"'"]' $1 > require.txt
python <<EOF
import re
import pydot
import sys
parse_require = re.compile(
'\\\\blib/([^:]+).rb: *require ["\\']([^"\\']+)[\\'"]\$',
re.MULTILINE)
matches = [(file, dep) for (file, dep)
in parse_require.findall(file('require.txt').read())
if re.match('(yadis|openid)($|/)', dep)
]
g = pydot.graph_from_edges(matches, directed=True)
g.write_png('$OUTPUT_FILE')
EOF
================================================
FILE: admin/library-name
================================================
ruby-openid
================================================
FILE: admin/mkassoc
================================================
#!/usr/bin/env ruby
require "openid/consumer/associationmanager"
require "openid/store/memory"
store = OpenID::Store::Memory.new
ARGV.each do |server_url|
unless URI::regexp =~ server_url
puts "`#{server_url}` will be skipped for invalid URI format."
next
end
mgr = OpenID::Consumer::AssociationManager.new(store, server_url)
puts '=' * 50
puts "Server: #{server_url}"
puts mgr.get_association.serialize
puts '-' * 50
end
================================================
FILE: admin/prepare-release
================================================
#!/usr/bin/env bash
#
# Prepare this repository for release
#
# required tools:
# rdoc
# darcs
set -e
HERE=$(readlink --canonicalize $(dirname "$0"))
ROOT=$(dirname "$HERE")
cd "$ROOT"
# set permissions
bash ./admin/fixperms
# build documentation
./admin/build-docs
# build changelog
darcs changes --from-tag . --summary > CHANGELOG
================================================
FILE: admin/runtests
================================================
#!/usr/bin/env bash
case "$1" in
--coverage)
shift
RUBY="rcov --exclude=^lib/hmac/,^admin/ --sort=coverage"
;;
*)
RUBY="ruby"
;;
esac
HERE=$(dirname $(readlink --canonicalize "$0"))
REPOROOT=$(dirname "$HERE")
TESTING_MEMCACHE="localhost:11211" RUBYLIB="$REPOROOT/lib" $RUBY "$@" "$REPOROOT/admin/runtests.rb"
================================================
FILE: examples/README.md
================================================
This directory contains several examples that demonstrate use of the
OpenID library. Make sure you have properly installed the library
before running the examples. These examples are a great place to
start in integrating OpenID into your application.
## Rails example
The `rails_openid` directory contains a fully functional OpenID server and relying
party, and acts as a starting point for implementing your own
production rails server. You'll need the latest version of Ruby on
Rails installed, and then:
```shell
cd rails_openid
./script/server
```
Open a web browser to http://localhost:3000/ and follow the instructions.
The relevant code to work from when writing your Rails OpenID Relying
Party is:
rails_openid/app/controllers/consumer_controller.rb
If you are working on an OpenID provider, check out
rails_openid/app/controllers/server_controller.rb
Since the library and examples are Apache-licensed, don't be shy about
copy-and-paste.
## Rails ActiveRecord OpenIDStore plugin
For various reasons you may want or need to deploy your ruby openid
consumer/server using an SQL based store. The `active_record_openid_store`
is a plugin that makes using an SQL based store simple. Follow the
README inside the plugin's dir for usage.
================================================
FILE: examples/active_record_openid_store/README
================================================
=Active Record OpenID Store Plugin
A store is required by an OpenID server and optionally by the consumer
to store associations, nonces, and auth key information across
requests and processes. If rails is distributed across several
machines, they must must all have access to the same OpenID store
data, so the FilesystemStore won't do.
This directory contains a plugin for connecting your
OpenID enabled rails app to an ActiveRecord based OpenID store.
==Install
1) Copy this directory and all it's contents into your
RAILS_ROOT/vendor/plugins directory. You structure should look like
this:
RAILS_ROOT/vendor/plugins/active_record_openid_store/
2) Copy the migration, XXX_add_open_id_store_to_db.rb to your
RAILS_ROOT/db/migrate directory. Rename the XXX portion of the
file to next sequential migration number.
3) Run the migration:
rake migrate
4) Change your app to use the ActiveRecordOpenIDStore:
store = ActiveRecordOpenIDStore.new
consumer = OpenID::Consumer.new(session, store)
5) That's it! All your OpenID state will now be stored in the database.
==Upgrade
If you are upgrading from the 1.x ActiveRecord store, replace your old
RAILS_ROOT/vendor/plugins/active_record_openid_store/ directory with
the new one and run the migration XXX_upgrade_open_id_store.rb.
==What about garbage collection?
You may garbage collect unused nonces and expired associations using
the gc instance method of ActiveRecordOpenIDStore. Hook it up to a
task in your app's Rakefile like so:
desc 'GC OpenID store, deleting expired nonces and associations'
task :gc_openid_store => :environment do
require 'openid_ar_store'
nonces, associations = ActiveRecordStore.new.cleanup
puts "Deleted #{nonces} nonces, #{associations} associations"
end
Run it by typing:
rake gc_openid_store
==Questions?
Contact Dag Arneson: dag at janrain dot com
================================================
FILE: examples/active_record_openid_store/XXX_add_open_id_store_to_db.rb
================================================
# Use this migration to create the tables for the ActiveRecord store
class AddOpenIdStoreToDb < ActiveRecord::Migration
def self.up
create_table "open_id_associations", :force => true do |t|
t.column "server_url", :string, :null => false
t.column "handle", :string, :null => false
t.column "secret", :binary, :null => false
t.column "issued", :integer, :null => false
t.column "lifetime", :integer, :null => false
t.column "assoc_type", :string, :null => false
end
create_table "open_id_nonces", :force => true do |t|
t.column :server_url, :string, :null => false
t.column :timestamp, :integer, :null => false
t.column :salt, :string, :null => false
end
end
def self.down
drop_table "open_id_associations"
drop_table "open_id_nonces"
end
end
================================================
FILE: examples/active_record_openid_store/XXX_upgrade_open_id_store.rb
================================================
# Use this migration to upgrade the old 1.1 ActiveRecord store schema
# to the new 2.0 schema.
class UpgradeOpenIdStore < ActiveRecord::Migration
def self.up
drop_table "open_id_settings"
drop_table "open_id_nonces"
create_table "open_id_nonces", :force => true do |t|
t.column :server_url, :string, :null => false
t.column :timestamp, :integer, :null => false
t.column :salt, :string, :null => false
end
end
def self.down
drop_table "open_id_nonces"
create_table "open_id_nonces", :force => true do |t|
t.column "nonce", :string
t.column "created", :integer
end
create_table "open_id_settings", :force => true do |t|
t.column "setting", :string
t.column "value", :binary
end
end
end
================================================
FILE: examples/active_record_openid_store/init.rb
================================================
# might using the ruby-openid gem
begin
require 'rubygems'
rescue LoadError
nil
end
require 'openid'
require 'openid_ar_store'
================================================
FILE: examples/active_record_openid_store/lib/association.rb
================================================
require 'openid/association'
require 'time'
class Association < ActiveRecord::Base
set_table_name 'open_id_associations'
def from_record
OpenID::Association.new(handle, secret, Time.at(issued), lifetime, assoc_type)
end
end
================================================
FILE: examples/active_record_openid_store/lib/nonce.rb
================================================
class Nonce < ActiveRecord::Base
set_table_name 'open_id_nonces'
end
================================================
FILE: examples/active_record_openid_store/lib/open_id_setting.rb
================================================
class OpenIdSetting < ActiveRecord::Base
validates_uniqueness_of :setting
end
================================================
FILE: examples/active_record_openid_store/lib/openid_ar_store.rb
================================================
require 'association'
require 'nonce'
require 'openid/store/interface'
# not in OpenID module to avoid namespace conflict
class ActiveRecordStore < OpenID::Store::Interface
def store_association(server_url, assoc)
remove_association(server_url, assoc.handle)
Association.create!(:server_url => server_url,
:handle => assoc.handle,
:secret => assoc.secret,
:issued => assoc.issued.to_i,
:lifetime => assoc.lifetime,
:assoc_type => assoc.assoc_type)
end
def get_association(server_url, handle=nil)
assocs = if handle.blank?
Association.find_all_by_server_url(server_url)
else
Association.find_all_by_server_url_and_handle(server_url, handle)
end
assocs.reverse.each do |assoc|
a = assoc.from_record
if a.expires_in == 0
assoc.destroy
else
return a
end
end if assocs.any?
return nil
end
def remove_association(server_url, handle)
Association.delete_all(['server_url = ? AND handle = ?', server_url, handle]) > 0
end
def use_nonce(server_url, timestamp, salt)
return false if Nonce.find_by_server_url_and_timestamp_and_salt(server_url, timestamp, salt)
return false if (timestamp - Time.now.to_i).abs > OpenID::Nonce.skew
Nonce.create!(:server_url => server_url, :timestamp => timestamp, :salt => salt)
return true
end
def cleanup_nonces
now = Time.now.to_i
Nonce.delete_all(["timestamp > ? OR timestamp < ?", now + OpenID::Nonce.skew, now - OpenID::Nonce.skew])
end
def cleanup_associations
now = Time.now.to_i
Association.delete_all(['issued + lifetime < ?',now])
end
end
================================================
FILE: examples/active_record_openid_store/test/store_test.rb
================================================
$:.unshift(File.dirname(__FILE__) + '/../lib')
require 'test/unit'
RAILS_ENV = "test"
require File.expand_path(File.join(File.dirname(__FILE__), '../../../../config/environment.rb'))
module StoreTestCase
@@allowed_handle = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~'
@@allowed_nonce = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
def _gen_nonce
OpenID::CryptUtil.random_string(8, @@allowed_nonce)
end
def _gen_handle(n)
OpenID::CryptUtil.random_string(n, @@allowed_handle)
end
def _gen_secret(n, chars=nil)
OpenID::CryptUtil.random_string(n, chars)
end
def _gen_assoc(issued, lifetime=600)
secret = _gen_secret(20)
handle = _gen_handle(128)
OpenID::Association.new(handle, secret, Time.now + issued, lifetime,
'HMAC-SHA1')
end
def _check_retrieve(url, handle=nil, expected=nil)
ret_assoc = @store.get_association(url, handle)
if expected.nil?
assert_nil(ret_assoc)
else
assert_equal(expected, ret_assoc)
assert_equal(expected.handle, ret_assoc.handle)
assert_equal(expected.secret, ret_assoc.secret)
end
end
def _check_remove(url, handle, expected)
present = @store.remove_association(url, handle)
assert_equal(expected, present)
end
def test_store
server_url = "http://www.myopenid.com/openid"
assoc = _gen_assoc(issued=0)
# Make sure that a missing association returns no result
_check_retrieve(server_url)
# Check that after storage, getting returns the same result
@store.store_association(server_url, assoc)
_check_retrieve(server_url, nil, assoc)
# more than once
_check_retrieve(server_url, nil, assoc)
# Storing more than once has no ill effect
@store.store_association(server_url, assoc)
_check_retrieve(server_url, nil, assoc)
# Removing an association that does not exist returns not present
_check_remove(server_url, assoc.handle + 'x', false)
# Removing an association that does not exist returns not present
_check_remove(server_url + 'x', assoc.handle, false)
# Removing an association that is present returns present
_check_remove(server_url, assoc.handle, true)
# but not present on subsequent calls
_check_remove(server_url, assoc.handle, false)
# Put assoc back in the store
@store.store_association(server_url, assoc)
# More recent and expires after assoc
assoc2 = _gen_assoc(issued=1)
@store.store_association(server_url, assoc2)
# After storing an association with a different handle, but the
# same server_url, the handle with the later expiration is returned.
_check_retrieve(server_url, nil, assoc2)
# We can still retrieve the older association
_check_retrieve(server_url, assoc.handle, assoc)
# Plus we can retrieve the association with the later expiration
# explicitly
_check_retrieve(server_url, assoc2.handle, assoc2)
# More recent, and expires earlier than assoc2 or assoc. Make sure
# that we're picking the one with the latest issued date and not
# taking into account the expiration.
assoc3 = _gen_assoc(issued=2, lifetime=100)
@store.store_association(server_url, assoc3)
_check_retrieve(server_url, nil, assoc3)
_check_retrieve(server_url, assoc.handle, assoc)
_check_retrieve(server_url, assoc2.handle, assoc2)
_check_retrieve(server_url, assoc3.handle, assoc3)
_check_remove(server_url, assoc2.handle, true)
_check_retrieve(server_url, nil, assoc3)
_check_retrieve(server_url, assoc.handle, assoc)
_check_retrieve(server_url, assoc2.handle, nil)
_check_retrieve(server_url, assoc3.handle, assoc3)
_check_remove(server_url, assoc2.handle, false)
_check_remove(server_url, assoc3.handle, true)
_check_retrieve(server_url, nil, assoc)
_check_retrieve(server_url, assoc.handle, assoc)
_check_retrieve(server_url, assoc2.handle, nil)
_check_retrieve(server_url, assoc3.handle, nil)
_check_remove(server_url, assoc2.handle, false)
_check_remove(server_url, assoc.handle, true)
_check_remove(server_url, assoc3.handle, false)
_check_retrieve(server_url, nil, nil)
_check_retrieve(server_url, assoc.handle, nil)
_check_retrieve(server_url, assoc2.handle, nil)
_check_retrieve(server_url, assoc3.handle, nil)
_check_remove(server_url, assoc2.handle, false)
_check_remove(server_url, assoc.handle, false)
_check_remove(server_url, assoc3.handle, false)
assocValid1 = _gen_assoc(-3600, 7200)
assocValid2 = _gen_assoc(-5)
assocExpired1 = _gen_assoc(-7200, 3600)
assocExpired2 = _gen_assoc(-7200, 3600)
@store.cleanup_associations
@store.store_association(server_url + '1', assocValid1)
@store.store_association(server_url + '1', assocExpired1)
@store.store_association(server_url + '2', assocExpired2)
@store.store_association(server_url + '3', assocValid2)
cleaned = @store.cleanup_associations()
assert_equal(2, cleaned, "cleaned up associations")
end
def _check_use_nonce(nonce, expected, server_url, msg='')
stamp, salt = OpenID::Nonce::split_nonce(nonce)
actual = @store.use_nonce(server_url, stamp, salt)
assert_equal(expected, actual, msg)
end
def test_nonce
server_url = "http://www.myopenid.com/openid"
[server_url, ''].each{|url|
nonce1 = OpenID::Nonce::mk_nonce
_check_use_nonce(nonce1, true, url, "#{url}: nonce allowed by default")
_check_use_nonce(nonce1, false, url, "#{url}: nonce not allowed twice")
_check_use_nonce(nonce1, false, url, "#{url}: nonce not allowed third time")
# old nonces shouldn't pass
old_nonce = OpenID::Nonce::mk_nonce(3600)
_check_use_nonce(old_nonce, false, url, "Old nonce #{old_nonce.inspect} passed")
}
now = Time.now.to_i
old_nonce1 = OpenID::Nonce::mk_nonce(now - 20000)
old_nonce2 = OpenID::Nonce::mk_nonce(now - 10000)
recent_nonce = OpenID::Nonce::mk_nonce(now - 600)
orig_skew = OpenID::Nonce.skew
OpenID::Nonce.skew = 0
count = @store.cleanup_nonces
OpenID::Nonce.skew = 1000000
ts, salt = OpenID::Nonce::split_nonce(old_nonce1)
assert(@store.use_nonce(server_url, ts, salt), "oldnonce1")
ts, salt = OpenID::Nonce::split_nonce(old_nonce2)
assert(@store.use_nonce(server_url, ts, salt), "oldnonce2")
ts, salt = OpenID::Nonce::split_nonce(recent_nonce)
assert(@store.use_nonce(server_url, ts, salt), "recent_nonce")
OpenID::Nonce.skew = 1000
cleaned = @store.cleanup_nonces
assert_equal(2, cleaned, "Cleaned #{cleaned} nonces")
OpenID::Nonce.skew = 100000
ts, salt = OpenID::Nonce::split_nonce(old_nonce1)
assert(@store.use_nonce(server_url, ts, salt), "oldnonce1 after cleanup")
ts, salt = OpenID::Nonce::split_nonce(old_nonce2)
assert(@store.use_nonce(server_url, ts, salt), "oldnonce2 after cleanup")
ts, salt = OpenID::Nonce::split_nonce(recent_nonce)
assert(!@store.use_nonce(server_url, ts, salt), "recent_nonce after cleanup")
OpenID::Nonce.skew = orig_skew
end
end
class TestARStore < Test::Unit::TestCase
include StoreTestCase
def setup
@store = ActiveRecordStore.new
end
end
================================================
FILE: examples/discover
================================================
#!/usr/bin/env ruby
require "openid/consumer/discovery"
require 'openid/fetchers'
OpenID::fetcher_use_env_http_proxy
$names = [[:server_url, "Server URL "],
[:local_id, "Local ID "],
[:canonical_id, "Canonical ID"],
]
def show_services(user_input, normalized, services)
puts " Claimed identifier: #{normalized}"
if services.empty?
puts " No OpenID services found"
puts
else
puts " Discovered services:"
n = 0
services.each do |service|
n += 1
puts " #{n}."
$names.each do |meth, name|
val = service.send(meth)
if val
printf(" %s: %s\n", name, val)
end
end
puts " Type URIs:"
for type_uri in service.type_uris
puts " * #{type_uri}"
end
puts
end
end
end
ARGV.each do |openid_identifier|
puts "=" * 50
puts "Running discovery on #{openid_identifier}"
begin
normalized_identifier, services = OpenID.discover(openid_identifier)
rescue OpenID::DiscoveryFailure => why
puts "Discovery failed: #{why.message}"
puts
else
show_services(openid_identifier, normalized_identifier, services)
end
end
================================================
FILE: examples/rails_openid/Gemfile
================================================
source 'https://rubygems.org'
gem 'rails', '3.2.13'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3'
gem 'json'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platforms => :ruby
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# To use Jbuilder templates for JSON
# gem 'jbuilder'
# Use unicorn as the app server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# gem 'ruby-debug'
gem 'ruby-openid', :require => 'openid'
================================================
FILE: examples/rails_openid/README
================================================
== Welcome to Rails
Rails is a web-application and persistence framework that includes everything
needed to create database-backed web-applications according to the
Model-View-Control pattern of separation. This pattern splits the view (also
called the presentation) into "dumb" templates that are primarily responsible
for inserting pre-built data in between HTML tags. The model contains the
"smart" domain objects (such as Account, Product, Person, Post) that holds all
the business logic and knows how to persist themselves to a database. The
controller handles the incoming requests (such as Save New Account, Update
Product, Show Post) by manipulating the model and directing data to the view.
In Rails, the model is handled by what's called an object-relational mapping
layer entitled Active Record. This layer allows you to present the data from
database rows as objects and embellish these data objects with business logic
methods. You can read more about Active Record in
link:files/vendor/rails/activerecord/README.html.
The controller and view are handled by the Action Pack, which handles both
layers by its two parts: Action View and Action Controller. These two layers
are bundled in a single package due to their heavy interdependence. This is
unlike the relationship between the Active Record and Action Pack that is much
more separate. Each of these packages can be used independently outside of
Rails. You can read more about Action Pack in
link:files/vendor/rails/actionpack/README.html.
== Getting started
1. Run the WEBrick servlet: <tt>ruby script/server</tt> (run with --help for options)
...or if you have lighttpd installed: <tt>ruby script/lighttpd</tt> (it's faster)
2. Go to http://localhost:3000/ and get "Congratulations, you've put Ruby on Rails!"
3. Follow the guidelines on the "Congratulations, you've put Ruby on Rails!" screen
== Example for Apache conf
<VirtualHost *:80>
ServerName rails
DocumentRoot /path/application/public/
ErrorLog /path/application/log/server.log
<Directory /path/application/public/>
Options ExecCGI FollowSymLinks
AllowOverride all
Allow from all
Order allow,deny
</Directory>
</VirtualHost>
NOTE: Be sure that CGIs can be executed in that directory as well. So ExecCGI
should be on and ".cgi" should respond. All requests from 127.0.0.1 go
through CGI, so no Apache restart is necessary for changes. All other requests
go through FCGI (or mod_ruby), which requires a restart to show changes.
== Debugging Rails
Have "tail -f" commands running on both the server.log, production.log, and
test.log files. Rails will automatically display debugging and runtime
information to these files. Debugging info will also be shown in the browser
on requests from 127.0.0.1.
== Breakpoints
Breakpoint support is available through the script/breakpointer client. This
means that you can break out of execution at any point in the code, investigate
and change the model, AND then resume execution! Example:
class WeblogController < ActionController::Base
def index
@posts = Post.find_all
breakpoint "Breaking out from the list"
end
end
So the controller will accept the action, run the first line, then present you
with a IRB prompt in the breakpointer window. Here you can do things like:
Executing breakpoint "Breaking out from the list" at .../webrick_server.rb:16 in 'breakpoint'
>> @posts.inspect
=> "[#<Post:0x14a6be8 @attributes={\"title\"=>nil, \"body\"=>nil, \"id\"=>\"1\"}>,
#<Post:0x14a6620 @attributes={\"title\"=>\"Rails you know!\", \"body\"=>\"Only ten..\", \"id\"=>\"2\"}>]"
>> @posts.first.title = "hello from a breakpoint"
=> "hello from a breakpoint"
...and even better is that you can examine how your runtime objects actually work:
>> f = @posts.first
=> #<Post:0x13630c4 @attributes={"title"=>nil, "body"=>nil, "id"=>"1"}>
>> f.
Display all 152 possibilities? (y or n)
Finally, when you're ready to resume execution, you press CTRL-D
== Console
You can interact with the domain model by starting the console through script/console.
Here you'll have all parts of the application configured, just like it is when the
application is running. You can inspect domain models, change values, and save to the
database. Starting the script without arguments will launch it in the development environment.
Passing an argument will specify a different environment, like <tt>console production</tt>.
== Description of contents
app
Holds all the code that's specific to this particular application.
app/controllers
Holds controllers that should be named like weblog_controller.rb for
automated URL mapping. All controllers should descend from
ActionController::Base.
app/models
Holds models that should be named like post.rb.
Most models will descend from ActiveRecord::Base.
app/views
Holds the template files for the view that should be named like
weblog/index.rhtml for the WeblogController#index action. All views use eRuby
syntax. This directory can also be used to keep stylesheets, images, and so on
that can be symlinked to public.
app/helpers
Holds view helpers that should be named like weblog_helper.rb.
config
Configuration files for the Rails environment, the routing map, the database, and other dependencies.
components
Self-contained mini-applications that can bundle together controllers, models, and views.
lib
Application specific libraries. Basically, any kind of custom code that doesn't
belong under controllers, models, or helpers. This directory is in the load path.
public
The directory available for the web server. Contains subdirectories for images, stylesheets,
and javascripts. Also contains the dispatchers and the default HTML files.
script
Helper scripts for automation and generation.
test
Unit and functional tests along with fixtures.
vendor
External libraries that the application depends on. Also includes the plugins subdirectory.
This directory is in the load path.
================================================
FILE: examples/rails_openid/README.rdoc
================================================
== Welcome to Rails
Rails is a web-application framework that includes everything needed to create
database-backed web applications according to the Model-View-Control pattern.
This pattern splits the view (also called the presentation) into "dumb"
templates that are primarily responsible for inserting pre-built data in between
HTML tags. The model contains the "smart" domain objects (such as Account,
Product, Person, Post) that holds all the business logic and knows how to
persist themselves to a database. The controller handles the incoming requests
(such as Save New Account, Update Product, Show Post) by manipulating the model
and directing data to the view.
In Rails, the model is handled by what's called an object-relational mapping
layer entitled Active Record. This layer allows you to present the data from
database rows as objects and embellish these data objects with business logic
methods. You can read more about Active Record in
link:files/vendor/rails/activerecord/README.html.
The controller and view are handled by the Action Pack, which handles both
layers by its two parts: Action View and Action Controller. These two layers
are bundled in a single package due to their heavy interdependence. This is
unlike the relationship between the Active Record and Action Pack that is much
more separate. Each of these packages can be used independently outside of
Rails. You can read more about Action Pack in
link:files/vendor/rails/actionpack/README.html.
== Getting Started
1. At the command prompt, create a new Rails application:
<tt>rails new myapp</tt> (where <tt>myapp</tt> is the application name)
2. Change directory to <tt>myapp</tt> and start the web server:
<tt>cd myapp; rails server</tt> (run with --help for options)
3. Go to http://localhost:3000/ and you'll see:
"Welcome aboard: You're riding Ruby on Rails!"
4. Follow the guidelines to start developing your application. You can find
the following resources handy:
* The Getting Started Guide: http://guides.rubyonrails.org/getting_started.html
* Ruby on Rails Tutorial Book: http://www.railstutorial.org/
== Debugging Rails
Sometimes your application goes wrong. Fortunately there are a lot of tools that
will help you debug it and get it back on the rails.
First area to check is the application log files. Have "tail -f" commands
running on the server.log and development.log. Rails will automatically display
debugging and runtime information to these files. Debugging info will also be
shown in the browser on requests from 127.0.0.1.
You can also log your own messages directly into the log file from your code
using the Ruby logger class from inside your controllers. Example:
class WeblogController < ActionController::Base
def destroy
@weblog = Weblog.find(params[:id])
@weblog.destroy
logger.info("#{Time.now} Destroyed Weblog ID ##{@weblog.id}!")
end
end
The result will be a message in your log file along the lines of:
Mon Oct 08 14:22:29 +1000 2007 Destroyed Weblog ID #1!
More information on how to use the logger is at http://www.ruby-doc.org/core/
Also, Ruby documentation can be found at http://www.ruby-lang.org/. There are
several books available online as well:
* Programming Ruby: http://www.ruby-doc.org/docs/ProgrammingRuby/ (Pickaxe)
* Learn to Program: http://pine.fm/LearnToProgram/ (a beginners guide)
These two books will bring you up to speed on the Ruby language and also on
programming in general.
== Debugger
Debugger support is available through the debugger command when you start your
Mongrel or WEBrick server with --debugger. This means that you can break out of
execution at any point in the code, investigate and change the model, and then,
resume execution! You need to install ruby-debug to run the server in debugging
mode. With gems, use <tt>sudo gem install ruby-debug</tt>. Example:
class WeblogController < ActionController::Base
def index
@posts = Post.all
debugger
end
end
So the controller will accept the action, run the first line, then present you
with a IRB prompt in the server window. Here you can do things like:
>> @posts.inspect
=> "[#<Post:0x14a6be8
@attributes={"title"=>nil, "body"=>nil, "id"=>"1"}>,
#<Post:0x14a6620
@attributes={"title"=>"Rails", "body"=>"Only ten..", "id"=>"2"}>]"
>> @posts.first.title = "hello from a debugger"
=> "hello from a debugger"
...and even better, you can examine how your runtime objects actually work:
>> f = @posts.first
=> #<Post:0x13630c4 @attributes={"title"=>nil, "body"=>nil, "id"=>"1"}>
>> f.
Display all 152 possibilities? (y or n)
Finally, when you're ready to resume execution, you can enter "cont".
== Console
The console is a Ruby shell, which allows you to interact with your
application's domain model. Here you'll have all parts of the application
configured, just like it is when the application is running. You can inspect
domain models, change values, and save to the database. Starting the script
without arguments will launch it in the development environment.
To start the console, run <tt>rails console</tt> from the application
directory.
Options:
* Passing the <tt>-s, --sandbox</tt> argument will rollback any modifications
made to the database.
* Passing an environment name as an argument will load the corresponding
environment. Example: <tt>rails console production</tt>.
To reload your controllers and models after launching the console run
<tt>reload!</tt>
More information about irb can be found at:
link:http://www.rubycentral.org/pickaxe/irb.html
== dbconsole
You can go to the command line of your database directly through <tt>rails
dbconsole</tt>. You would be connected to the database with the credentials
defined in database.yml. Starting the script without arguments will connect you
to the development database. Passing an argument will connect you to a different
database, like <tt>rails dbconsole production</tt>. Currently works for MySQL,
PostgreSQL and SQLite 3.
== Description of Contents
The default directory structure of a generated Ruby on Rails application:
|-- app
| |-- assets
| | |-- images
| | |-- javascripts
| | `-- stylesheets
| |-- controllers
| |-- helpers
| |-- mailers
| |-- models
| `-- views
| `-- layouts
|-- config
| |-- environments
| |-- initializers
| `-- locales
|-- db
|-- doc
|-- lib
| |-- assets
| `-- tasks
|-- log
|-- public
|-- script
|-- test
| |-- fixtures
| |-- functional
| |-- integration
| |-- performance
| `-- unit
|-- tmp
| `-- cache
| `-- assets
`-- vendor
|-- assets
| |-- javascripts
| `-- stylesheets
`-- plugins
app
Holds all the code that's specific to this particular application.
app/assets
Contains subdirectories for images, stylesheets, and JavaScript files.
app/controllers
Holds controllers that should be named like weblogs_controller.rb for
automated URL mapping. All controllers should descend from
ApplicationController which itself descends from ActionController::Base.
app/models
Holds models that should be named like post.rb. Models descend from
ActiveRecord::Base by default.
app/views
Holds the template files for the view that should be named like
weblogs/index.html.erb for the WeblogsController#index action. All views use
eRuby syntax by default.
app/views/layouts
Holds the template files for layouts to be used with views. This models the
common header/footer method of wrapping views. In your views, define a layout
using the <tt>layout :default</tt> and create a file named default.html.erb.
Inside default.html.erb, call <% yield %> to render the view using this
layout.
app/helpers
Holds view helpers that should be named like weblogs_helper.rb. These are
generated for you automatically when using generators for controllers.
Helpers can be used to wrap functionality for your views into methods.
config
Configuration files for the Rails environment, the routing map, the database,
and other dependencies.
db
Contains the database schema in schema.rb. db/migrate contains all the
sequence of Migrations for your schema.
doc
This directory is where your application documentation will be stored when
generated using <tt>rake doc:app</tt>
lib
Application specific libraries. Basically, any kind of custom code that
doesn't belong under controllers, models, or helpers. This directory is in
the load path.
public
The directory available for the web server. Also contains the dispatchers and the
default HTML files. This should be set as the DOCUMENT_ROOT of your web
server.
script
Helper scripts for automation and generation.
test
Unit and functional tests along with fixtures. When using the rails generate
command, template test files will be generated for you and placed in this
directory.
vendor
External libraries that the application depends on. Also includes the plugins
subdirectory. If the app has frozen rails, those gems also go here, under
vendor/rails/. This directory is in the load path.
================================================
FILE: examples/rails_openid/Rakefile
================================================
#!/usr/bin/env rake
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
require File.expand_path('../config/application', __FILE__)
RailsOpenid::Application.load_tasks
================================================
FILE: examples/rails_openid/app/assets/javascripts/application.js
================================================
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// the compiled file.
//
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
// GO AFTER THE REQUIRES BELOW.
//
//= require jquery
//= require jquery_ujs
//= require_tree .
================================================
FILE: examples/rails_openid/app/assets/stylesheets/application.css
================================================
/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
*
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the top of the
* compiled file, but it's generally better to create a new file per style scope.
*
*= require_self
*= require_tree .
*/
================================================
FILE: examples/rails_openid/app/controllers/application_controller.rb
================================================
class ApplicationController < ActionController::Base
protect_from_forgery
end
================================================
FILE: examples/rails_openid/app/controllers/consumer_controller.rb
================================================
require 'pathname'
require "openid"
require 'openid/extensions/sreg'
require 'openid/extensions/pape'
require 'openid/store/filesystem'
class ConsumerController < ApplicationController
layout nil
def index
# render an openid form
end
def start
begin
identifier = params[:openid_identifier]
if identifier.nil?
flash[:error] = "Enter an OpenID identifier"
redirect_to :action => 'index'
return
end
oidreq = consumer.begin(identifier)
rescue OpenID::OpenIDError => e
flash[:error] = "Discovery failed for #{identifier}: #{e}"
redirect_to :action => 'index'
return
end
if params[:use_sreg]
sregreq = OpenID::SReg::Request.new
# required fields
sregreq.request_fields(['email','nickname'], true)
# optional fields
sregreq.request_fields(['dob', 'fullname'], false)
oidreq.add_extension(sregreq)
oidreq.return_to_args['did_sreg'] = 'y'
end
if params[:use_pape]
papereq = OpenID::PAPE::Request.new
papereq.add_policy_uri(OpenID::PAPE::AUTH_PHISHING_RESISTANT)
papereq.max_auth_age = 2*60*60
oidreq.add_extension(papereq)
oidreq.return_to_args['did_pape'] = 'y'
end
if params[:force_post]
oidreq.return_to_args['force_post']='x'*2048
end
return_to = url_for :action => 'complete', :only_path => false
realm = url_for :action => 'index', :id => nil, :only_path => false
if oidreq.send_redirect?(realm, return_to, params[:immediate])
redirect_to oidreq.redirect_url(realm, return_to, params[:immediate])
else
render :text => oidreq.html_markup(realm, return_to, params[:immediate], {'id' => 'openid_form'})
end
end
def complete
# FIXME - url_for some action is not necessarily the current URL.
current_url = url_for(:action => 'complete', :only_path => false)
parameters = params.reject{|k,v|request.path_parameters[k]}
parameters.reject!{|k,v|%w{action controller}.include? k.to_s}
oidresp = consumer.complete(parameters, current_url)
case oidresp.status
when OpenID::Consumer::FAILURE
if oidresp.display_identifier
flash[:error] = ("Verification of #{oidresp.display_identifier}"\
" failed: #{oidresp.message}")
else
flash[:error] = "Verification failed: #{oidresp.message}"
end
when OpenID::Consumer::SUCCESS
flash[:success] = ("Verification of #{oidresp.display_identifier}"\
" succeeded.")
if params[:did_sreg]
sreg_resp = OpenID::SReg::Response.from_success_response(oidresp)
sreg_message = "Simple Registration data was requested"
if sreg_resp.empty?
sreg_message << ", but none was returned."
else
sreg_message << ". The following data were sent:"
sreg_resp.data.each {|k,v|
sreg_message << "<br/><b>#{k}</b>: #{v}"
}
end
flash[:sreg_results] = sreg_message
end
if params[:did_pape]
pape_resp = OpenID::PAPE::Response.from_success_response(oidresp)
pape_message = "A phishing resistant authentication method was requested"
if pape_resp.auth_policies.member? OpenID::PAPE::AUTH_PHISHING_RESISTANT
pape_message << ", and the server reported one."
else
pape_message << ", but the server did not report one."
end
if pape_resp.auth_time
pape_message << "<br><b>Authentication time:</b> #{pape_resp.auth_time} seconds"
end
if pape_resp.nist_auth_level
pape_message << "<br><b>NIST Auth Level:</b> #{pape_resp.nist_auth_level}"
end
flash[:pape_results] = pape_message
end
when OpenID::Consumer::SETUP_NEEDED
flash[:alert] = "Immediate request failed - Setup Needed"
when OpenID::Consumer::CANCEL
flash[:alert] = "OpenID transaction cancelled."
else
end
redirect_to :action => 'index'
end
private
def consumer
if @consumer.nil?
dir = Pathname.new(RAILS_ROOT).join('db').join('cstore')
store = OpenID::Store::Filesystem.new(dir)
@consumer = OpenID::Consumer.new(session, store)
end
return @consumer
end
end
================================================
FILE: examples/rails_openid/app/controllers/login_controller.rb
================================================
# Controller for handling the login, logout process for "users" of our
# little server. Users have no password. This is just an example.
require 'openid'
class LoginController < ApplicationController
layout 'server'
def base_url
url_for(:controller => 'login', :action => nil, :only_path => false)
end
def index
response.headers['X-XRDS-Location'] = url_for(:controller => "server",
:action => "idp_xrds",
:only_path => false)
@base_url = base_url
# just show the login page
end
def submit
user = params[:username]
# if we get a user, log them in by putting their username in
# the session hash.
unless user.nil?
session[:username] = user unless user.nil?
session[:approvals] = []
flash[:notice] = "Your OpenID URL is <b>#{base_url}user/#{user}</b><br/><br/>Proceed to step 2 below."
else
flash[:error] = "Sorry, couldn't log you in. Try again."
end
redirect_to :action => 'index'
end
def logout
# delete the username from the session hash
session[:username] = nil
session[:approvals] = nil
redirect_to :action => 'index'
end
end
================================================
FILE: examples/rails_openid/app/controllers/server_controller.rb
================================================
require 'pathname'
require "openid"
require "openid/consumer/discovery"
require 'openid/extensions/sreg'
require 'openid/extensions/pape'
require 'openid/store/filesystem'
class ServerController < ApplicationController
include ServerHelper
include OpenID::Server
layout nil
def index
begin
oidreq = server.decode_request(params)
rescue ProtocolError => e
# invalid openid request, so just display a page with an error message
render :text => e.to_s, :status => 500
return
end
# no openid.mode was given
unless oidreq
render :text => "This is an OpenID server endpoint."
return
end
oidresp = nil
if oidreq.kind_of?(CheckIDRequest)
identity = oidreq.identity
if oidreq.id_select
if oidreq.immediate
oidresp = oidreq.answer(false)
elsif session[:username].nil?
# The user hasn't logged in.
show_decision_page(oidreq)
return
else
# Else, set the identity to the one the user is using.
identity = url_for_user
end
end
if oidresp
nil
elsif self.is_authorized(identity, oidreq.trust_root)
oidresp = oidreq.answer(true, nil, identity)
# add the sreg response if requested
add_sreg(oidreq, oidresp)
# ditto pape
add_pape(oidreq, oidresp)
elsif oidreq.immediate
server_url = url_for :action => 'index'
oidresp = oidreq.answer(false, server_url)
else
show_decision_page(oidreq)
return
end
else
oidresp = server.handle_request(oidreq)
end
self.render_response(oidresp)
end
def show_decision_page(oidreq, message="Do you trust this site with your identity?")
session[:last_oidreq] = oidreq
@oidreq = oidreq
if message
flash[:notice] = message
end
render :template => 'server/decide', :layout => 'server'
end
def user_page
# Yadis content-negotiation: we want to return the xrds if asked for.
accept = request.env['HTTP_ACCEPT']
# This is not technically correct, and should eventually be updated
# to do real Accept header parsing and logic. Though I expect it will work
# 99% of the time.
if accept and accept.include?('application/xrds+xml')
user_xrds
return
end
# content negotiation failed, so just render the user page
xrds_url = url_for(:controller=>'user',:action=>params[:username])+'/xrds'
identity_page = <<EOS
<html><head>
<meta http-equiv="X-XRDS-Location" content="#{xrds_url}" />
<link rel="openid.server" href="#{url_for :action => 'index'}" />
</head><body><p>OpenID identity page for #{params[:username]}</p>
</body></html>
EOS
# Also add the Yadis location header, so that they don't have
# to parse the html unless absolutely necessary.
response.headers['X-XRDS-Location'] = xrds_url
render :text => identity_page
end
def user_xrds
types = [
OpenID::OPENID_2_0_TYPE,
OpenID::OPENID_1_0_TYPE,
OpenID::SREG_URI,
]
render_xrds(types)
end
def idp_xrds
types = [
OpenID::OPENID_IDP_2_0_TYPE,
]
render_xrds(types)
end
def decision
oidreq = session[:last_oidreq]
session[:last_oidreq] = nil
if params[:yes].nil?
redirect_to oidreq.cancel_url
return
else
id_to_send = params[:id_to_send]
identity = oidreq.identity
if oidreq.id_select
if id_to_send and id_to_send != ""
session[:username] = id_to_send
session[:approvals] = []
identity = url_for_user
else
msg = "You must enter a username to in order to send " +
"an identifier to the Relying Party."
show_decision_page(oidreq, msg)
return
end
end
if session[:approvals]
session[:approvals] << oidreq.trust_root
else
session[:approvals] = [oidreq.trust_root]
end
oidresp = oidreq.answer(true, nil, identity)
add_sreg(oidreq, oidresp)
add_pape(oidreq, oidresp)
return self.render_response(oidresp)
end
end
protected
def server
if @server.nil?
server_url = url_for :action => 'index', :only_path => false
dir = Pathname.new(RAILS_ROOT).join('db').join('openid-store')
store = OpenID::Store::Filesystem.new(dir)
@server = Server.new(store, server_url)
end
return @server
end
def approved(trust_root)
return false if session[:approvals].nil?
return session[:approvals].member?(trust_root)
end
def is_authorized(identity_url, trust_root)
return (session[:username] and (identity_url == url_for_user) and self.approved(trust_root))
end
def render_xrds(types)
type_str = ""
types.each { |uri|
type_str += "<Type>#{uri}</Type>\n "
}
yadis = <<EOS
<?xml version="1.0" encoding="UTF-8"?>
<xrds:XRDS
xmlns:xrds="xri://$xrds"
xmlns="xri://$xrd*($v*2.0)">
<XRD>
<Service priority="0">
#{type_str}
<URI>#{url_for(:controller => 'server', :only_path => false)}</URI>
</Service>
</XRD>
</xrds:XRDS>
EOS
render :text => yadis, :content_type => 'application/xrds+xml'
end
def add_sreg(oidreq, oidresp)
# check for Simple Registration arguments and respond
sregreq = OpenID::SReg::Request.from_openid_request(oidreq)
return if sregreq.nil?
# In a real application, this data would be user-specific,
# and the user should be asked for permission to release
# it.
sreg_data = {
'nickname' => session[:username],
'fullname' => 'Mayor McCheese',
'email' => 'mayor@example.com'
}
sregresp = OpenID::SReg::Response.extract_response(sregreq, sreg_data)
oidresp.add_extension(sregresp)
end
def add_pape(oidreq, oidresp)
papereq = OpenID::PAPE::Request.from_openid_request(oidreq)
return if papereq.nil?
paperesp = OpenID::PAPE::Response.new
paperesp.nist_auth_level = 0 # we don't even do auth at all!
oidresp.add_extension(paperesp)
end
def render_response(oidresp)
if oidresp.needs_signing
signed_response = server.signatory.sign(oidresp)
end
web_response = server.encode_response(oidresp)
case web_response.code
when HTTP_OK
render :text => web_response.body, :status => 200
when HTTP_REDIRECT
redirect_to web_response.headers['location']
else
render :text => web_response.body, :status => 400
end
end
end
================================================
FILE: examples/rails_openid/app/helpers/application_helper.rb
================================================
module ApplicationHelper
end
================================================
FILE: examples/rails_openid/app/helpers/login_helper.rb
================================================
module LoginHelper
end
================================================
FILE: examples/rails_openid/app/helpers/server_helper.rb
================================================
module ServerHelper
def url_for_user
url_for :controller => 'user', :action => session[:username]
end
end
================================================
FILE: examples/rails_openid/app/mailers/.gitkeep
================================================
================================================
FILE: examples/rails_openid/app/models/.gitkeep
================================================
================================================
FILE: examples/rails_openid/app/views/consumer/index.html.erb
================================================
<html>
<head>
<title>Rails OpenID Example Relying Party</title>
</head>
<style type="text/css">
* {
font-family: verdana,sans-serif;
}
body {
width: 50em;
margin: 1em;
}
div {
padding: .5em;
}
.alert {
border: 1px solid #e7dc2b;
background: #fff888;
}
.error {
border: 1px solid #ff0000;
background: #ffaaaa;
}
.success {
border: 1px solid #00ff00;
background: #aaffaa;
}
#verify-form {
border: 1px solid #777777;
background: #dddddd;
margin-top: 1em;
padding-bottom: 0em;
}
input.openid {
background: url( /images/openid_login_bg.gif ) no-repeat;
background-position: 0 50%;
background-color: #fff;
padding-left: 18px;
}
</style>
<body>
<h1>Rails OpenID Example Relying Party</h1>
<% if flash[:alert] %>
<div class='alert'>
<%= h(flash[:alert]) %>
</div>
<% end %>
<% if flash[:error] %>
<div class='error'>
<%= h(flash[:error]) %>
</div>
<% end %>
<% if flash[:success] %>
<div class='success'>
<%= h(flash[:success]) %>
</div>
<% end %>
<% if flash[:sreg_results] %>
<div class='alert'>
<%= flash[:sreg_results] %>
</div>
<% end %>
<% if flash[:pape_results] %>
<div class='alert'>
<%= flash[:pape_results] %>
</div>
<% end %>
<div id="verify-form">
<form method="get" accept-charset="UTF-8"
action='<%= url_for :action => 'start' %>'>
Identifier:
<input type="text" class="openid" name="openid_identifier" />
<input type="submit" value="Verify" /><br />
<input type="checkbox" name="immediate" id="immediate" /><label for="immediate">Use immediate mode</label><br/>
<input type="checkbox" name="use_sreg" id="use_sreg" /><label for="use_sreg">Request registration data</label><br/>
<input type="checkbox" name="use_pape" id="use_pape" /><label for="use_pape">Request phishing-resistent auth policy (PAPE)</label><br/>
<input type="checkbox" name="force_post" id="force_post" /><label for="force_post">Force the transaction to use POST by adding 2K of extra data</label>
</form>
</div>
</body>
</html>
================================================
FILE: examples/rails_openid/app/views/layouts/server.html.erb
================================================
<html>
<head><title>OpenID Server Example</title>
<%#= csrf_meta_tags %>
</head>
<style type="text/css">
* {
font-family: verdana,sans-serif;
}
body {
width: 50em;
margin: 1em;
}
div {
padding: .5em;
}
table {
margin: none;
padding: none;
}
.notice {
border: 1px solid #60964f;
background: #b3dca7;
}
.error {
border: 1px solid #ff0000;
background: #ffaaaa;
}
#login-form {
border: 1px solid #777777;
background: #dddddd;
margin-top: 1em;
padding-bottom: 0em;
}
table {
padding: 1em;
}
li {margin-bottom: .5em;}
span.openid:before {
content: url(<%= @base_url %>images/openid_login_bg.gif) ;
}
span.openid {
font-size: smaller;
}
</style>
<body>
<% if session[:username] %>
<div style="float:right;">
Welcome, <%= session[:username] %> | <%= link_to('Log out', :controller => 'login', :action => 'logout') %><br />
<span class="openid"><%= @base_url %>user/<%= session[:username] %></span>
</div>
<% end %>
<h3>Ruby OpenID Server Example</h3>
<hr/>
<% if flash[:notice] or flash[:error] %>
<div class="<%= flash[:notice].nil? ? 'error' : 'notice' %>">
<%= flash[:error] or flash[:notice] %>
</div>
<% end %>
<%= yield %>
</body>
</html>
================================================
FILE: examples/rails_openid/app/views/login/index.html.erb
================================================
<% if session[:username].nil? %>
<div id="login-form">
<form method="get" action="<%= url_for :controller => 'login', :action => 'submit' %>">
Type a username:
<input type="text" name="username" />
<input type="submit" value="Log In" />
</form>
</div>
<% end %>
<p> Welcome to the Ruby OpenID example. This code is a starting point
for developers wishing to implement an OpenID provider or relying
party. We've used the <a href="http://rubyonrails.org/">Rails</a>
platform to demonstrate, but the library code is not Rails specific.</p>
<h2>To use the example provider</h2>
<p>
<ol>
<li>Enter a username in the form above. You will be "Logged In"
to the server, at which point you may authenticate using an OpenID
consumer. Your OpenID URL will be displayed after you log
in.<p>The server will automatically create an identity page for
you at <%= @base_url %>user/<i>name</i></p></li>
<li><p>Because WEBrick can only handle one thing at a time, you'll need to
run another instance of the example on another port if you want to use
a relying party to use with this example provider:</p>
<blockquote>
<code>script/server --port=3001</code>
</blockquote>
<p>(The RP needs to be able to access the provider, so unless you're
running this example on a public IP, you can't use the live example
at <a href="http://openidenabled.com/">openidenabled.com</a> on
your local provider.)</p>
</li>
<li>Point your browser to this new instance and follow the directions
below.</li>
<!-- Fun fact: 'url_for :port => 3001' doesn't work very well. -->
</ol>
</p>
<h2>To use the example relying party</h2>
<p>Visit <a href="<%= url_for :controller => 'consumer' %>">/consumer</a>
and enter your OpenID.</p>
</p>
================================================
FILE: examples/rails_openid/app/views/server/decide.html.erb
================================================
<form method="post" action="<%= url_for :controller => 'server', :action => 'decision' %>">
<input type="hidden" name="authenticity_token" value="<%= form_authenticity_token %>">
<table>
<tr><td>Site:</td><td><%= @oidreq.trust_root %></td></tr>
<% if @oidreq.id_select %>
<tr>
<td colspan="2">
You entered the server identifier at the relying party.
You'll need to send an identifier of your choosing. Enter a
username below.
</td>
</tr>
<tr>
<td>Identity to send:</td>
<td><input type="text" name="id_to_send" size="25" /></td>
</tr>
<% else %>
<tr><td>Identity:</td><td><%= @oidreq.identity %></td></tr>
<% end %>
</table>
<input type="submit" name="yes" value="yes" />
<input type="submit" name="no" value="no" />
</form>
================================================
FILE: examples/rails_openid/config/application.rb
================================================
require File.expand_path('../boot', __FILE__)
require 'rails/all'
if defined?(Bundler)
# If you precompile assets before deploying to production, use this line
Bundler.require(*Rails.groups(:assets => %w(development test)))
# If you want your assets lazily compiled in production, use this line
# Bundler.require(:default, :assets, Rails.env)
end
module RailsOpenid
class Application < Rails::Application
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.
# Custom directories with classes and modules you want to be autoloadable.
# config.autoload_paths += %W(#{config.root}/extras)
# Only load the plugins named here, in the order given (default is alphabetical).
# :all can be used as a placeholder for all plugins not explicitly named.
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
# Activate observers that should always be running.
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
# config.time_zone = 'Central Time (US & Canada)'
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
# config.i18n.default_locale = :de
# Configure the default encoding used in templates for Ruby 1.9.
config.encoding = "utf-8"
# Configure sensitive parameters which will be filtered from the log file.
config.filter_parameters += [:password]
# Enable escaping HTML in JSON.
config.active_support.escape_html_entities_in_json = true
# Use SQL instead of Active Record's schema dumper when creating the database.
# This is necessary if your schema can't be completely dumped by the schema dumper,
# like if you have constraints or database-specific column types
# config.active_record.schema_format = :sql
# Enforce whitelist mode for mass assignment.
# This will create an empty whitelist of attributes available for mass-assignment for all models
# in your app. As such, your models will need to explicitly whitelist or blacklist accessible
# parameters by using an attr_accessible or attr_protected declaration.
config.active_record.whitelist_attributes = true
# Enable the asset pipeline
config.assets.enabled = true
# Version of your assets, change this if you want to expire all your assets
config.assets.version = '1.0'
end
end
================================================
FILE: examples/rails_openid/config/boot.rb
================================================
require 'rubygems'
# Set up gems listed in the Gemfile.
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
================================================
FILE: examples/rails_openid/config/database.yml
================================================
# SQLite version 3.x
# gem install sqlite3
#
# Ensure the SQLite 3 gem is defined in your Gemfile
# gem 'sqlite3'
development:
adapter: sqlite3
database: db/development.sqlite3
pool: 5
timeout: 5000
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
adapter: sqlite3
database: db/test.sqlite3
pool: 5
timeout: 5000
production:
adapter: sqlite3
database: db/production.sqlite3
pool: 5
timeout: 5000
================================================
FILE: examples/rails_openid/config/environment.rb
================================================
# Load the rails application
require File.expand_path('../application', __FILE__)
# Initialize the rails application
RailsOpenid::Application.initialize!
================================================
FILE: examples/rails_openid/config/environments/development.rb
================================================
RailsOpenid::Application.configure do
# Settings specified here will take precedence over those in config/application.rb
# In the development environment your application's code is reloaded on
# every request. This slows down response time but is perfect for development
# since you don't have to restart the web server when you make code changes.
config.cache_classes = false
# Log error messages when you accidentally call methods on nil.
config.whiny_nils = true
# Show full error reports and disable caching
config.consider_all_requests_local = true
config.action_controller.perform_caching = false
# Don't care if the mailer can't send
config.action_mailer.raise_delivery_errors = false
# Print deprecation notices to the Rails logger
config.active_support.deprecation = :log
# Only use best-standards-support built into browsers
config.action_dispatch.best_standards_support = :builtin
# Raise exception on mass assignment protection for Active Record models
config.active_record.mass_assignment_sanitizer = :strict
# Log the query plan for queries taking more than this (works
# with SQLite, MySQL, and PostgreSQL)
config.active_record.auto_explain_threshold_in_seconds = 0.5
# Do not compress assets
config.assets.compress = false
# Expands the lines which load the assets
config.assets.debug = true
end
================================================
FILE: examples/rails_openid/config/environments/production.rb
================================================
RailsOpenid::Application.configure do
# Settings specified here will take precedence over those in config/application.rb
# Code is not reloaded between requests
config.cache_classes = true
# Full error reports are disabled and caching is turned on
config.consider_all_requests_local = false
config.action_controller.perform_caching = true
# Disable Rails's static asset server (Apache or nginx will already do this)
config.serve_static_assets = false
# Compress JavaScripts and CSS
config.assets.compress = true
# Don't fallback to assets pipeline if a precompiled asset is missed
config.assets.compile = false
# Generate digests for assets URLs
config.assets.digest = true
# Defaults to nil and saved in location specified by config.assets.prefix
# config.assets.manifest = YOUR_PATH
# Specifies the header that your server uses for sending files
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
# config.force_ssl = true
# See everything in the log (default is :info)
# config.log_level = :debug
# Prepend all log lines with the following tags
# config.log_tags = [ :subdomain, :uuid ]
# Use a different logger for distributed setups
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
# Use a different cache store in production
# config.cache_store = :mem_cache_store
# Enable serving of images, stylesheets, and JavaScripts from an asset server
# config.action_controller.asset_host = "http://assets.example.com"
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
# config.assets.precompile += %w( search.js )
# Disable delivery errors, bad email addresses will be ignored
# config.action_mailer.raise_delivery_errors = false
# Enable threaded mode
# config.threadsafe!
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
# the I18n.default_locale when a translation can not be found)
config.i18n.fallbacks = true
# Send deprecation notices to registered listeners
config.active_support.deprecation = :notify
# Log the query plan for queries taking more than this (works
# with SQLite, MySQL, and PostgreSQL)
# config.active_record.auto_explain_threshold_in_seconds = 0.5
end
================================================
FILE: examples/rails_openid/config/environments/test.rb
================================================
RailsOpenid::Application.configure do
# Settings specified here will take precedence over those in config/application.rb
# The test environment is used exclusively to run your application's
# test suite. You never need to work with it otherwise. Remember that
# your test database is "scratch space" for the test suite and is wiped
# and recreated between test runs. Don't rely on the data there!
config.cache_classes = true
# Configure static asset server for tests with Cache-Control for performance
config.serve_static_assets = true
config.static_cache_control = "public, max-age=3600"
# Log error messages when you accidentally call methods on nil
config.whiny_nils = true
# Show full error reports and disable caching
config.consider_all_requests_local = true
config.action_controller.perform_caching = false
# Raise exceptions instead of rendering exception templates
config.action_dispatch.show_exceptions = false
# Disable request forgery protection in test environment
config.action_controller.allow_forgery_protection = false
# Tell Action Mailer not to deliver emails to the real world.
# The :test delivery method accumulates sent emails in the
# ActionMailer::Base.deliveries array.
config.action_mailer.delivery_method = :test
# Raise exception on mass assignment protection for Active Record models
config.active_record.mass_assignment_sanitizer = :strict
# Print deprecation notices to the stderr
config.active_support.deprecation = :stderr
end
================================================
FILE: examples/rails_openid/config/initializers/backtrace_silencers.rb
================================================
# Be sure to restart your server when you modify this file.
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
# Rails.backtrace_cleaner.remove_silencers!
================================================
FILE: examples/rails_openid/config/initializers/inflections.rb
================================================
# Be sure to restart your server when you modify this file.
# Add new inflection rules using the following format
# (all these examples are active by default):
# ActiveSupport::Inflector.inflections do |inflect|
# inflect.plural /^(ox)$/i, '\1en'
# inflect.singular /^(ox)en/i, '\1'
# inflect.irregular 'person', 'people'
# inflect.uncountable %w( fish sheep )
# end
#
# These inflection rules are supported but not enabled by default:
# ActiveSupport::Inflector.inflections do |inflect|
# inflect.acronym 'RESTful'
# end
================================================
FILE: examples/rails_openid/config/initializers/mime_types.rb
================================================
# Be sure to restart your server when you modify this file.
# Add new mime types for use in respond_to blocks:
# Mime::Type.register "text/richtext", :rtf
# Mime::Type.register_alias "text/html", :iphone
================================================
FILE: examples/rails_openid/config/initializers/rails_root.rb
================================================
::RAILS_ROOT = Rails.root
================================================
FILE: examples/rails_openid/config/initializers/secret_token.rb
================================================
# Be sure to restart your server when you modify this file.
# Your secret key for verifying the integrity of signed cookies.
# If you change this key, all old signed cookies will become invalid!
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks.
RailsOpenid::Application.config.secret_token = '2314c4d00e3702d446505b8df2732c433379a0d61ac94c32a25f71612ab6df457bc9979eb32cae28ad6feacdd5a9ae7ac330934c5fb53877e02ce8e23ac0f494'
================================================
FILE: examples/rails_openid/config/initializers/session_store.rb
================================================
# Be sure to restart your server when you modify this file.
RailsOpenid::Application.config.session_store :cookie_store, :key => '_rails_openid_session'
# Use the database for sessions instead of the cookie-based default,
# which shouldn't be used to store highly confidential information
# (create the session table with "rails generate session_migration")
# RailsOpenid::Application.config.session_store :active_record_store
================================================
FILE: examples/rails_openid/config/initializers/wrap_parameters.rb
================================================
# Be sure to restart your server when you modify this file.
#
# This file contains settings for ActionController::ParamsWrapper which
# is enabled by default.
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
ActiveSupport.on_load(:action_controller) do
wrap_parameters :format => [:json]
end
# Disable root element in JSON by default.
ActiveSupport.on_load(:active_record) do
self.include_root_in_json = false
end
================================================
FILE: examples/rails_openid/config/locales/en.yml
================================================
# Sample localization file for English. Add more files in this directory for other locales.
# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
en:
hello: "Hello world"
================================================
FILE: examples/rails_openid/config/routes.rb
================================================
RailsOpenid::Application.routes.draw do
root :controller => 'login', :action => :index
match 'server/xrds', :controller => 'server', :action => 'idp_xrds'
match 'user/:username', :controller => 'server', :action => 'user_page'
match 'user/:username/xrds', :controller => 'server', :action => 'user_xrds'
# Allow downloading Web Service WSDL as a file with an extension
# instead of a file named 'wsdl'
match ':controller/service.wsdl', :action => 'wsdl'
# Install the default route as the lowest priority.
match ':controller/:action/:id'
# The priority is based upon order of creation:
# first created -> highest priority.
# Sample of regular route:
# match 'products/:id' => 'catalog#view'
# Keep in mind you can assign values other than :controller and :action
# Sample of named route:
# match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
# This route can be invoked with purchase_url(:id => product.id)
# Sample resource route (maps HTTP verbs to controller actions automatically):
# resources :products
# Sample resource route with options:
# resources :products do
# member do
# get 'short'
# post 'toggle'
# end
#
# collection do
# get 'sold'
# end
# end
# Sample resource route with sub-resources:
# resources :products do
# resources :comments, :sales
# resource :seller
# end
# Sample resource route with more complex sub-resources
# resources :products do
# resources :comments
# resources :sales do
# get 'recent', :on => :collection
# end
# end
# Sample resource route within a namespace:
# namespace :admin do
# # Directs /admin/products/* to Admin::ProductsController
# # (app/controllers/admin/products_controller.rb)
# resources :products
# end
# You can have the root of your site routed with "root"
# just remember to delete public/index.html.
# root :to => 'welcome#index'
# See how all your routes lay out with "rake routes"
# This is a legacy wild controller route that's not recommended for RESTful applications.
# Note: This route will make all actions in every controller accessible via GET requests.
match ':controller(/:action(/:id))(.:format)'
end
================================================
FILE: examples/rails_openid/config.ru
================================================
# This file is used by Rack-based servers to start the application.
require ::File.expand_path('../config/environment', __FILE__)
run RailsOpenid::Application
================================================
FILE: examples/rails_openid/db/development.sqlite3
================================================
================================================
FILE: examples/rails_openid/db/seeds.rb
================================================
# This file should contain all the record creation needed to seed the database with its default values.
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
#
# Examples:
#
# cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }])
# Mayor.create(:name => 'Emanuel', :city => cities.first)
================================================
FILE: examples/rails_openid/lib/assets/.gitkeep
================================================
================================================
FILE: examples/rails_openid/lib/tasks/.gitkeep
================================================
================================================
FILE: examples/rails_openid/log/.gitkeep
================================================
================================================
FILE: examples/rails_openid/log/development.log
================================================
Connecting to database specified by database.yml
Started GET "/consumer" for 127.0.0.1 at Sun Mar 31 05:22:11 -0700 2013
ActionController::RoutingError (No route matches [GET] "/consumer"):
actionpack (3.2.13) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
railties (3.2.13) lib/rails/rack/logger.rb:32:in `call_app'
railties (3.2.13) lib/rails/rack/logger.rb:16:in `call'
activesupport (3.2.13) lib/active_support/tagged_logging.rb:22:in `tagged'
railties (3.2.13) lib/rails/rack/logger.rb:16:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/request_id.rb:22:in `call'
rack (1.4.5) lib/rack/methodoverride.rb:21:in `call'
rack (1.4.5) lib/rack/runtime.rb:17:in `call'
activesupport (3.2.13) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
rack (1.4.5) lib/rack/lock.rb:15:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/static.rb:63:in `call'
railties (3.2.13) lib/rails/engine.rb:479:in `call'
railties (3.2.13) lib/rails/application.rb:223:in `call'
rack (1.4.5) lib/rack/content_length.rb:14:in `call'
railties (3.2.13) lib/rails/rack/log_tailer.rb:17:in `call'
rack (1.4.5) lib/rack/handler/webrick.rb:59:in `service'
/opt/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/opt/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/opt/local/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/opt/local/lib/ruby/1.8/webrick/server.rb:162:in `start'
/opt/local/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
/opt/local/lib/ruby/1.8/webrick/server.rb:95:in `start'
/opt/local/lib/ruby/1.8/webrick/server.rb:92:in `each'
/opt/local/lib/ruby/1.8/webrick/server.rb:92:in `start'
/opt/local/lib/ruby/1.8/webrick/server.rb:23:in `start'
/opt/local/lib/ruby/1.8/webrick/server.rb:82:in `start'
rack (1.4.5) lib/rack/handler/webrick.rb:13:in `run'
rack (1.4.5) lib/rack/server.rb:268:in `start'
railties (3.2.13) lib/rails/commands/server.rb:70:in `start'
railties (3.2.13) lib/rails/commands.rb:55
railties (3.2.13) lib/rails/commands.rb:50:in `tap'
railties (3.2.13) lib/rails/commands.rb:50
script/rails:6:in `require'
script/rails:6
Rendered /Users/marcel/.gem/ruby/1.8/gems/actionpack-3.2.13/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (3.3ms)
Started GET "/consumer" for 127.0.0.1 at Sun Mar 31 05:23:00 -0700 2013
LoadError (no such file to load -- openid):
app/controllers/consumer_controller.rb:3
Rendered /Users/marcel/.gem/ruby/1.8/gems/actionpack-3.2.13/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.8ms)
Rendered /Users/marcel/.gem/ruby/1.8/gems/actionpack-3.2.13/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (13.8ms)
Rendered /Users/marcel/.gem/ruby/1.8/gems/actionpack-3.2.13/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (31.1ms)
Connecting to database specified by database.yml
Started GET "/consumer" for 127.0.0.1 at Sun Mar 31 05:23:40 -0700 2013
Processing by ConsumerController#index as HTML
Completed 500 Internal Server Error in 24ms
ActionView::MissingTemplate (Missing template consumer/index, application/index with {:handlers=>[:coffee, :erb, :builder], :locale=>[:en], :formats=>[:html]}. Searched in:
* "/Users/marcel/.gem/ruby/1.8/gems/ruby-openid-2.2.3/examples/rails_openid/app/views"
):
actionpack (3.2.13) lib/action_view/path_set.rb:58:in `find'
actionpack (3.2.13) lib/action_view/lookup_context.rb:109:in `find_template'
actionpack (3.2.13) lib/action_view/renderer/abstract_renderer.rb:3:in `__send__'
actionpack (3.2.13) lib/action_view/renderer/abstract_renderer.rb:3:in `find_template'
actionpack (3.2.13) lib/action_view/renderer/template_renderer.rb:34:in `determine_template'
actionpack (3.2.13) lib/action_view/renderer/template_renderer.rb:10:in `render'
actionpack (3.2.13) lib/action_view/renderer/renderer.rb:36:in `render_template'
actionpack (3.2.13) lib/action_view/renderer/renderer.rb:17:in `render'
actionpack (3.2.13) lib/abstract_controller/rendering.rb:110:in `_render_template'
actionpack (3.2.13) lib/action_controller/metal/streaming.rb:225:in `_render_template'
actionpack (3.2.13) lib/abstract_controller/rendering.rb:103:in `render_to_body'
actionpack (3.2.13) lib/action_controller/metal/renderers.rb:28:in `render_to_body'
actionpack (3.2.13) lib/action_controller/metal/compatibility.rb:50:in `render_to_body'
actionpack (3.2.13) lib/abstract_controller/rendering.rb:88:in `render'
actionpack (3.2.13) lib/action_controller/metal/rendering.rb:16:in `render'
actionpack (3.2.13) lib/action_controller/metal/instrumentation.rb:40:in `render'
activesupport (3.2.13) lib/active_support/core_ext/benchmark.rb:5:in `ms'
/opt/local/lib/ruby/1.8/benchmark.rb:308:in `realtime'
activesupport (3.2.13) lib/active_support/core_ext/benchmark.rb:5:in `ms'
actionpack (3.2.13) lib/action_controller/metal/instrumentation.rb:40:in `render'
actionpack (3.2.13) lib/action_controller/metal/instrumentation.rb:83:in `cleanup_view_runtime'
activerecord (3.2.13) lib/active_record/railties/controller_runtime.rb:24:in `cleanup_view_runtime'
actionpack (3.2.13) lib/action_controller/metal/instrumentation.rb:39:in `render'
actionpack (3.2.13) lib/action_controller/metal/implicit_render.rb:10:in `default_render'
actionpack (3.2.13) lib/action_controller/metal/implicit_render.rb:5:in `send_action'
actionpack (3.2.13) lib/abstract_controller/base.rb:167:in `process_action'
actionpack (3.2.13) lib/action_controller/metal/rendering.rb:10:in `process_action'
actionpack (3.2.13) lib/abstract_controller/callbacks.rb:18:in `process_action'
activesupport (3.2.13) lib/active_support/callbacks.rb:414:in `_run__1789127949__process_action__199225275__callbacks'
activesupport (3.2.13) lib/active_support/callbacks.rb:405:in `send'
activesupport (3.2.13) lib/active_support/callbacks.rb:405:in `__run_callback'
activesupport (3.2.13) lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
activesupport (3.2.13) lib/active_support/callbacks.rb:81:in `send'
activesupport (3.2.13) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (3.2.13) lib/abstract_controller/callbacks.rb:17:in `process_action'
actionpack (3.2.13) lib/action_controller/metal/rescue.rb:29:in `process_action'
actionpack (3.2.13) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
activesupport (3.2.13) lib/active_support/notifications.rb:123:in `instrument'
activesupport (3.2.13) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (3.2.13) lib/active_support/notifications.rb:123:in `instrument'
actionpack (3.2.13) lib/action_controller/metal/instrumentation.rb:29:in `process_action'
actionpack (3.2.13) lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
activerecord (3.2.13) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
actionpack (3.2.13) lib/abstract_controller/base.rb:121:in `process'
actionpack (3.2.13) lib/abstract_controller/rendering.rb:45:in `process'
actionpack (3.2.13) lib/action_controller/metal.rb:203:in `dispatch'
actionpack (3.2.13) lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
actionpack (3.2.13) lib/action_controller/metal.rb:246:in `action'
actionpack (3.2.13) lib/action_dispatch/routing/route_set.rb:73:in `call'
actionpack (3.2.13) lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
actionpack (3.2.13) lib/action_dispatch/routing/route_set.rb:36:in `call'
journey (1.0.4) lib/journey/router.rb:68:in `call'
journey (1.0.4) lib/journey/router.rb:56:in `each'
journey (1.0.4) lib/journey/router.rb:56:in `call'
actionpack (3.2.13) lib/action_dispatch/routing/route_set.rb:612:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
rack (1.4.5) lib/rack/etag.rb:23:in `call'
rack (1.4.5) lib/rack/conditionalget.rb:25:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/head.rb:14:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/params_parser.rb:21:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/flash.rb:242:in `call'
rack (1.4.5) lib/rack/session/abstract/id.rb:210:in `context'
rack (1.4.5) lib/rack/session/abstract/id.rb:205:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/cookies.rb:341:in `call'
activerecord (3.2.13) lib/active_record/query_cache.rb:64:in `call'
activerecord (3.2.13) lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/callbacks.rb:28:in `call'
activesupport (3.2.13) lib/active_support/callbacks.rb:405:in `_run__397314981__call__4__callbacks'
activesupport (3.2.13) lib/active_support/callbacks.rb:405:in `send'
activesupport (3.2.13) lib/active_support/callbacks.rb:405:in `__run_callback'
activesupport (3.2.13) lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
activesupport (3.2.13) lib/active_support/callbacks.rb:81:in `send'
activesupport (3.2.13) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (3.2.13) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/reloader.rb:65:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
railties (3.2.13) lib/rails/rack/logger.rb:32:in `call_app'
railties (3.2.13) lib/rails/rack/logger.rb:16:in `call'
activesupport (3.2.13) lib/active_support/tagged_logging.rb:22:in `tagged'
railties (3.2.13) lib/rails/rack/logger.rb:16:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/request_id.rb:22:in `call'
rack (1.4.5) lib/rack/methodoverride.rb:21:in `call'
rack (1.4.5) lib/rack/runtime.rb:17:in `call'
activesupport (3.2.13) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
rack (1.4.5) lib/rack/lock.rb:15:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/static.rb:63:in `call'
railties (3.2.13) lib/rails/engine.rb:479:in `call'
railties (3.2.13) lib/rails/application.rb:223:in `call'
rack (1.4.5) lib/rack/content_length.rb:14:in `call'
railties (3.2.13) lib/rails/rack/log_tailer.rb:17:in `call'
rack (1.4.5) lib/rack/handler/webrick.rb:59:in `service'
/opt/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/opt/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/opt/local/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/opt/local/lib/ruby/1.8/webrick/server.rb:162:in `start'
/opt/local/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
/opt/local/lib/ruby/1.8/webrick/server.rb:95:in `start'
/opt/local/lib/ruby/1.8/webrick/server.rb:92:in `each'
/opt/local/lib/ruby/1.8/webrick/server.rb:92:in `start'
/opt/local/lib/ruby/1.8/webrick/server.rb:23:in `start'
/opt/local/lib/ruby/1.8/webrick/server.rb:82:in `start'
rack (1.4.5) lib/rack/handler/webrick.rb:13:in `run'
rack (1.4.5) lib/rack/server.rb:268:in `start'
railties (3.2.13) lib/rails/commands/server.rb:70:in `start'
railties (3.2.13) lib/rails/commands.rb:55
railties (3.2.13) lib/rails/commands.rb:50:in `tap'
railties (3.2.13) lib/rails/commands.rb:50
script/rails:6:in `require'
script/rails:6
Rendered /Users/marcel/.gem/ruby/1.8/gems/actionpack-3.2.13/lib/action_dispatch/middleware/templates/rescues/missing_template.erb within rescues/layout (1.9ms)
Connecting to database specified by database.yml
Started GET "/consumer" for 127.0.0.1 at Sun Mar 31 05:25:07 -0700 2013
Processing by ConsumerController#index as HTML
Rendered consumer/index.html.erb within layouts/application (6.1ms)
Compiled application.css (1ms) (pid 67167)
Compiled jquery.js (13ms) (pid 67167)
Compiled jquery_ujs.js (1ms) (pid 67167)
Compiled application.js (113ms) (pid 67167)
Completed 200 OK in 426ms (Views: 425.4ms | ActiveRecord: 0.0ms)
Started GET "/assets/application.css?body=1" for 127.0.0.1 at Sun Mar 31 05:25:09 -0700 2013
Served asset /application.css - 200 OK (4ms)
Started GET "/assets/jquery.js?body=1" for 127.0.0.1 at Sun Mar 31 05:25:09 -0700 2013
Served asset /jquery.js - 200 OK (15ms)
Started GET "/assets/jquery_ujs.js?body=1" for 127.0.0.1 at Sun Mar 31 05:25:09 -0700 2013
Served asset /jquery_ujs.js - 200 OK (13ms)
Started GET "/assets/application.js?body=1" for 127.0.0.1 at Sun Mar 31 05:25:09 -0700 2013
Served asset /application.js - 200 OK (32ms)
Started GET "/consumer/start?openid_identifier=http%3A%2F%2Flocalhost%3A3009%2Fopen_id%2Fmarcel" for 127.0.0.1 at Sun Mar 31 05:25:22 -0700 2013
Processing by ConsumerController#start as HTML
Parameters: {"openid_identifier"=>"http://localhost:3009/open_id/marcel"}
Completed 500 Internal Server Error in 2ms
NameError (uninitialized constant ConsumerController::RAILS_ROOT):
app/controllers/consumer_controller.rb:116:in `consumer'
app/controllers/consumer_controller.rb:23:in `start'
Rendered /Users/marcel/.gem/ruby/1.8/gems/actionpack-3.2.13/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.8ms)
Rendered /Users/marcel/.gem/ruby/1.8/gems/actionpack-3.2.13/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (2.1ms)
Rendered /Users/marcel/.gem/ruby/1.8/gems/actionpack-3.2.13/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (121.5ms)
Connecting to database specified by database.yml
Started GET "/consumer/start?openid_identifier=http%3A%2F%2Flocalhost%3A3009%2Fopen_id%2Fmarcel" for 127.0.0.1 at Sun Mar 31 05:26:13 -0700 2013
Processing by ConsumerController#start as HTML
Parameters: {"openid_identifier"=>"http://localhost:3009/open_id/marcel"}
Redirected to http://localhost:3009/open_id/server?openid.assoc_handle=%7BHMAC-SHA1%7D%7B51582b66%7D%7BvdrbdQ%3D%3D%7D&openid.claimed_id=http%3A%2F%2Flocalhost%3A3009%2Fopen_id%2Fmarcel&openid.identity=http%3A%2F%2Flocalhost%3A3009%2Fopen_id%2Fmarcel&openid.mode=checkid_setup&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.realm=http%3A%2F%2Flocalhost%3A3010%2Fconsumer&openid.return_to=http%3A%2F%2Flocalhost%3A3010%2Fconsumer%2Fcomplete
Completed 302 Found in 661ms (ActiveRecord: 0.0ms)
Started GET "/consumer/complete?openid.assoc_handle=%7BHMAC-SHA1%7D%7B51582b69%7D%7BodxU%2BQ%3D%3D%7D&openid.claimed_id=http%3A%2F%2Flocalhost%3A3009%2Fopen_id%2Fmarcel&openid.identity=http%3A%2F%2Flocalhost%3A3009%2Fopen_id%2Fmarcel&openid.invalidate_handle=%7BHMAC-SHA1%7D%7B51582b66%7D%7BvdrbdQ%3D%3D%7D&openid.mode=id_res&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.op_endpoint=http%3A%2F%2Flocalhost%3A3009%2Fopen_id%2Fserver&openid.response_nonce=2013-03-31T12%3A26%3A17ZVVzuGN&openid.return_to=http%3A%2F%2Flocalhost%3A3010%2Fconsumer%2Fcomplete&openid.sig=HHdHfhXu%2FmKVDXkCffxuD%2BYuNeU%3D&openid.signed=assoc_handle%2Cclaimed_id%2Cidentity%2Cinvalidate_handle%2Cmode%2Cns%2Cop_endpoint%2Cresponse_nonce%2Creturn_to%2Csigned" for 127.0.0.1 at Sun Mar 31 05:26:17 -0700 2013
Processing by ConsumerController#complete as HTML
Parameters: {"openid.sig"=>"HHdHfhXu/mKVDXkCffxuD+YuNeU=", "openid.return_to"=>"http://localhost:3010/consumer/complete", "openid.op_endpoint"=>"http://localhost:3009/open_id/server", "openid.mode"=>"id_res", "openid.response_nonce"=>"2013-03-31T12:26:17ZVVzuGN", "openid.ns"=>"http://specs.openid.net/auth/2.0", "openid.identity"=>"http://localhost:3009/open_id/marcel", "openid.signed"=>"assoc_handle,claimed_id,identity,invalidate_handle,mode,ns,op_endpoint,response_nonce,return_to,signed", "openid.invalidate_handle"=>"{HMAC-SHA1}{51582b66}{vdrbdQ==}", "openid.assoc_handle"=>"{HMAC-SHA1}{51582b69}{odxU+Q==}", "openid.claimed_id"=>"http://localhost:3009/open_id/marcel"}
Redirected to http://localhost:3010/consumer
Completed 302 Found in 4ms (ActiveRecord: 0.0ms)
Started GET "/consumer" for 127.0.0.1 at Sun Mar 31 05:26:17 -0700 2013
Processing by ConsumerController#index as HTML
Rendered consumer/index.html.erb within layouts/application (14.7ms)
Completed 200 OK in 59ms (Views: 58.8ms | ActiveRecord: 0.0ms)
Started GET "/assets/application.js?body=1" for 127.0.0.1 at Sun Mar 31 05:26:17 -0700 2013
Served asset /application.js - 304 Not Modified (8ms)
Started GET "/assets/application.css?body=1" for 127.0.0.1 at Sun Mar 31 05:26:17 -0700 2013
Served asset /application.css - 304 Not Modified (132ms)
Connecting to database specified by database.yml
Started GET "/consumer" for 127.0.0.1 at Sun Mar 31 05:30:38 -0700 2013
ActionDispatch::Session::SessionRestoreError (Session contains objects whose class definition isn't available.
Remember to require the classes for all objects kept in the session.
(Original exception: uninitialized constant OpenID [NameError])
):
actionpack (3.2.13) lib/action_dispatch/middleware/session/abstract_store.rb:64:in `stale_session_check!'
actionpack (3.2.13) lib/action_dispatch/middleware/session/cookie_store.rb:48:in `unpacked_cookie_data'
rack (1.4.5) lib/rack/session/cookie.rb:107:in `extract_session_id'
actionpack (3.2.13) lib/action_dispatch/middleware/session/abstract_store.rb:53:in `extract_session_id'
actionpack (3.2.13) lib/action_dispatch/middleware/session/abstract_store.rb:57:in `stale_session_check!'
actionpack (3.2.13) lib/action_dispatch/middleware/session/abstract_store.rb:53:in `extract_session_id'
rack (1.4.5) lib/rack/session/abstract/id.rb:43:in `send'
rack (1.4.5) lib/rack/session/abstract/id.rb:43:in `load_session_id!'
rack (1.4.5) lib/rack/session/abstract/id.rb:32:in `[]'
rack (1.4.5) lib/rack/session/abstract/id.rb:267:in `current_session_id'
rack (1.4.5) lib/rack/session/abstract/id.rb:273:in `session_exists?'
rack (1.4.5) lib/rack/session/abstract/id.rb:107:in `send'
rack (1.4.5) lib/rack/session/abstract/id.rb:107:in `exists?'
rack (1.4.5) lib/rack/session/abstract/id.rb:127:in `load_for_read!'
rack (1.4.5) lib/rack/session/abstract/id.rb:64:in `key?'
actionpack (3.2.13) lib/action_dispatch/middleware/flash.rb:258:in `call'
rack (1.4.5) lib/rack/session/abstract/id.rb:210:in `context'
rack (1.4.5) lib/rack/session/abstract/id.rb:205:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/cookies.rb:341:in `call'
activerecord (3.2.13) lib/active_record/query_cache.rb:64:in `call'
activerecord (3.2.13) lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/callbacks.rb:28:in `call'
activesupport (3.2.13) lib/active_support/callbacks.rb:405:in `_run__397314981__call__4__callbacks'
activesupport (3.2.13) lib/active_support/callbacks.rb:405:in `send'
activesupport (3.2.13) lib/active_support/callbacks.rb:405:in `__run_callback'
activesupport (3.2.13) lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
activesupport (3.2.13) lib/active_support/callbacks.rb:81:in `send'
activesupport (3.2.13) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (3.2.13) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/reloader.rb:65:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
railties (3.2.13) lib/rails/rack/logger.rb:32:in `call_app'
railties (3.2.13) lib/rails/rack/logger.rb:16:in `call'
activesupport (3.2.13) lib/active_support/tagged_logging.rb:22:in `tagged'
railties (3.2.13) lib/rails/rack/logger.rb:16:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/request_id.rb:22:in `call'
rack (1.4.5) lib/rack/methodoverride.rb:21:in `call'
rack (1.4.5) lib/rack/runtime.rb:17:in `call'
activesupport (3.2.13) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
rack (1.4.5) lib/rack/lock.rb:15:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/static.rb:63:in `call'
railties (3.2.13) lib/rails/engine.rb:479:in `call'
railties (3.2.13) lib/rails/application.rb:223:in `call'
rack (1.4.5) lib/rack/content_length.rb:14:in `call'
railties (3.2.13) lib/rails/rack/log_tailer.rb:17:in `call'
rack (1.4.5) lib/rack/handler/webrick.rb:59:in `service'
/opt/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/opt/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/opt/local/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/opt/local/lib/ruby/1.8/webrick/server.rb:162:in `start'
/opt/local/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
/opt/local/lib/ruby/1.8/webrick/server.rb:95:in `start'
/opt/local/lib/ruby/1.8/webrick/server.rb:92:in `each'
/opt/local/lib/ruby/1.8/webrick/server.rb:92:in `start'
/opt/local/lib/ruby/1.8/webrick/server.rb:23:in `start'
/opt/local/lib/ruby/1.8/webrick/server.rb:82:in `start'
rack (1.4.5) lib/rack/handler/webrick.rb:13:in `run'
rack (1.4.5) lib/rack/server.rb:268:in `start'
railties (3.2.13) lib/rails/commands/server.rb:70:in `start'
railties (3.2.13) lib/rails/commands.rb:55
railties (3.2.13) lib/rails/commands.rb:50:in `tap'
railties (3.2.13) lib/rails/commands.rb:50
script/rails:6:in `require'
script/rails:6
Rendered /Users/marcel/.gem/ruby/1.8/gems/actionpack-3.2.13/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.8ms)
Rendered /Users/marcel/.gem/ruby/1.8/gems/actionpack-3.2.13/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (4.6ms)
Rendered /Users/marcel/.gem/ruby/1.8/gems/actionpack-3.2.13/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (23.6ms)
Started GET "/consumer" for 127.0.0.1 at Sun Mar 31 05:30:45 -0700 2013
ActionDispatch::Session::SessionRestoreError (Session contains objects whose class definition isn't available.
Remember to require the classes for all objects kept in the session.
(Original exception: uninitialized constant OpenID [NameError])
):
actionpack (3.2.13) lib/action_dispatch/middleware/session/abstract_store.rb:64:in `stale_session_check!'
actionpack (3.2.13) lib/action_dispatch/middleware/session/cookie_store.rb:48:in `unpacked_cookie_data'
rack (1.4.5) lib/rack/session/cookie.rb:107:in `extract_session_id'
actionpack (3.2.13) lib/action_dispatch/middleware/session/abstract_store.rb:53:in `extract_session_id'
actionpack (3.2.13) lib/action_dispatch/middleware/session/abstract_store.rb:57:in `stale_session_check!'
actionpack (3.2.13) lib/action_dispatch/middleware/session/abstract_store.rb:53:in `extract_session_id'
rack (1.4.5) lib/rack/session/abstract/id.rb:43:in `send'
rack (1.4.5) lib/rack/session/abstract/id.rb:43:in `load_session_id!'
rack (1.4.5) lib/rack/session/abstract/id.rb:32:in `[]'
rack (1.4.5) lib/rack/session/abstract/id.rb:267:in `current_session_id'
rack (1.4.5) lib/rack/session/abstract/id.rb:273:in `session_exists?'
rack (1.4.5) lib/rack/session/abstract/id.rb:107:in `send'
rack (1.4.5) lib/rack/session/abstract/id.rb:107:in `exists?'
rack (1.4.5) lib/rack/session/abstract/id.rb:127:in `load_for_read!'
rack (1.4.5) lib/rack/session/abstract/id.rb:64:in `key?'
actionpack (3.2.13) lib/action_dispatch/middleware/flash.rb:258:in `call'
rack (1.4.5) lib/rack/session/abstract/id.rb:210:in `context'
rack (1.4.5) lib/rack/session/abstract/id.rb:205:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/cookies.rb:341:in `call'
activerecord (3.2.13) lib/active_record/query_cache.rb:64:in `call'
activerecord (3.2.13) lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/callbacks.rb:28:in `call'
activesupport (3.2.13) lib/active_support/callbacks.rb:405:in `_run__397314981__call__4__callbacks'
activesupport (3.2.13) lib/active_support/callbacks.rb:405:in `send'
activesupport (3.2.13) lib/active_support/callbacks.rb:405:in `__run_callback'
activesupport (3.2.13) lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
activesupport (3.2.13) lib/active_support/callbacks.rb:81:in `send'
activesupport (3.2.13) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (3.2.13) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/reloader.rb:65:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
railties (3.2.13) lib/rails/rack/logger.rb:32:in `call_app'
railties (3.2.13) lib/rails/rack/logger.rb:16:in `call'
activesupport (3.2.13) lib/active_support/tagged_logging.rb:22:in `tagged'
railties (3.2.13) lib/rails/rack/logger.rb:16:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/request_id.rb:22:in `call'
rack (1.4.5) lib/rack/methodoverride.rb:21:in `call'
rack (1.4.5) lib/rack/runtime.rb:17:in `call'
activesupport (3.2.13) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
rack (1.4.5) lib/rack/lock.rb:15:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/static.rb:63:in `call'
railties (3.2.13) lib/rails/engine.rb:479:in `call'
railties (3.2.13) lib/rails/application.rb:223:in `call'
rack (1.4.5) lib/rack/content_length.rb:14:in `call'
railties (3.2.13) lib/rails/rack/log_tailer.rb:17:in `call'
rack (1.4.5) lib/rack/handler/webrick.rb:59:in `service'
/opt/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/opt/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/opt/local/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/opt/local/lib/ruby/1.8/webrick/server.rb:162:in `start'
/opt/local/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
/opt/local/lib/ruby/1.8/webrick/server.rb:95:in `start'
/opt/local/lib/ruby/1.8/webrick/server.rb:92:in `each'
/opt/local/lib/ruby/1.8/webrick/server.rb:92:in `start'
/opt/local/lib/ruby/1.8/webrick/server.rb:23:in `start'
/opt/local/lib/ruby/1.8/webrick/server.rb:82:in `start'
rack (1.4.5) lib/rack/handler/webrick.rb:13:in `run'
rack (1.4.5) lib/rack/server.rb:268:in `start'
railties (3.2.13) lib/rails/commands/server.rb:70:in `start'
railties (3.2.13) lib/rails/commands.rb:55
railties (3.2.13) lib/rails/commands.rb:50:in `tap'
railties (3.2.13) lib/rails/commands.rb:50
script/rails:6:in `require'
script/rails:6
Rendered /Users/marcel/.gem/ruby/1.8/gems/actionpack-3.2.13/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.8ms)
Rendered /Users/marcel/.gem/ruby/1.8/gems/actionpack-3.2.13/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (1.1ms)
Rendered /Users/marcel/.gem/ruby/1.8/gems/actionpack-3.2.13/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (18.9ms)
Connecting to database specified by database.yml
Started GET "/consumer" for 127.0.0.1 at Sun Mar 31 05:31:30 -0700 2013
Processing by ConsumerController#index as HTML
Rendered consumer/index.html.erb within layouts/application (7.0ms)
Completed 200 OK in 198ms (Views: 197.4ms | ActiveRecord: 0.0ms)
Started GET "/assets/jquery.js?body=1" for 127.0.0.1 at Sun Mar 31 05:31:31 -0700 2013
Served asset /jquery.js - 304 Not Modified (7ms)
Started GET "/assets/application.css?body=1" for 127.0.0.1 at Sun Mar 31 05:31:31 -0700 2013
Served asset /application.css - 304 Not Modified (3ms)
Started GET "/assets/application.js?body=1" for 127.0.0.1 at Sun Mar 31 05:31:31 -0700 2013
Served asset /application.js - 304 Not Modified (44ms)
Started GET "/consumer/start?openid_identifier=http%3A%2F%2Flocalhost%3A3009%2Fopen_id%2Fmarcel" for 127.0.0.1 at Sun Mar 31 05:31:36 -0700 2013
Processing by ConsumerController#start as HTML
Parameters: {"openid_identifier"=>"http://localhost:3009/open_id/marcel"}
Redirected to http://localhost:3009/open_id/server?openid.assoc_handle=%7BHMAC-SHA1%7D%7B51582b66%7D%7BvdrbdQ%3D%3D%7D&openid.claimed_id=http%3A%2F%2Flocalhost%3A3009%2Fopen_id%2Fmarcel&openid.identity=http%3A%2F%2Flocalhost%3A3009%2Fopen_id%2Fmarcel&openid.mode=checkid_setup&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.realm=http%3A%2F%2Flocalhost%3A3010%2Fconsumer&openid.return_to=http%3A%2F%2Flocalhost%3A3010%2Fconsumer%2Fcomplete
Completed 302 Found in 65ms (ActiveRecord: 0.0ms)
Started GET "/consumer/complete?openid.assoc_handle=%7BHMAC-SHA1%7D%7B51582cb5%7D%7B2olQew%3D%3D%7D&openid.claimed_id=http%3A%2F%2Flocalhost%3A3009%2Fopen_id%2Fmarcel&openid.identity=http%3A%2F%2Flocalhost%3A3009%2Fopen_id%2Fmarcel&openid.invalidate_handle=%7BHMAC-SHA1%7D%7B51582b66%7D%7BvdrbdQ%3D%3D%7D&openid.mode=id_res&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.op_endpoint=http%3A%2F%2Flocalhost%3A3009%2Fopen_id%2Fserver&openid.response_nonce=2013-03-31T12%3A31%3A49Z8CDJUo&openid.return_to=http%3A%2F%2Flocalhost%3A3010%2Fconsumer%2Fcomplete&openid.sig=skvSU5yuQsW%2BZwCkDbUbGmtMngc%3D&openid.signed=assoc_handle%2Cclaimed_id%2Cidentity%2Cinvalidate_handle%2Cmode%2Cns%2Cop_endpoint%2Cresponse_nonce%2Creturn_to%2Csigned" for 127.0.0.1 at Sun Mar 31 05:31:49 -0700 2013
Processing by ConsumerController#complete as HTML
Parameters: {"openid.sig"=>"skvSU5yuQsW+ZwCkDbUbGmtMngc=", "openid.return_to"=>"http://localhost:3010/consumer/complete", "openid.op_endpoint"=>"http://localhost:3009/open_id/server", "openid.mode"=>"id_res", "openid.response_nonce"=>"2013-03-31T12:31:49Z8CDJUo", "openid.ns"=>"http://specs.openid.net/auth/2.0", "openid.identity"=>"http://localhost:3009/open_id/marcel", "openid.signed"=>"assoc_handle,claimed_id,identity,invalidate_handle,mode,ns,op_endpoint,response_nonce,return_to,signed", "openid.invalidate_handle"=>"{HMAC-SHA1}{51582b66}{vdrbdQ==}", "openid.assoc_handle"=>"{HMAC-SHA1}{51582cb5}{2olQew==}", "openid.claimed_id"=>"http://localhost:3009/open_id/marcel"}
Redirected to http://localhost:3010/consumer
Completed 302 Found in 65ms (ActiveRecord: 0.0ms)
Started GET "/consumer" for 127.0.0.1 at Sun Mar 31 05:31:49 -0700 2013
Processing by ConsumerController#index as HTML
Rendered consumer/index.html.erb within layouts/application (0.7ms)
Completed 200 OK in 7ms (Views: 6.9ms | ActiveRecord: 0.0ms)
Started GET "/assets/jquery.js?body=1" for 127.0.0.1 at Sun Mar 31 05:31:49 -0700 2013
Served asset /jquery.js - 304 Not Modified (0ms)
Started GET "/assets/application.css?body=1" for 127.0.0.1 at Sun Mar 31 05:31:49 -0700 2013
Served asset /application.css - 304 Not Modified (0ms)
Started GET "/assets/application.js?body=1" for 127.0.0.1 at Sun Mar 31 05:31:49 -0700 2013
Served asset /application.js - 304 Not Modified (0ms)
Connecting to database specified by database.yml
Started GET "/server" for 127.0.0.1 at Sun Mar 31 05:32:59 -0700 2013
ActionDispatch::Session::SessionRestoreError (Session contains objects whose class definition isn't available.
Remember to require the classes for all objects kept in the session.
(Original exception: uninitialized constant OpenID [NameError])
):
actionpack (3.2.13) lib/action_dispatch/middleware/session/abstract_store.rb:64:in `stale_session_check!'
actionpack (3.2.13) lib/action_dispatch/middleware/session/cookie_store.rb:48:in `unpacked_cookie_data'
rack (1.4.5) lib/rack/session/cookie.rb:107:in `extract_session_id'
actionpack (3.2.13) lib/action_dispatch/middleware/session/abstract_store.rb:53:in `extract_session_id'
actionpack (3.2.13) lib/action_dispatch/middleware/session/abstract_store.rb:57:in `stale_session_check!'
actionpack (3.2.13) lib/action_dispatch/middleware/session/abstract_store.rb:53:in `extract_session_id'
rack (1.4.5) lib/rack/session/abstract/id.rb:43:in `send'
rack (1.4.5) lib/rack/session/abstract/id.rb:43:in `load_session_id!'
rack (1.4.5) lib/rack/session/abstract/id.rb:32:in `[]'
rack (1.4.5) lib/rack/session/abstract/id.rb:267:in `current_session_id'
rack (1.4.5) lib/rack/session/abstract/id.rb:273:in `session_exists?'
rack (1.4.5) lib/rack/session/abstract/id.rb:107:in `send'
rack (1.4.5) lib/rack/session/abstract/id.rb:107:in `exists?'
rack (1.4.5) lib/rack/session/abstract/id.rb:127:in `load_for_read!'
rack (1.4.5) lib/rack/session/abstract/id.rb:64:in `key?'
actionpack (3.2.13) lib/action_dispatch/middleware/flash.rb:258:in `call'
rack (1.4.5) lib/rack/session/abstract/id.rb:210:in `context'
rack (1.4.5) lib/rack/session/abstract/id.rb:205:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/cookies.rb:341:in `call'
activerecord (3.2.13) lib/active_record/query_cache.rb:64:in `call'
activerecord (3.2.13) lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/callbacks.rb:28:in `call'
activesupport (3.2.13) lib/active_support/callbacks.rb:405:in `_run__397314981__call__4__callbacks'
activesupport (3.2.13) lib/active_support/callbacks.rb:405:in `send'
activesupport (3.2.13) lib/active_support/callbacks.rb:405:in `__run_callback'
activesupport (3.2.13) lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
activesupport (3.2.13) lib/active_support/callbacks.rb:81:in `send'
activesupport (3.2.13) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (3.2.13) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/reloader.rb:65:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
railties (3.2.13) lib/rails/rack/logger.rb:32:in `call_app'
railties (3.2.13) lib/rails/rack/logger.rb:16:in `call'
activesupport (3.2.13) lib/active_support/tagged_logging.rb:22:in `tagged'
railties (3.2.13) lib/rails/rack/logger.rb:16:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/request_id.rb:22:in `call'
rack (1.4.5) lib/rack/methodoverride.rb:21:in `call'
rack (1.4.5) lib/rack/runtime.rb:17:in `call'
activesupport (3.2.13) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
rack (1.4.5) lib/rack/lock.rb:15:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/static.rb:63:in `call'
railties (3.2.13) lib/rails/engine.rb:479:in `call'
railties (3.2.13) lib/rails/application.rb:223:in `call'
rack (1.4.5) lib/rack/content_length.rb:14:in `call'
railties (3.2.13) lib/rails/rack/log_tailer.rb:17:in `call'
rack (1.4.5) lib/rack/handler/webrick.rb:59:in `service'
/opt/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/opt/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/opt/local/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/opt/local/lib/ruby/1.8/webrick/server.rb:162:in `start'
/opt/local/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
/opt/local/lib/ruby/1.8/webrick/server.rb:95:in `start'
/opt/local/lib/ruby/1.8/webrick/server.rb:92:in `each'
/opt/local/lib/ruby/1.8/webrick/server.rb:92:in `start'
/opt/local/lib/ruby/1.8/webrick/server.rb:23:in `start'
/opt/local/lib/ruby/1.8/webrick/server.rb:82:in `start'
rack (1.4.5) lib/rack/handler/webrick.rb:13:in `run'
rack (1.4.5) lib/rack/server.rb:268:in `start'
railties (3.2.13) lib/rails/commands/server.rb:70:in `start'
railties (3.2.13) lib/rails/commands.rb:55
railties (3.2.13) lib/rails/commands.rb:50:in `tap'
railties (3.2.13) lib/rails/commands.rb:50
script/rails:6:in `require'
script/rails:6
Rendered /Users/marcel/.gem/ruby/1.8/gems/actionpack-3.2.13/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.9ms)
Rendered /Users/marcel/.gem/ruby/1.8/gems/actionpack-3.2.13/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (2.0ms)
Rendered /Users/marcel/.gem/ruby/1.8/gems/actionpack-3.2.13/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (19.9ms)
Started GET "/server" for 127.0.0.1 at Sun Mar 31 05:33:19 -0700 2013
Processing by ServerController#index as HTML
Rendered text template (0.0ms)
Completed 500 Internal Server Error in 31ms (Views: 25.3ms | ActiveRecord: 0.0ms)
Started GET "/server" for 127.0.0.1 at Sun Mar 31 05:33:41 -0700 2013
Processing by ServerController#index as HTML
Rendered text template (0.0ms)
Completed 500 Internal Server Error in 5ms (Views: 2.7ms | ActiveRecord: 0.0ms)
Started GET "/consumer" for 127.0.0.1 at Sun Mar 31 05:33:47 -0700 2013
Processing by ConsumerController#index as HTML
Rendered consumer/index.html.erb within layouts/application (0.8ms)
Completed 200 OK in 11ms (Views: 10.3ms | ActiveRecord: 0.0ms)
Started GET "/assets/jquery.js?body=1" for 127.0.0.1 at Sun Mar 31 05:33:47 -0700 2013
Served asset /jquery.js - 304 Not Modified (0ms)
Started GET "/assets/application.js?body=1" for 127.0.0.1 at Sun Mar 31 05:33:47 -0700 2013
Served asset /application.js - 304 Not Modified (0ms)
Started GET "/assets/application.css?body=1" for 127.0.0.1 at Sun Mar 31 05:33:47 -0700 2013
Served asset /application.css - 304 Not Modified (0ms)
Started GET "/consumer/start?openid_identifier=http%3A%2F%2Flocalhost%3A3009%2Fopen_id%2Fmarcel" for 127.0.0.1 at Sun Mar 31 05:33:57 -0700 2013
Processing by ConsumerController#start as HTML
Parameters: {"openid_identifier"=>"http://localhost:3009/open_id/marcel"}
Started GET "/open_id/marcel" for 127.0.0.1 at Sun Mar 31 05:33:57 -0700 2013
ActionController::RoutingError (No route matches [GET] "/open_id/marcel"):
actionpack (3.2.13) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
railties (3.2.13) lib/rails/rack/logger.rb:32:in `call_app'
railties (3.2.13) lib/rails/rack/logger.rb:16:in `call'
activesupport (3.2.13) lib/active_support/tagged_logging.rb:22:in `tagged'
railties (3.2.13) lib/rails/rack/logger.rb:16:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/request_id.rb:22:in `call'
rack (1.4.5) lib/rack/methodoverride.rb:21:in `call'
rack (1.4.5) lib/rack/runtime.rb:17:in `call'
activesupport (3.2.13) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
rack (1.4.5) lib/rack/lock.rb:15:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/static.rb:63:in `call'
railties (3.2.13) lib/rails/engine.rb:479:in `call'
railties (3.2.13) lib/rails/application.rb:223:in `call'
rack (1.4.5) lib/rack/content_length.rb:14:in `call'
railties (3.2.13) lib/rails/rack/log_tailer.rb:17:in `call'
rack (1.4.5) lib/rack/handler/webrick.rb:59:in `service'
/opt/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/opt/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/opt/local/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/opt/local/lib/ruby/1.8/webrick/server.rb:162:in `start'
/opt/local/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
/opt/local/lib/ruby/1.8/webrick/server.rb:95:in `start'
/opt/local/lib/ruby/1.8/webrick/server.rb:92:in `each'
/opt/local/lib/ruby/1.8/webrick/server.rb:92:in `start'
/opt/local/lib/ruby/1.8/webrick/server.rb:23:in `start'
/opt/local/lib/ruby/1.8/webrick/server.rb:82:in `start'
rack (1.4.5) lib/rack/handler/webrick.rb:13:in `run'
rack (1.4.5) lib/rack/server.rb:268:in `start'
railties (3.2.13) lib/rails/commands/server.rb:70:in `start'
railties (3.2.13) lib/rails/commands.rb:55
railties (3.2.13) lib/rails/commands.rb:50:in `tap'
railties (3.2.13) lib/rails/commands.rb:50
script/rails:6:in `require'
script/rails:6
Rendered /Users/marcel/.gem/ruby/1.8/gems/actionpack-3.2.13/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (0.6ms)
Redirected to http://localhost:3010/consumer
Completed 302 Found in 38ms (ActiveRecord: 0.0ms)
Started GET "/consumer" for 127.0.0.1 at Sun Mar 31 05:33:57 -0700 2013
Processing by ConsumerController#index as HTML
Rendered consumer/index.html.erb within layouts/application (0.7ms)
Completed 200 OK in 8ms (Views: 8.0ms | ActiveRecord: 0.0ms)
Started GET "/assets/jquery.js?body=1" for 127.0.0.1 at Sun Mar 31 05:33:57 -0700 2013
Served asset /jquery.js - 304 Not Modified (0ms)
Started GET "/assets/application.js?body=1" for 127.0.0.1 at Sun Mar 31 05:33:57 -0700 2013
Served asset /application.js - 304 Not Modified (0ms)
Started GET "/assets/application.css?body=1" for 127.0.0.1 at Sun Mar 31 05:33:57 -0700 2013
Served asset /application.css - 304 Not Modified (0ms)
Started GET "/consumer/start?openid_identifier=http%3A%2F%2Flocalhost%3A3009%2Fserver" for 127.0.0.1 at Sun Mar 31 05:34:12 -0700 2013
Processing by ConsumerController#start as HTML
Parameters: {"openid_identifier"=>"http://localhost:3009/server"}
Started GET "/server" for 127.0.0.1 at Sun Mar 31 05:34:12 -0700 2013
Processing by ServerController#index as application/xrds+xml
Rendered text template (0.0ms)
Completed 500 Internal Server Error in 5ms (Views: 1.9ms | ActiveRecord: 0.0ms)
Redirected to http://localhost:3010/consumer
Completed 302 Found in 20ms (ActiveRecord: 0.0ms)
Started GET "/consumer" for 127.0.0.1 at Sun Mar 31 05:34:13 -0700 2013
Processing by ConsumerController#index as HTML
Rendered consumer/index.html.erb within layouts/application (0.6ms)
Completed 200 OK in 11ms (Views: 10.2ms | ActiveRecord: 0.0ms)
Started GET "/assets/application.css?body=1" for 127.0.0.1 at Sun Mar 31 05:34:13 -0700 2013
Served asset /application.css - 304 Not Modified (0ms)
Started GET "/assets/jquery.js?body=1" for 127.0.0.1 at Sun Mar 31 05:34:13 -0700 2013
Served asset /jquery.js - 304 Not Modified (0ms)
Started GET "/assets/application.js?body=1" for 127.0.0.1 at Sun Mar 31 05:34:13 -0700 2013
Served asset /application.js - 304 Not Modified (0ms)
Started GET "/consumer/start?openid_identifier=http%3A%2F%2Flocalhost%3A3009%2Fserver%2Fidp_xrds" for 127.0.0.1 at Sun Mar 31 05:35:31 -0700 2013
Processing by ConsumerController#start as HTML
Parameters: {"openid_identifier"=>"http://localhost:3009/server/idp_xrds"}
Started GET "/server/idp_xrds" for 127.0.0.1 at Sun Mar 31 05:35:31 -0700 2013
Processing by ServerController#idp_xrds as application/xrds+xml
Rendered text template (0.0ms)
Completed 200 OK in 3ms (Views: 0.6ms | ActiveRecord: 0.0ms)
Started POST "/server" for 127.0.0.1 at Sun Mar 31 05:35:32 -0700 2013
Processing by ServerController#index as */*
Parameters: {"openid.mode"=>"associate", "openid.assoc_type"=>"HMAC-SHA1", "openid.session_type"=>"DH-SHA1", "openid.ns"=>"http://specs.openid.net/auth/2.0", "openid.dh_consumer_public"=>"Ohd6vp/95+pq56SpKTaquSLrgWcVYQwVDbe+KsVnfn/bWAsT2TGS3v7AjwWKx5rfCZauIQ/c55uwMjT5iX5sAQFcNdOVtl5Ue42oFfkHDu01A7xovf2ZUdbw10m0Cl+g0BjDZRBagDShrlvBP3SZDMPvQu4o/04GhA6rChWnaGA="}
WARNING: Can't verify CSRF token authenticity
Rendered text template (0.0ms)
Completed 200 OK in 40ms (Views: 0.7ms | ActiveRecord: 0.0ms)
Redirected to http://localhost:3009/server?openid.assoc_handle=%7BHMAC-SHA1%7D%7B51582d94%7D%7Bcdko1g%3D%3D%7D&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.mode=checkid_setup&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.realm=http%3A%2F%2Flocalhost%3A3010%2Fconsumer&openid.return_to=http%3A%2F%2Flocalhost%3A3010%2Fconsumer%2Fcomplete
Completed 302 Found in 308ms (ActiveRecord: 0.0ms)
Started GET "/server?openid.assoc_handle=%7BHMAC-SHA1%7D%7B51582d94%7D%7Bcdko1g%3D%3D%7D&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.mode=checkid_setup&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.realm=http%3A%2F%2Flocalhost%3A3010%2Fconsumer&openid.return_to=http%3A%2F%2Flocalhost%3A3010%2Fconsumer%2Fcomplete" for 127.0.0.1 at Sun Mar 31 05:35:32 -0700 2013
Processing by ServerController#index as HTML
Parameters: {"openid.return_to"=>"http://localhost:3010/consumer/complete", "openid.mode"=>"checkid_setup", "openid.ns"=>"http://specs.openid.net/auth/2.0", "openid.identity"=>"http://specs.openid.net/auth/2.0/identifier_select", "openid.assoc_handle"=>"{HMAC-SHA1}{51582d94}{cdko1g==}", "openid.realm"=>"http://localhost:3010/consumer", "openid.claimed_id"=>"http://specs.openid.net/auth/2.0/identifier_select"}
Rendered server/decide.html.erb within layouts/server (1.2ms)
Completed 200 OK in 21ms (Views: 5.0ms | ActiveRecord: 0.0ms)
Started GET "/server?openid.assoc_handle=%7BHMAC-SHA1%7D%7B51582d94%7D%7Bcdko1g%3D%3D%7D&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.mode=checkid_setup&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.realm=http%3A%2F%2Flocalhost%3A3010%2Fconsumer&openid.return_to=http%3A%2F%2Flocalhost%3A3010%2Fconsumer%2Fcomplete" for 127.0.0.1 at Sun Mar 31 05:37:07 -0700 2013
Processing by ServerController#index as HTML
Parameters: {"openid.return_to"=>"http://localhost:3010/consumer/complete", "openid.mode"=>"checkid_setup", "openid.ns"=>"http://specs.openid.net/auth/2.0", "openid.identity"=>"http://specs.openid.net/auth/2.0/identifier_select", "openid.assoc_handle"=>"{HMAC-SHA1}{51582d94}{cdko1g==}", "openid.realm"=>"http://localhost:3010/consumer", "openid.claimed_id"=>"http://specs.openid.net/auth/2.0/identifier_select"}
Rendered server/decide.html.erb within layouts/server (2.1ms)
Completed 200 OK in 18ms (Views: 5.0ms | ActiveRecord: 0.0ms)
Started GET "/server?openid.assoc_handle=%7BHMAC-SHA1%7D%7B51582d94%7D%7Bcdko1g%3D%3D%7D&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.mode=checkid_setup&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.realm=http%3A%2F%2Flocalhost%3A3010%2Fconsumer&openid.return_to=http%3A%2F%2Flocalhost%3A3010%2Fconsumer%2Fcomplete" for 127.0.0.1 at Sun Mar 31 05:37:10 -0700 2013
Processing by ServerController#index as HTML
Parameters: {"openid.return_to"=>"http://localhost:3010/consumer/complete", "openid.mode"=>"checkid_setup", "openid.ns"=>"http://specs.openid.net/auth/2.0", "openid.identity"=>"http://specs.openid.net/auth/2.0/identifier_select", "openid.assoc_handle"=>"{HMAC-SHA1}{51582d94}{cdko1g==}", "openid.realm"=>"http://localhost:3010/consumer", "openid.claimed_id"=>"http://specs.openid.net/auth/2.0/identifier_select"}
Rendered server/decide.html.erb within layouts/server (1.1ms)
Completed 200 OK in 16ms (Views: 4.4ms | ActiveRecord: 0.0ms)
Started GET "/server?openid.assoc_handle=%7BHMAC-SHA1%7D%7B51582d94%7D%7Bcdko1g%3D%3D%7D&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.mode=checkid_setup&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.realm=http%3A%2F%2Flocalhost%3A3010%2Fconsumer&openid.return_to=http%3A%2F%2Flocalhost%3A3010%2Fconsumer%2Fcomplete" for 127.0.0.1 at Sun Mar 31 05:38:02 -0700 2013
Processing by ServerController#index as HTML
Parameters: {"openid.return_to"=>"http://localhost:3010/consumer/complete", "openid.mode"=>"checkid_setup", "openid.ns"=>"http://specs.openid.net/auth/2.0", "openid.identity"=>"http://specs.openid.net/auth/2.0/identifier_select", "openid.assoc_handle"=>"{HMAC-SHA1}{51582d94}{cdko1g==}", "openid.realm"=>"http://localhost:3010/consumer", "openid.claimed_id"=>"http://specs.openid.net/auth/2.0/identifier_select"}
Rendering decide template!
Rendered server/decide.html.erb within layouts/server (1.0ms)
Completed 200 OK in 15ms (Views: 8.3ms | ActiveRecord: 0.0ms)
Started GET "/server?openid.assoc_handle=%7BHMAC-SHA1%7D%7B51582d94%7D%7Bcdko1g%3D%3D%7D&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.mode=checkid_setup&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.realm=http%3A%2F%2Flocalhost%3A3010%2Fconsumer&openid.return_to=http%3A%2F%2Flocalhost%3A3010%2Fconsumer%2Fcomplete" for 127.0.0.1 at Sun Mar 31 05:38:11 -0700 2013
Processing by ServerController#index as HTML
Parameters: {"openid.return_to"=>"http://localhost:3010/consumer/complete", "openid.mode"=>"checkid_setup", "openid.ns"=>"http://specs.openid.net/auth/2.0", "openid.identity"=>"http://specs.openid.net/auth/2.0/identifier_select", "openid.assoc_handle"=>"{HMAC-SHA1}{51582d94}{cdko1g==}", "openid.realm"=>"http://localhost:3010/consumer", "openid.claimed_id"=>"http://specs.openid.net/auth/2.0/identifier_select"}
Rendering decide template!
Rendered server/decide.html.erb within layouts/server (1.2ms)
Completed 200 OK in 18ms (Views: 14.0ms | ActiveRecord: 0.0ms)
Started GET "/server?openid.assoc_handle=%7BHMAC-SHA1%7D%7B51582d94%7D%7Bcdko1g%3D%3D%7D&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.mode=checkid_setup&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.realm=http%3A%2F%2Flocalhost%3A3010%2Fconsumer&openid.return_to=http%3A%2F%2Flocalhost%3A3010%2Fconsumer%2Fcomplete" for 127.0.0.1 at Sun Mar 31 05:39:23 -0700 2013
Processing by ServerController#index as HTML
Parameters: {"openid.return_to"=>"http://localhost:3010/consumer/complete", "openid.mode"=>"checkid_setup", "openid.ns"=>"http://specs.openid.net/auth/2.0", "openid.identity"=>"http://specs.openid.net/auth/2.0/identifier_select", "openid.assoc_handle"=>"{HMAC-SHA1}{51582d94}{cdko1g==}", "openid.realm"=>"http://localhost:3010/consumer", "openid.claimed_id"=>"http://specs.openid.net/auth/2.0/identifier_select"}
Rendering decide template!
Rendered server/decide.html.erb within layouts/server (1.1ms)
Completed 200 OK in 8ms (Views: 5.0ms | ActiveRecord: 0.0ms)
Started GET "/server?openid.assoc_handle=%7BHMAC-SHA1%7D%7B51582d94%7D%7Bcdko1g%3D%3D%7D&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.mode=checkid_setup&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.realm=http%3A%2F%2Flocalhost%3A3010%2Fconsumer&openid.return_to=http%3A%2F%2Flocalhost%3A3010%2Fconsumer%2Fcomplete" for 127.0.0.1 at Sun Mar 31 05:39:26 -0700 2013
Processing by ServerController#index as HTML
Parameters: {"openid.return_to"=>"http://localhost:3010/consumer/complete", "openid.mode"=>"checkid_setup", "openid.ns"=>"http://specs.openid.net/auth/2.0", "openid.identity"=>"http://specs.openid.net/auth/2.0/identifier_select", "openid.assoc_handle"=>"{HMAC-SHA1}{51582d94}{cdko1g==}", "openid.realm"=>"http://localhost:3010/consumer", "openid.claimed_id"=>"http://specs.openid.net/auth/2.0/identifier_select"}
Rendering decide template!
Rendered server/decide.html.erb within layouts/server (0.6ms)
Completed 200 OK in 11ms (Views: 4.1ms | ActiveRecord: 0.0ms)
Started POST "/server/decision" for 127.0.0.1 at Sun Mar 31 05:39:52 -0700 2013
Processing by ServerController#decision as HTML
Parameters: {"yes"=>"yes", "id_to_send"=>"http://localhost:3009/marcel"}
WARNING: Can't verify CSRF token authenticity
Completed 500 Internal Server Error in 1ms
NoMethodError (undefined method `identity' for nil:NilClass):
app/controllers/server_controller.rb:143:in `decision'
Rendered /Users/marcel/.gem/ruby/1.8/gems/actionpack-3.2.13/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.7ms)
Rendered /Users/marcel/.gem/ruby/1.8/gems/actionpack-3.2.13/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (1.4ms)
Rendered /Users/marcel/.gem/ruby/1.8/gems/actionpack-3.2.13/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (15.5ms)
Started POST "/server/decision" for 127.0.0.1 at Sun Mar 31 05:41:02 -0700 2013
Processing by ServerController#decision as HTML
Parameters: {"yes"=>"yes", "id_to_send"=>"http://localhost:3009/marcel"}
WARNING: Can't verify CSRF token authenticity
Completed 500 Internal Server Error in 1ms
NoMethodError (undefined method `identity' for nil:NilClass):
app/controllers/server_controller.rb:143:in `decision'
Rendered /Users/marcel/.gem/ruby/1.8/gems/actionpack-3.2.13/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.9ms)
Rendered /Users/marcel/.gem/ruby/1.8/gems/actionpack-3.2.13/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (1.2ms)
Rendered /Users/marcel/.gem/ruby/1.8/gems/actionpack-3.2.13/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (14.4ms)
Started POST "/server/decision" for 127.0.0.1 at Sun Mar 31 05:41:56 -0700 2013
Processing by ServerController#decision as HTML
Parameters: {"yes"=>"yes", "id_to_send"=>"http://localhost:3009/marcel"}
WARNING: Can't verify CSRF token authenticity
Rendered text template (0.0ms)
Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.0ms)
Started GET "/consumer" for 127.0.0.1 at Sun Mar 31 05:42:11 -0700 2013
Processing by ConsumerController#index as HTML
Rendered consumer/index.html.erb within layouts/application (0.8ms)
Completed 200 OK in 12ms (Views: 10.9ms | ActiveRecord: 0.0ms)
Started GET "/assets/jquery.js?body=1" for 127.0.0.1 at Sun Mar 31 05:42:12 -0700 2013
Served asset /jquery.js - 304 Not Modified (0ms)
Started GET "/assets/application.js?body=1" for 127.0.0.1 at Sun Mar 31 05:42:12 -0700 2013
Served asset /application.js - 304 Not Modified (0ms)
Started GET "/assets/application.css?body=1" for 127.0.0.1 at Sun Mar 31 05:42:12 -0700 2013
Served asset /application.css - 304 Not Modified (0ms)
Started GET "/consumer/start?openid_identifier=http%3A%2F%2Flocalhost%3A3009%2Fserver%2Fidp_xrds" for 127.0.0.1 at Sun Mar 31 05:42:28 -0700 2013
Processing by ConsumerController#start as HTML
Parameters: {"openid_identifier"=>"http://localhost:3009/server/idp_xrds"}
Started GET "/server/idp_xrds" for 127.0.0.1 at Sun Mar 31 05:42:28 -0700 2013
Processing by ServerController#idp_xrds as application/xrds+xml
Rendered text template (0.0ms)
Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
Redirected to http://localhost:3009/server?openid.assoc_handle=%7BHMAC-SHA1%7D%7B51582d94%7D%7Bcdko1g%3D%3D%7D&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.mode=checkid_setup&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.realm=http%3A%2F%2Flocalhost%3A3010%2Fconsumer&openid.return_to=http%3A%2F%2Flocalhost%3A3010%2Fconsumer%2Fcomplete
Completed 302 Found in 31ms (ActiveRecord: 0.0ms)
Started GET "/server?openid.assoc_handle=%7BHMAC-SHA1%7D%7B51582d94%7D%7Bcdko1g%3D%3D%7D&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.mode=checkid_setup&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.realm=http%3A%2F%2Flocalhost%3A3010%2Fconsumer&openid.return_to=http%3A%2F%2Flocalhost%3A3010%2Fconsumer%2Fcomplete" for 127.0.0.1 at Sun Mar 31 05:42:28 -0700 2013
Processing by ServerController#index as HTML
Parameters: {"openid.return_to"=>"http://localhost:3010/consumer/complete", "openid.mode"=>"checkid_setup", "openid.ns"=>"http://specs.openid.net/auth/2.0", "openid.identity"=>"http://specs.openid.net/auth/2.0/identifier_select", "openid.assoc_handle"=>"{HMAC-SHA1}{51582d94}{cdko1g==}", "openid.realm"=>"http://localhost:3010/consumer", "openid.claimed_id"=>"http://specs.openid.net/auth/2.0/identifier_select"}
Rendering decide template!
Rendered server/decide.html.erb within layouts/server (0.6ms)
Completed 200 OK in 8ms (Views: 3.8ms | ActiveRecord: 0.0ms)
Started POST "/server/decision" for 127.0.0.1 at Sun Mar 31 05:42:36 -0700 2013
Processing by ServerController#decision as HTML
Parameters: {"yes"=>"yes", "id_to_send"=>"http://localhost:3009/marcel"}
WARNING: Can't verify CSRF token authenticity
Rendered text template (0.0ms)
Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
Started GET "/server?openid.assoc_handle=%7BHMAC-SHA1%7D%7B51582d94%7D%7Bcdko1g%3D%3D%7D&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.mode=checkid_setup&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.realm=http%3A%2F%2Flocalhost%3A3010%2Fconsumer&openid.return_to=http%3A%2F%2Flocalhost%3A3010%2Fconsumer%2Fcomplete" for 127.0.0.1 at Sun Mar 31 05:45:38 -0700 2013
Processing by ServerController#index as HTML
Parameters: {"openid.return_to"=>"http://localhost:3010/consumer/complete", "openid.mode"=>"checkid_setup", "openid.ns"=>"http://specs.openid.net/auth/2.0", "openid.identity"=>"http://specs.openid.net/auth/2.0/identifier_select", "openid.assoc_handle"=>"{HMAC-SHA1}{51582d94}{cdko1g==}", "openid.realm"=>"http://localhost:3010/consumer", "openid.claimed_id"=>"http://specs.openid.net/auth/2.0/identifier_select"}
The user hasn't logged in
Rendering decide template!
Rendered server/decide.html.erb within layouts/server (0.6ms)
Completed 200 OK in 19ms (Views: 10.1ms | ActiveRecord: 0.0ms)
Started GET "/server?openid.assoc_handle=%7BHMAC-SHA1%7D%7B51582d94%7D%7Bcdko1g%3D%3D%7D&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.mode=checkid_setup&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.realm=http%3A%2F%2Flocalhost%3A3010%2Fconsumer&openid.return_to=http%3A%2F%2Flocalhost%3A3010%2Fconsumer%2Fcomplete" for 127.0.0.1 at Sun Mar 31 05:46:02 -0700 2013
Processing by ServerController#index as HTML
Parameters: {"openid.return_to"=>"http://localhost:3010/consumer/complete", "openid.mode"=>"checkid_setup", "openid.ns"=>"http://specs.openid.net/auth/2.0", "openid.identity"=>"http://specs.openid.net/auth/2.0/identifier_select", "openid.assoc_handle"=>"{HMAC-SHA1}{51582d94}{cdko1g==}", "openid.realm"=>"http://localhost:3010/consumer", "openid.claimed_id"=>"http://specs.openid.net/auth/2.0/identifier_select"}
The user hasn't logged in
oidreq: <OpenID::Server::CheckIDRequest id:http://specs.openid.net/auth/2.0/identifier_select im:false tr:http://localhost:3010/consumer ah:{HMAC-SHA1}{51582d94}{cdko1g==}>
Rendering decide template!
Rendered server/decide.html.erb within layouts/server (0.6ms)
Completed 200 OK in 7ms (Views: 3.7ms | ActiveRecord: 0.0ms)
Started GET "/server?openid.assoc_handle=%7BHMAC-SHA1%7D%7B51582d94%7D%7Bcdko1g%3D%3D%7D&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.mode=checkid_setup&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.realm=http%3A%2F%2Flocalhost%3A3010%2Fconsumer&openid.return_to=http%3A%2F%2Flocalhost%3A3010%2Fconsumer%2Fcomplete" for 127.0.0.1 at Sun Mar 31 05:46:33 -0700 2013
Processing by ServerController#index as HTML
Parameters: {"openid.return_to"=>"http://localhost:3010/consumer/complete", "openid.mode"=>"checkid_setup", "openid.ns"=>"http://specs.openid.net/auth/2.0", "openid.identity"=>"http://specs.openid.net/auth/2.0/identifier_select", "openid.assoc_handle"=>"{HMAC-SHA1}{51582d94}{cdko1g==}", "openid.realm"=>"http://localhost:3010/consumer", "openid.claimed_id"=>"http://specs.openid.net/auth/2.0/identifier_select"}
The user hasn't logged in
oidreq: <OpenID::Server::CheckIDRequest id:http://specs.openid.net/auth/2.0/identifier_select im:false tr:http://localhost:3010/consumer ah:{HMAC-SHA1}{51582d94}{cdko1g==}>
Rendering decide template!
Rendered server/decide.html.erb within layouts/server (0.5ms)
session: <OpenID::Server::CheckIDRequest id:http://specs.openid.net/auth/2.0/identifier_select im:false tr:http://localhost:3010/consumer ah:{HMAC-SHA1}{51582d94}{cdko1g==}>
Rendering decide template!
Completed 500 Internal Server Error in 10ms
AbstractController::DoubleRenderError (Render and/or redirect were called multiple times in this action. Please note that you may only call render OR redirect, and at most once per action. Also note that neither redirect nor render terminate execution of the action, so if you want to exit an action after redirecting, you need to do something like "redirect_to(...) and return".):
app/controllers/server_controller.rb:88:in `show_decision_page'
app/controllers/server_controller.rb:45:in `index'
Rendered /Users/marcel/.gem/ruby/1.8/gems/actionpack-3.2.13/lib/action_dispatch/middleware/templates/rescues/_trace.erb (2.2ms)
Rendered /Users/marcel/.gem/ruby/1.8/gems/actionpack-3.2.13/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (5.0ms)
Rendered /Users/marcel/.gem/ruby/1.8/gems/actionpack-3.2.13/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (25.0ms)
Started GET "/server?openid.assoc_handle=%7BHMAC-SHA1%7D%7B51582d94%7D%7Bcdko1g%3D%3D%7D&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.mode=checkid_setup&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.realm=http%3A%2F%2Flocalhost%3A3010%2Fconsumer&openid.return_to=http%3A%2F%2Flocalhost%3A3010%2Fconsumer%2Fcomplete" for 127.0.0.1 at Sun Mar 31 05:46:47 -0700 2013
Processing by ServerController#index as HTML
Parameters: {"openid.return_to"=>"http://localhost:3010/consumer/complete", "openid.mode"=>"checkid_setup", "openid.ns"=>"http://specs.openid.net/auth/2.0", "openid.identity"=>"http://specs.openid.net/auth/2.0/identifier_select", "openid.assoc_handle"=>"{HMAC-SHA1}{51582d94}{cdko1g==}", "openid.realm"=>"http://localhost:3010/consumer", "openid.claimed_id"=>"http://specs.openid.net/auth/2.0/identifier_select"}
The user hasn't logged in
oidreq: <OpenID::Server::CheckIDRequest id:http://specs.openid.net/auth/2.0/identifier_select im:false tr:http://localhost:3010/consumer ah:{HMAC-SHA1}{51582d94}{cdko1g==}>
Rendering decide template!
Rendered server/decide.html.erb within layouts/server (0.6ms)
session: <OpenID::Server::CheckIDRequest id:http://specs.openid.net/auth/2.0/identifier_select im:false tr:http://localhost:3010/consumer ah:{HMAC-SHA1}{51582d94}{cdko1g==}>
Completed 200 OK in 8ms (Views: 4.8ms | ActiveRecord: 0.0ms)
Started GET "/server?openid.assoc_handle=%7BHMAC-SHA1%7D%7B51582d94%7D%7Bcdko1g%3D%3D%7D&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.mode=checkid_setup&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.realm=http%3A%2F%2Flocalhost%3A3010%2Fconsumer&openid.return_to=http%3A%2F%2Flocalhost%3A3010%2Fconsumer%2Fcomplete" for 127.0.0.1 at Sun Mar 31 05:48:24 -0700 2013
Processing by ServerController#index as HTML
Parameters: {"openid.return_to"=>"http://localhost:3010/consumer/complete", "openid.mode"=>"checkid_setup", "openid.ns"=>"http://specs.openid.net/auth/2.0", "openid.identity"=>"http://specs.openid.net/auth/2.0/identifier_select", "openid.assoc_handle"=>"{HMAC-SHA1}{51582d94}{cdko1g==}", "openid.realm"=>"http://localhost:3010/consumer", "openid.claimed_id"=>"http://specs.openid.net/auth/2.0/identifier_select"}
The user hasn't logged in
oidreq: <OpenID::Server::CheckIDRequest id:http://specs.openid.net/auth/2.0/identifier_select im:false tr:http://localhost:3010/consumer ah:{HMAC-SHA1}{51582d94}{cdko1g==}>
Setting last_oidreq to <OpenID::Server::CheckIDRequest id:http://specs.openid.net/auth/2.0/identifier_select im:false tr:http://localhost:3010/consumer ah:{HMAC-SHA1}{51582d94}{cdko1g==}>
Rendering decide template!
Rendered server/decide.html.erb within layouts/server (1.3ms)
session: <OpenID::Server::CheckIDRequest id:http://specs.openid.net/auth/2.0/identifier_select im:false tr:http://localhost:3010/consumer ah:{HMAC-SHA1}{51582d94}{cdko1g==}>
Completed 200 OK in 15ms (Views: 11.0ms | ActiveRecord: 0.0ms)
Started POST "/server/decision" for 127.0.0.1 at Sun Mar 31 05:48:44 -0700 2013
Processing by ServerController#decision as HTML
Parameters: {"yes"=>"yes", "id_to_send"=>"http://localhost:3009/marcel"}
WARNING: Can't verify CSRF token authenticity
last_oidreq:
Rendered text template (0.0ms)
Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)
Started GET "/server?openid.assoc_handle=%7BHMAC-SHA1%7D%7B51582d94%7D%7Bcdko1g%3D%3D%7D&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.mode=checkid_setup&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.realm=http%3A%2F%2Flocalhost%3A3010%2Fconsumer&openid.return_to=http%3A%2F%2Flocalhost%3A3010%2Fconsumer%2Fcomplete" for 127.0.0.1 at Sun Mar 31 05:54:41 -0700 2013
Processing by ServerController#index as HTML
Parameters: {"openid.return_to"=>"http://localhost:3010/consumer/complete", "openid.mode"=>"checkid_setup", "openid.ns"=>"http://specs.openid.net/auth/2.0", "openid.identity"=>"http://specs.openid.net/auth/2.0/identifier_select", "openid.assoc_handle"=>"{HMAC-SHA1}{51582d94}{cdko1g==}", "openid.realm"=>"http://localhost:3010/consumer", "openid.claimed_id"=>"http://specs.openid.net/auth/2.0/identifier_select"}
The user hasn't logged in
oidreq: <OpenID::Server::CheckIDRequest id:http://specs.openid.net/auth/2.0/identifier_select im:false tr:http://localhost:3010/consumer ah:{HMAC-SHA1}{51582d94}{cdko1g==}>
Setting last_oidreq to <OpenID::Server::CheckIDRequest id:http://specs.openid.net/auth/2.0/identifier_select im:false tr:http://localhost:3010/consumer ah:{HMAC-SHA1}{51582d94}{cdko1g==}>
Rendering decide template!
Rendered server/decide.html.erb within layouts/server (1.6ms)
session: <OpenID::Server::CheckIDRequest id:http://specs.openid.net/auth/2.0/identifier_select im:false tr:http://localhost:3010/consumer ah:{HMAC-SHA1}{51582d94}{cdko1g==}>
session size: 804
Completed 200 OK in 14ms (Views: 5.4ms | ActiveRecord: 0.0ms)
Started GET "/server?openid.assoc_handle=%7BHMAC-SHA1%7D%7B51582d94%7D%7Bcdko1g%3D%3D%7D&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.mode=checkid_setup&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.realm=http%3A%2F%2Flocalhost%3A3010%2Fconsumer&openid.return_to=http%3A%2F%2Flocalhost%3A3010%2Fconsumer%2Fcomplete" for 127.0.0.1 at Sun Mar 31 05:54:59 -0700 2013
Processing by ServerController#index as HTML
Parameters: {"openid.return_to"=>"http://localhost:3010/consumer/complete", "openid.mode"=>"checkid_setup", "openid.ns"=>"http://specs.openid.net/auth/2.0", "openid.identity"=>"http://specs.openid.net/auth/2.0/identifier_select", "openid.assoc_handle"=>"{HMAC-SHA1}{51582d94}{cdko1g==}", "openid.realm"=>"http://localhost:3010/consumer", "openid.claimed_id"=>"http://specs.openid.net/auth/2.0/identifier_select"}
The user hasn't logged in
oidreq: <OpenID::Server::CheckIDRequest id:http://specs.openid.net/auth/2.0/identifier_select im:false tr:http://localhost:3010/consumer ah:{HMAC-SHA1}{51582d94}{cdko1g==}>
Setting last_oidreq to <OpenID::Server::CheckIDRequest id:http://specs.openid.net/auth/2.0/identifier_select im:false tr:http://localhost:3010/consumer ah:{HMAC-SHA1}{51582d94}{cdko1g==}>
Rendering decide template!
Rendered server/decide.html.erb within layouts/server (0.6ms)
session: <OpenID::Server::CheckIDRequest id:http://specs.openid.net/auth/2.0/identifier_select im:false tr:http://localhost:3010/consumer ah:{HMAC-SHA1}{51582d94}{cdko1g==}>
Completed 500 Internal Server Error in 12ms
TypeError (can't dump anonymous module #<Module:0x10225e948>):
app/controllers/server_controller.rb:45:in `dump'
app/controllers/server_controller.rb:45:in `index'
Rendered /Users/marcel/.gem/ruby/1.8/gems/actionpack-3.2.13/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.9ms)
Rendered /Users/marcel/.gem/ruby/1.8/gems/actionpack-3.2.13/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (3.6ms)
Rendered /Users/marcel/.gem/ruby/1.8/gems/actionpack-3.2.13/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (27.3ms)
Started GET "/server?openid.assoc_handle=%7BHMAC-SHA1%7D%7B51582d94%7D%7Bcdko1g%3D%3D%7D&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.mode=checkid_setup&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.realm=http%3A%2F%2Flocalhost%3A3010%2Fconsumer&openid.return_to=http%3A%2F%2Flocalhost%3A3010%2Fconsumer%2Fcomplete" for 127.0.0.1 at Sun Mar 31 05:56:19 -0700 2013
Processing by ServerController#index as HTML
Parameters: {"openid.return_to"=>"http://localhost:3010/consumer/complete", "openid.mode"=>"checkid_setup", "openid.ns"=>"http://specs.openid.net/auth/2.0", "openid.identity"=>"http://specs.openid.net/auth/2.0/identifier_select", "openid.assoc_handle"=>"{HMAC-SHA1}{51582d94}{cdko1g==}", "openid.realm"=>"http://localhost:3010/consumer", "openid.claimed_id"=>"http://specs.openid.net/auth/2.0/identifier_select"}
The user hasn't logged in
oidreq: <OpenID::Server::CheckIDRequest id:http://specs.openid.net/auth/2.0/identifier_select im:false tr:http://localhost:3010/consumer ah:{HMAC-SHA1}{51582d94}{cdko1g==}>
Setting last_oidreq to <OpenID::Server::CheckIDRequest id:http://specs.openid.net/auth/2.0/identifier_select im:false tr:http://localhost:3010/consumer ah:{HMAC-SHA1}{51582d94}{cdko1g==}>
Rendering decide template!
Rendered server/decide.html.erb within layouts/server (0.6ms)
session last_oidreq: <OpenID::Server::CheckIDRequest id:http://specs.openid.net/auth/2.0/identifier_select im:false tr:http://localhost:3010/consumer ah:{HMAC-SHA1}{51582d94}{cdko1g==}>
session last_oidreq size: 804
Completed 200 OK in 8ms (Views: 4.3ms | ActiveRecord: 0.0ms)
Started POST "/server/decision" for 127.0.0.1 at Sun Mar 31 05:56:21 -0700 2013
Processing by ServerController#decision as HTML
Parameters: {"yes"=>"yes", "id_to_send"=>""}
WARNING: Can't verify CSRF token authenticity
hello:
last_oidreq:
Rendered text template (0.0ms)
Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
Started POST "/server/decision" for 127.0.0.1 at Sun Mar 31 05:56:26 -0700 2013
Processing by ServerController#decision as HTML
Parameters: {"yes"=>"yes", "id_to_send"=>""}
WARNING: Can't verify CSRF token authenticity
hello:
last_oidreq:
Rendered text template (0.0ms)
Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
Started GET "/server?openid.assoc_handle=%7BHMAC-SHA1%7D%7B51582d94%7D%7Bcdko1g%3D%3D%7D&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.mode=checkid_setup&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.realm=http%3A%2F%2Flocalhost%3A3010%2Fconsumer&openid.return_to=http%3A%2F%2Flocalhost%3A3010%2Fconsumer%2Fcomplete" for 127.0.0.1 at Sun Mar 31 05:56:36 -0700 2013
Processing by ServerController#index as HTML
Parameters: {"openid.return_to"=>"http://localhost:3010/consumer/complete", "openid.mode"=>"checkid_setup", "openid.ns"=>"http://specs.openid.net/auth/2.0", "openid.identity"=>"http://specs.openid.net/auth/2.0/identifier_select", "openid.assoc_handle"=>"{HMAC-SHA1}{51582d94}{cdko1g==}", "openid.realm"=>"http://localhost:3010/consumer", "openid.claimed_id"=>"http://specs.openid.net/auth/2.0/identifier_select"}
The user hasn't logged in
oidreq: <OpenID::Server::CheckIDRequest id:http://specs.openid.net/auth/2.0/identifier_select im:false tr:http://localhost:3010/consumer ah:{HMAC-SHA1}{51582d94}{cdko1g==}>
Setting last_oidreq to <OpenID::Server::CheckIDRequest id:http://specs.openid.net/auth/2.0/identifier_select im:false tr:http://localhost:3010/consumer ah:{HMAC-SHA1}{51582d94}{cdko1g==}>
Rendering decide template!
Rendered server/decide.html.erb within layouts/server (0.6ms)
session last_oidreq: <OpenID::Server::CheckIDRequest id:http://specs.openid.net/auth/2.0/identifier_select im:false tr:http://localhost:3010/consumer ah:{HMAC-SHA1}{51582d94}{cdko1g==}>
session last_oidreq size: 804
Completed 200 OK in 8ms (Views: 3.7ms | ActiveRecord: 0.0ms)
Started GET "/server?openid.assoc_handle=%7BHMAC-SHA1%7D%7B51582d94%7D%7Bcdko1g%3D%3D%7D&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.mode=checkid_setup&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.realm=http%3A%2F%2Flocalhost%3A3010%2Fconsumer&openid.return_to=http%3A%2F%2Flocalhost%3A3010%2Fconsumer%2Fcomplete" for 127.0.0.1 at Sun Mar 31 05:56:37 -0700 2013
Processing by ServerController#index as HTML
Parameters: {"openid.return_to"=>"http://localhost:3010/consumer/complete", "openid.mode"=>"checkid_setup", "openid.ns"=>"http://specs.openid.net/auth/2.0", "openid.identity"=>"http://specs.openid.net/auth/2.0/identifier_select", "openid.assoc_handle"=>"{HMAC-SHA1}{51582d94}{cdko1g==}", "openid.realm"=>"http://localhost:3010/consumer", "openid.claimed_id"=>"http://specs.openid.net/auth/2.0/identifier_select"}
The user hasn't logged in
oidreq: <OpenID::Server::CheckIDRequest id:http://specs.openid.net/auth/2.0/identifier_select im:false tr:http://localhost:3010/consumer ah:{HMAC-SHA1}{51582d94}{cdko1g==}>
Setting last_oidreq to <OpenID::Server::CheckIDRequest id:http://specs.openid.net/auth/2.0/identifier_select im:false tr:http://localhost:3010/consumer ah:{HMAC-SHA1}{51582d94}{cdko1g==}>
Rendering decide template!
Rendered server/decide.html.erb within layouts/server (0.5ms)
session last_oidreq: <OpenID::Server::CheckIDRequest id:http://specs.openid.net/auth/2.0/identifier_select im:false tr:http://localhost:3010/consumer ah:{HMAC-SHA1}{51582d94}{cdko1g==}>
session last_oidreq size: 804
Completed 200 OK in 7ms (Views: 3.1ms | ActiveRecord: 0.0ms)
Started POST "/server/decision" for 127.0.0.1 at Sun Mar 31 05:56:44 -0700 2013
Processing by ServerController#decision as HTML
Parameters: {"yes"=>"yes", "id_to_send"=>""}
WARNING: Can't verify CSRF token authenticity
hello:
last_oidreq:
Rendered text template (0.0ms)
Completed 200 OK in 1ms (Views: 0.8ms | ActiveRecord: 0.0ms)
Started POST "/server/decision" for 127.0.0.1 at Sun Mar 31 05:57:14 -0700 2013
Processing by ServerController#decision as HTML
Parameters: {"yes"=>"yes", "id_to_send"=>""}
WARNING: Can't verify CSRF token authenticity
session_id:
hello:
last_oidreq:
Rendered text template (0.0ms)
Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.0ms)
Started POST "/server/decision" for 127.0.0.1 at Sun Mar 31 05:57:35 -0700 2013
Processing by ServerController#decision as HTML
Parameters: {"yes"=>"yes", "id_to_send"=>""}
WARNING: Can't verify CSRF token authenticity
session_id:
hello:
last_oidreq:
Rendered text template (0.0ms)
Completed 200 OK in 3ms (Views: 2.1ms | ActiveRecord: 0.0ms)
Started POST "/server/decision" for 127.0.0.1 at Sun Mar 31 05:58:17 -0700 2013
Processing by ServerController#decision as HTML
Parameters: {"yes"=>"yes", "id_to_send"=>""}
WARNING: Can't verify CSRF token authenticity
session_id:
hello:
last_oidreq:
Rendered text template (0.0ms)
Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.0ms)
Started GET "/server?openid.assoc_handle=%7BHMAC-SHA1%7D%7B51582d94%7D%7Bcdko1g%3D%3D%7D&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.mode=checkid_setup&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.realm=http%3A%2F%2Flocalhost%3A3010%2Fconsumer&openid.return_to=http%3A%2F%2Flocalhost%3A3010%2Fconsumer%2Fcomplete" for 127.0.0.1 at Sun Mar 31 05:59:23 -0700 2013
Processing by ServerController#index as HTML
Parameters: {"openid.return_to"=>"http://localhost:3010/consumer/complete", "openid.mode"=>"checkid_setup", "openid.ns"=>"http://specs.openid.net/auth/2.0", "openid.identity"=>"http://specs.openid.net/auth/2.0/identifier_select", "openid.assoc_handle"=>"{HMAC-SHA1}{51582d94}{cdko1g==}", "openid.realm"=>"http://localhost:3010/consumer", "openid.claimed_id"=>"http://specs.openid.net/auth/2.0/identifier_select"}
The user hasn't logged in
oidreq: <OpenID::Server::CheckIDRequest id:http://specs.openid.net/auth/2.0/identifier_select im:false tr:http://localhost:3010/consumer ah:{HMAC-SHA1}{51582d94}{cdko1g==}>
Setting last_oidreq to <OpenID::Server::CheckIDRequest id:http://specs.openid.net/auth/2.0/identifier_select im:false tr:http://localhost:3010/consumer ah:{HMAC-SHA1}{51582d94}{cdko1g==}>
Rendering decide template!
Rendered server/decide.html.erb within layouts/server (0.6ms)
session last_oidreq: <OpenID::Server::CheckIDRequest id:http://specs.openid.net/auth/2.0/identifier_select im:false tr:http://localhost:3010/consumer ah:{HMAC-SHA1}{51582d94}{cdko1g==}>
session last_oidreq size: 804
session_id: 0df6cf9c44f69c6a4ab15e8a889cdbfc
Completed 200 OK in 8ms (Views: 3.6ms | ActiveRecord: 0.0ms)
Started GET "/server?openid.assoc_handle=%7BHMAC-SHA1%7D%7B51582d94%7D%7Bcdko1g%3D%3D%7D&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.mode=checkid_setup&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.realm=http%3A%2F%2Flocalhost%3A3010%2Fconsumer&openid.return_to=http%3A%2F%2Flocalhost%3A3010%2Fconsumer%2Fcomplete" for 127.0.0.1 at Sun Mar 31 06:00:27 -0700 2013
Processing by ServerController#index as HTML
Parameters: {"openid.return_to"=>"http://localhost:3010/consumer/complete", "openid.mode"=>"checkid_setup", "openid.ns"=>"http://specs.openid.net/auth/2.0", "openid.identity"=>"http://specs.openid.net/auth/2.0/identifier_select", "openid.assoc_handle"=>"{HMAC-SHA1}{51582d94}{cdko1g==}", "openid.realm"=>"http://localhost:3010/consumer", "openid.claimed_id"=>"http://specs.openid.net/auth/2.0/identifier_select"}
The user hasn't logged in
oidreq: <OpenID::Server::CheckIDRequest id:http://specs.openid.net/auth/2.0/identifier_select im:false tr:http://localhost:3010/consumer ah:{HMAC-SHA1}{51582d94}{cdko1g==}>
Setting last_oidreq to <OpenID::Server::CheckIDRequest id:http://specs.openid.net/auth/2.0/identifier_select im:false tr:http://localhost:3010/consumer ah:{HMAC-SHA1}{51582d94}{cdko1g==}>
Rendering decide template!
Rendered server/decide.html.erb within layouts/server (0.6ms)
session last_oidreq: <OpenID::Server::CheckIDRequest id:http://specs.openid.net/auth/2.0/identifier_select im:false tr:http://localhost:3010/consumer ah:{HMAC-SHA1}{51582d94}{cdko1g==}>
session last_oidreq size: 804
session_id: 0df6cf9c44f69c6a4ab15e8a889cdbfc
session_id cookie:
Completed 200 OK in 8ms (Views: 4.4ms | ActiveRecord: 0.0ms)
Started GET "/server?openid.assoc_handle=%7BHMAC-SHA1%7D%7B51582d94%7D%7Bcdko1g%3D%3D%7D&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.mode=checkid_setup&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.realm=http%3A%2F%2Flocalhost%3A3010%2Fconsumer&openid.return_to=http%3A%2F%2Flocalhost%3A3010%2Fconsumer%2Fcomplete" for 127.0.0.1 at Sun Mar 31 06:00:46 -0700 2013
Processing by ServerController#index as HTML
Parameters: {"openid.return_to"=>"http://localhost:3010/consumer/complete", "openid.mode"=>"checkid_setup", "openid.ns"=>"http://specs.openid.net/auth/2.0", "openid.identity"=>"http://specs.openid.net/auth/2.0/identifier_select", "openid.assoc_handle"=>"{HMAC-SHA1}{51582d94}{cdko1g==}", "openid.realm"=>"http://localhost:3010/consumer", "openid.claimed_id"=>"http://specs.openid.net/auth/2.0/identifier_select"}
The user hasn't logged in
oidreq: <OpenID::Server::CheckIDRequest id:http://specs.openid.net/auth/2.0/identifier_select im:false tr:http://localhost:3010/consumer ah:{HMAC-SHA1}{51582d94}{cdko1g==}>
Setting last_oidreq to <OpenID::Server::CheckIDRequest id:http://specs.openid.net/auth/2.0/identifier_select im:false tr:http://localhost:3010/consumer ah:{HMAC-SHA1}{51582d94}{cdko1g==}>
Rendering decide template!
Rendered server/decide.html.erb within layouts/server (0.9ms)
session last_oidreq: <OpenID::Server::CheckIDRequest id:http://specs.openid.net/auth/2.0/identifier_select im:false tr:http://localhost:3010/consumer ah:{HMAC-SHA1}{51582d94}{cdko1g==}>
session last_oidreq size: 804
session_id: 0df6cf9c44f69c6a4ab15e8a889cdbfc
session_id cookie: BAh7CSIPc2Vzc2lvbl9pZCIlMGRmNmNmOWM0NGY2OWM2YTRhYjE1ZThhODg5Y2RiZmMiCmhlbGxvIgp3b3JsZCIKZmxhc2hvOiVBY3Rpb25EaXNwYXRjaDo6Rmxhc2g6OkZsYXNoSGFzaAk6DUBmbGFzaGVzewY6C25vdGljZSIvRG8geW91IHRydXN0IHRoaXMgc2l0ZSB3aXRoIHlvdXIgaWRlbnRpdHk/OgpAdXNlZG86CFNldAY6CkBoYXNoewA6DEBjbG9zZWRGOglAbm93MCIQbGFzdF9vaWRyZXFvOiNPcGVuSUQ6OlNlcnZlcjo6Q2hlY2tJRFJlcXVlc3QOOhBAdHJ1c3Rfcm9vdCIjaHR0cDovL2xvY2FsaG9zdDozMDEwL2NvbnN1bWVyOg9AcmV0dXJuX3RvIixodHRwOi8vbG9jYWxob3N0OjMwMTAvY29uc3VtZXIvY29tcGxldGU6DUBtZXNzYWdlbzoUT3BlbklEOjpNZXNzYWdlCDoQQG5hbWVzcGFjZXNvOhlPcGVuSUQ6Ok5hbWVzcGFjZU1hcAg6GEBhbGlhc190b19uYW1lc3BhY2V7BjoTbnVsbF9uYW1lc3BhY2UiJWh0dHA6Ly9zcGVjcy5vcGVuaWQubmV0L2F1dGgvMi4wOhlAaW1wbGljaXRfbmFtZXNwYWNlc1sAOhhAbmFtZXNwYWNlX3RvX2FsaWFzewYiJWh0dHA6Ly9zcGVjcy5vcGVuaWQubmV0L2F1dGgvMi4wOxU6E0BvcGVuaWRfbnNfdXJpQBc6CkBhcmdzew1bB0AXIgltb2RlIhJjaGVja2lkX3NldHVwWwdAFyIPY2xhaW1lZF9pZCI3aHR0cDovL3NwZWNzLm9wZW5pZC5uZXQvYXV0aC8yLjAvaWRlbnRpZmllcl9zZWxlY3RbBzoTYmFyZV9uYW1lc3BhY2UiC2FjdGlvbiIKaW5kZXhbBzsaIg9jb250cm9sbGVyIgtzZXJ2ZXJbB0AXIhFhc3NvY19oYW5kbGUiJHtITUFDLVNIQTF9ezUxNTgyZDk0fXtjZGtvMWc9PX1bB0AXIg5yZXR1cm5fdG9AE1sHQBciCnJlYWxtQBJbB0AXIg1pZGVudGl0eSI3aHR0cDovL3NwZWNzLm9wZW5pZC5uZXQvYXV0aC8yLjAvaWRlbnRpZmllcl9zZWxlY3Q6D0BpbW1lZGlhdGVGOg5AaWRlbnRpdHlAMToSQGFzc29jX2hhbmRsZUAqOhBAY2xhaW1lZF9pZEAhOgpAbW9kZSISY2hlY2tpZF9zZXR1cDoRQG9wX2VuZHBvaW50IiFodHRwOi8vbG9jYWxob3N0OjMwMDkvc2VydmVy--e9977c9d345b7da60a35bbd6b27618a288f54057
Completed 200 OK in 31ms (Views: 14.7ms | ActiveRecord: 0.0ms)
Started POST "/server/decision" for 127.0.0.1 at Sun Mar 31 06:01:27 -0700 2013
Processing by ServerController#decision as HTML
Parameters: {"yes"=>"yes", "id_to_send"=>""}
WARNING: Can't verify CSRF token authenticity
session_id:
session_id cookie: BAh7CSIPc2Vzc2lvbl9pZCIlMGRmNmNmOWM0NGY2OWM2YTRhYjE1ZThhODg5Y2RiZmMiCmhlbGxvIgp3b3JsZCIQbGFzdF9vaWRyZXFvOiNPcGVuSUQ6OlNlcnZlcjo6Q2hlY2tJRFJlcXVlc3QOOhBAdHJ1c3Rfcm9vdCIjaHR0cDovL2xvY2FsaG9zdDozMDEwL2NvbnN1bWVyOg9AcmV0dXJuX3RvIixodHRwOi8vbG9jYWxob3N0OjMwMTAvY29uc3VtZXIvY29tcGxldGU6DUBtZXNzYWdlbzoUT3BlbklEOjpNZXNzYWdlCDoQQG5hbWVzcGFjZXNvOhlPcGVuSUQ6Ok5hbWVzcGFjZU1hcAg6GEBhbGlhc190b19uYW1lc3BhY2V7BjoTbnVsbF9uYW1lc3BhY2UiJWh0dHA6Ly9zcGVjcy5vcGVuaWQubmV0L2F1dGgvMi4wOhlAaW1wbGljaXRfbmFtZXNwYWNlc1sAOhhAbmFtZXNwYWNlX3RvX2FsaWFzewYiJWh0dHA6Ly9zcGVjcy5vcGVuaWQubmV0L2F1dGgvMi4wOw06E0BvcGVuaWRfbnNfdXJpQBE6CkBhcmdzew1bB0ARIgltb2RlIhJjaGVja2lkX3NldHVwWwdAESIPY2xhaW1lZF9pZCI3aHR0cDovL3NwZWNzLm9wZW5pZC5uZXQvYXV0aC8yLjAvaWRlbnRpZmllcl9zZWxlY3RbBzoTYmFyZV9uYW1lc3BhY2UiC2FjdGlvbiIKaW5kZXhbBzsSIg9jb250cm9sbGVyIgtzZXJ2ZXJbB0ARIhFhc3NvY19oYW5kbGUiJHtITUFDLVNIQTF9ezUxNTgyZDk0fXtjZGtvMWc9PX1bB0ARIg5yZXR1cm5fdG9ADVsHQBEiCnJlYWxtQAxbB0ARIg1pZGVudGl0eSI3aHR0cDovL3NwZWNzLm9wZW5pZC5uZXQvYXV0aC8yLjAvaWRlbnRpZmllcl9zZWxlY3Q6D0BpbW1lZGlhdGVGOg5AaWRlbnRpdHlAKzoSQGFzc29jX2hhbmRsZUAkOhBAY2xhaW1lZF9pZEAbOgpAbW9kZSISY2hlY2tpZF9zZXR1cDoRQG9wX2VuZHBvaW50IiFodHRwOi8vbG9jYWxob3N0OjMwMDkvc2VydmVyIgpmbGFzaG86JUFjdGlvbkRpc3BhdGNoOjpGbGFzaDo6Rmxhc2hIYXNoCToNQGZsYXNoZXN7BjoLbm90aWNlIi9EbyB5b3UgdHJ1c3QgdGhpcyBzaXRlIHdpdGggeW91ciBpZGVudGl0eT86CkB1c2VkbzoIU2V0BjoKQGhhc2h7ADoMQGNsb3NlZEY6CUBub3cw--097664684a5b4ec726b2e9621c60066bdffa2b08
hello:
last_oidreq:
Rendered text template (0.0ms)
Completed 200 OK in 2ms (Views: 1.2ms | ActiveRecord: 0.0ms)
Started POST "/server/decision" for 127.0.0.1 at Sun Mar 31 06:01:46 -0700 2013
Processing by ServerController#decision as HTML
Parameters: {"yes"=>"yes", "id_to_send"=>""}
WARNING: Can't verify CSRF token authenticity
session_id:
session_id cookie: BAh7BzoQbGFzdF9vaWRyZXEwIg9zZXNzaW9uX2lkIiViMjkzOWYzZGM1MGUzZGVhN2MzMjQwODgwMzk4ZDRlZg==--5c9b11469badcabaca82548d4d506f6b7b1e834f
hello:
last_oidreq:
Rendered text template (0.0ms)
Completed 200 OK in 2ms (Views: 1.2ms | ActiveRecord: 0.0ms)
Started GET "/server?openid.assoc_handle=%7BHMAC-SHA1%7D%7B51582d94%7D%7Bcdko1g%3D%3D%7D&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.mode=checkid_setup&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.realm=http%3A%2F%2Flocalhost%3A3010%2Fconsumer&openid.return_to=http%3A%2F%2Flocalhost%3A3010%2Fconsumer%2Fcomplete" for 127.0.0.1 at Sun Mar 31 06:07:21 -0700 2013
Processing by ServerController#index as HTML
Parameters: {"openid.return_to"=>"http://localhost:3010/consumer/complete", "openid.mode"=>"checkid_setup", "openid.ns"=>"http://specs.openid.net/auth/2.0", "openid.identity"=>"http://specs.openid.net/auth/2.0/identifier_select", "openid.assoc_handle"=>"{HMAC-SHA1}{51582d94}{cdko1g==}", "openid.realm"=>"http://localhost:3010/consumer", "openid.claimed_id"=>"http://specs.openid.net/auth/2.0/identifier_select"}
The user hasn't logged in
oidreq: <OpenID::Server::CheckIDRequest id:http://specs.openid.net/auth/2.0/identifier_select im:false tr:http://localhost:3010/consumer ah:{HMAC-SHA1}{51582d94}{cdko1g==}>
Setting last_oidreq to <OpenID::Server::CheckIDRequest id:http://specs.openid.net/auth/2.0/identifier_select im:false tr:http://localhost:3010/consumer ah:{HMAC-SHA1}{51582d94}{cdko1g==}>
Rendering decide template!
Rendered server/decide.html.erb within layouts/server (1.2ms)
session last_oidreq: <OpenID::Server::CheckIDRequest id:http://specs.openid.net/auth/2.0/identifier_select im:false tr:http://localhost:3010/consumer ah:{HMAC-SHA1}{51582d94}{cdko1g==}>
session last_oidreq size: 804
session_id: d50d3dd624bc8ca8e44f1203c96a8f93
session_id cookie: BAh7BzoQbGFzdF9vaWRyZXEwIg9zZXNzaW9uX2lkIiVkNTBkM2RkNjI0YmM4Y2E4ZTQ0ZjEyMDNjOTZhOGY5Mw==--4184fd96c6f41491285b5f6c1e96b4b72e28c2f8
Completed 200 OK in 10ms (Views: 4.6ms | ActiveRecord: 0.0ms)
Started GET "/server?openid.assoc_handle=%7BHMAC-SHA1%7D%7B51582d94%7D%7Bcdko1g%3D%3D%7D&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.mode=checkid_setup&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.realm=http%3A%2F%2Flocalhost%3A3010%2Fconsumer&openid.return_to=http%3A%2F%2Flocalhost%3A3010%2Fconsumer%2Fcomplete" for 127.0.0.1 at Sun Mar 31 06:07:33 -0700 2013
Processing by ServerController#index as HTML
Parameters: {"openid.return_to"=>"http://localhost:3010/consumer/complete", "openid.mode"=>"checkid_setup", "openid.ns"=>"http://specs.openid.net/auth/2.0", "openid.identity"=>"http://specs.openid.net/auth/2.0/identifier_select", "openid.assoc_handle"=>"{HMAC-SHA1}{51582d94}{cdko1g==}", "openid.realm"=>"http://localhost:3010/consumer", "openid.claimed_id"=>"http://specs.openid.net/auth/2.0/identifier_select"}
The user hasn't logged in
oidreq: <OpenID::Server::CheckIDRequest id:http://specs.openid.net/auth/2.0/identifier_select im:false tr:http://localhost:3010/consumer ah:{HMAC-SHA1}{51582d94}{cdko1g==}>
Setting last_oidreq to <OpenID::Server::CheckIDRequest id:http://specs.openid.net/auth/2.0/identifier_select im:false tr:http://localhost:3010/consumer ah:{HMAC-SHA1}{51582d94}{cdko1g==}>
Rendering decide template!
Rendered server/decide.html.erb within layouts/server (157.0ms)
Completed 500 Internal Server Error in 166ms
ActionView::Template::Error (undefined local variable or method `form_authenticity_token_field' for #<#<Class:0x103647298>:0x10358a698>):
1: <form method="post" action="<%= url_for :controller => 'server', :action => 'decision' %>">
2: <%= form_authenticity_token_field %>
3:
4: <table>
5: <tr><td>Site:</td><td><%= @oidreq.trust_root %></td></tr>
app/views/server/decide.html.erb:2:in `_app_views_server_decide_html_erb___1096845836_2175551400'
app/controllers/server_controller.rb:92:in `show_decision_page'
app/controllers/server_controller.rb:43:in `index'
Rendered /Users/marcel/.gem/ruby/1.8/gems/actionpack-3.2.13/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.8ms)
Rendered /Users/marcel/.gem/ruby/1.8/gems/actionpack-3.2.13/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (2.3ms)
Rendered /Users/marcel/.gem/ruby/1.8/gems/actionpack-3.2.13/lib/action_dispatch/middleware/templates/rescues/template_error.erb within rescues/layout (15.6ms)
Started GET "/server?openid.assoc_handle=%7BHMAC-SHA1%7D%7B51582d94%7D%7Bcdko1g%3D%3D%7D&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.identity=http%3A%2F%2Fspecs.openid.net%
gitextract_dyyu04vx/
├── .gitignore
├── .travis.yml
├── CHANGELOG.md
├── CHANGES-2.0.0
├── CHANGES-2.1.0
├── Gemfile
├── INSTALL.md
├── LICENSE
├── NOTICE
├── README.md
├── Rakefile
├── UPGRADE.md
├── admin/
│ ├── build-docs
│ ├── fixperms
│ ├── gettlds.py
│ ├── graph-require.sh
│ ├── library-name
│ ├── mkassoc
│ ├── prepare-release
│ └── runtests
├── examples/
│ ├── README.md
│ ├── active_record_openid_store/
│ │ ├── README
│ │ ├── XXX_add_open_id_store_to_db.rb
│ │ ├── XXX_upgrade_open_id_store.rb
│ │ ├── init.rb
│ │ ├── lib/
│ │ │ ├── association.rb
│ │ │ ├── nonce.rb
│ │ │ ├── open_id_setting.rb
│ │ │ └── openid_ar_store.rb
│ │ └── test/
│ │ └── store_test.rb
│ ├── discover
│ └── rails_openid/
│ ├── Gemfile
│ ├── README
│ ├── README.rdoc
│ ├── Rakefile
│ ├── app/
│ │ ├── assets/
│ │ │ ├── javascripts/
│ │ │ │ └── application.js
│ │ │ └── stylesheets/
│ │ │ └── application.css
│ │ ├── controllers/
│ │ │ ├── application_controller.rb
│ │ │ ├── consumer_controller.rb
│ │ │ ├── login_controller.rb
│ │ │ └── server_controller.rb
│ │ ├── helpers/
│ │ │ ├── application_helper.rb
│ │ │ ├── login_helper.rb
│ │ │ └── server_helper.rb
│ │ ├── mailers/
│ │ │ └── .gitkeep
│ │ ├── models/
│ │ │ └── .gitkeep
│ │ └── views/
│ │ ├── consumer/
│ │ │ └── index.html.erb
│ │ ├── layouts/
│ │ │ └── server.html.erb
│ │ ├── login/
│ │ │ └── index.html.erb
│ │ └── server/
│ │ └── decide.html.erb
│ ├── config/
│ │ ├── application.rb
│ │ ├── boot.rb
│ │ ├── database.yml
│ │ ├── environment.rb
│ │ ├── environments/
│ │ │ ├── development.rb
│ │ │ ├── production.rb
│ │ │ └── test.rb
│ │ ├── initializers/
│ │ │ ├── backtrace_silencers.rb
│ │ │ ├── inflections.rb
│ │ │ ├── mime_types.rb
│ │ │ ├── rails_root.rb
│ │ │ ├── secret_token.rb
│ │ │ ├── session_store.rb
│ │ │ └── wrap_parameters.rb
│ │ ├── locales/
│ │ │ └── en.yml
│ │ └── routes.rb
│ ├── config.ru
│ ├── db/
│ │ ├── development.sqlite3
│ │ └── seeds.rb
│ ├── lib/
│ │ ├── assets/
│ │ │ └── .gitkeep
│ │ └── tasks/
│ │ └── .gitkeep
│ ├── log/
│ │ ├── .gitkeep
│ │ └── development.log
│ ├── public/
│ │ ├── 404.html
│ │ ├── 422.html
│ │ ├── 500.html
│ │ ├── dispatch.cgi
│ │ ├── dispatch.fcgi
│ │ ├── dispatch.rb
│ │ ├── javascripts/
│ │ │ ├── application.js
│ │ │ ├── controls.js
│ │ │ ├── dragdrop.js
│ │ │ ├── effects.js
│ │ │ └── prototype.js
│ │ └── robots.txt
│ ├── script/
│ │ └── rails
│ └── test/
│ ├── fixtures/
│ │ └── .gitkeep
│ ├── functional/
│ │ ├── .gitkeep
│ │ ├── login_controller_test.rb
│ │ └── server_controller_test.rb
│ ├── integration/
│ │ └── .gitkeep
│ ├── performance/
│ │ └── browsing_test.rb
│ ├── test_helper.rb
│ └── unit/
│ └── .gitkeep
├── lib/
│ ├── hmac/
│ │ ├── hmac.rb
│ │ ├── sha1.rb
│ │ └── sha2.rb
│ ├── openid/
│ │ ├── association.rb
│ │ ├── consumer/
│ │ │ ├── associationmanager.rb
│ │ │ ├── checkid_request.rb
│ │ │ ├── discovery.rb
│ │ │ ├── discovery_manager.rb
│ │ │ ├── html_parse.rb
│ │ │ ├── idres.rb
│ │ │ ├── responses.rb
│ │ │ └── session.rb
│ │ ├── consumer.rb
│ │ ├── cryptutil.rb
│ │ ├── dh.rb
│ │ ├── extension.rb
│ │ ├── extensions/
│ │ │ ├── ax.rb
│ │ │ ├── oauth.rb
│ │ │ ├── pape.rb
│ │ │ ├── sreg.rb
│ │ │ └── ui.rb
│ │ ├── fetchers.rb
│ │ ├── kvform.rb
│ │ ├── kvpost.rb
│ │ ├── message.rb
│ │ ├── protocolerror.rb
│ │ ├── server.rb
│ │ ├── store/
│ │ │ ├── filesystem.rb
│ │ │ ├── interface.rb
│ │ │ ├── memcache.rb
│ │ │ ├── memory.rb
│ │ │ └── nonce.rb
│ │ ├── trustroot.rb
│ │ ├── urinorm.rb
│ │ ├── util.rb
│ │ ├── version.rb
│ │ └── yadis/
│ │ ├── accept.rb
│ │ ├── constants.rb
│ │ ├── discovery.rb
│ │ ├── filters.rb
│ │ ├── htmltokenizer.rb
│ │ ├── parsehtml.rb
│ │ ├── services.rb
│ │ ├── xrds.rb
│ │ ├── xri.rb
│ │ └── xrires.rb
│ ├── openid.rb
│ └── ruby-openid.rb
├── ruby-openid.gemspec
├── setup.rb
└── test/
├── data/
│ ├── accept.txt
│ ├── dh.txt
│ ├── example-xrds.xml
│ ├── linkparse.txt
│ ├── n2b64
│ ├── test1-discover.txt
│ ├── test1-parsehtml.txt
│ ├── test_discover/
│ │ ├── malformed_meta_tag.html
│ │ ├── openid.html
│ │ ├── openid2.html
│ │ ├── openid2_xrds.xml
│ │ ├── openid2_xrds_no_local_id.xml
│ │ ├── openid_1_and_2.html
│ │ ├── openid_1_and_2_xrds.xml
│ │ ├── openid_1_and_2_xrds_bad_delegate.xml
│ │ ├── openid_and_yadis.html
│ │ ├── openid_no_delegate.html
│ │ ├── openid_utf8.html
│ │ ├── yadis_0entries.xml
│ │ ├── yadis_2_bad_local_id.xml
│ │ ├── yadis_2entries_delegate.xml
│ │ ├── yadis_2entries_idp.xml
│ │ ├── yadis_another_delegate.xml
│ │ ├── yadis_idp.xml
│ │ ├── yadis_idp_delegate.xml
│ │ └── yadis_no_delegate.xml
│ ├── test_xrds/
│ │ ├── =j3h.2007.11.14.xrds
│ │ ├── README
│ │ ├── delegated-20060809-r1.xrds
│ │ ├── delegated-20060809-r2.xrds
│ │ ├── delegated-20060809.xrds
│ │ ├── no-xrd.xml
│ │ ├── not-xrds.xml
│ │ ├── prefixsometimes.xrds
│ │ ├── ref.xrds
│ │ ├── sometimesprefix.xrds
│ │ ├── spoof1.xrds
│ │ ├── spoof2.xrds
│ │ ├── spoof3.xrds
│ │ ├── status222.xrds
│ │ ├── subsegments.xrds
│ │ └── valid-populated-xrds.xml
│ ├── trustroot.txt
│ └── urinorm.txt
├── discoverdata.rb
├── test_accept.rb
├── test_association.rb
├── test_associationmanager.rb
├── test_ax.rb
├── test_checkid_request.rb
├── test_consumer.rb
├── test_cryptutil.rb
├── test_dh.rb
├── test_discover.rb
├── test_discovery_manager.rb
├── test_extension.rb
├── test_fetchers.rb
├── test_filters.rb
├── test_idres.rb
├── test_kvform.rb
├── test_kvpost.rb
├── test_linkparse.rb
├── test_message.rb
├── test_nonce.rb
├── test_oauth.rb
├── test_openid_yadis.rb
├── test_pape.rb
├── test_parsehtml.rb
├── test_responses.rb
├── test_server.rb
├── test_sreg.rb
├── test_stores.rb
├── test_trustroot.rb
├── test_ui.rb
├── test_urinorm.rb
├── test_util.rb
├── test_xrds.rb
├── test_xri.rb
├── test_xrires.rb
├── test_yadis_discovery.rb
├── testutil.rb
└── util.rb
SYMBOL INDEX (2348 symbols across 108 files)
FILE: examples/active_record_openid_store/XXX_add_open_id_store_to_db.rb
class AddOpenIdStoreToDb (line 2) | class AddOpenIdStoreToDb < ActiveRecord::Migration
method up (line 3) | def self.up
method down (line 20) | def self.down
FILE: examples/active_record_openid_store/XXX_upgrade_open_id_store.rb
class UpgradeOpenIdStore (line 3) | class UpgradeOpenIdStore < ActiveRecord::Migration
method up (line 4) | def self.up
method down (line 14) | def self.down
FILE: examples/active_record_openid_store/lib/association.rb
class Association (line 4) | class Association < ActiveRecord::Base
method from_record (line 6) | def from_record
FILE: examples/active_record_openid_store/lib/nonce.rb
class Nonce (line 1) | class Nonce < ActiveRecord::Base
FILE: examples/active_record_openid_store/lib/open_id_setting.rb
class OpenIdSetting (line 1) | class OpenIdSetting < ActiveRecord::Base
FILE: examples/active_record_openid_store/lib/openid_ar_store.rb
class ActiveRecordStore (line 6) | class ActiveRecordStore < OpenID::Store::Interface
method store_association (line 7) | def store_association(server_url, assoc)
method get_association (line 17) | def get_association(server_url, handle=nil)
method remove_association (line 36) | def remove_association(server_url, handle)
method use_nonce (line 40) | def use_nonce(server_url, timestamp, salt)
method cleanup_nonces (line 47) | def cleanup_nonces
method cleanup_associations (line 52) | def cleanup_associations
FILE: examples/active_record_openid_store/test/store_test.rb
type StoreTestCase (line 6) | module StoreTestCase
function _gen_nonce (line 10) | def _gen_nonce
function _gen_handle (line 14) | def _gen_handle(n)
function _gen_secret (line 18) | def _gen_secret(n, chars=nil)
function _gen_assoc (line 22) | def _gen_assoc(issued, lifetime=600)
function _check_retrieve (line 29) | def _check_retrieve(url, handle=nil, expected=nil)
function _check_remove (line 41) | def _check_remove(url, handle, expected)
function test_store (line 46) | def test_store
function _check_use_nonce (line 148) | def _check_use_nonce(nonce, expected, server_url, msg='')
function test_nonce (line 154) | def test_nonce
class TestARStore (line 204) | class TestARStore < Test::Unit::TestCase
method setup (line 207) | def setup
FILE: examples/rails_openid/app/controllers/application_controller.rb
class ApplicationController (line 1) | class ApplicationController < ActionController::Base
FILE: examples/rails_openid/app/controllers/consumer_controller.rb
class ConsumerController (line 8) | class ConsumerController < ApplicationController
method index (line 11) | def index
method start (line 15) | def start
method complete (line 58) | def complete
method consumer (line 115) | def consumer
FILE: examples/rails_openid/app/controllers/login_controller.rb
class LoginController (line 6) | class LoginController < ApplicationController
method base_url (line 10) | def base_url
method index (line 14) | def index
method submit (line 22) | def submit
method logout (line 38) | def logout
FILE: examples/rails_openid/app/controllers/server_controller.rb
class ServerController (line 9) | class ServerController < ApplicationController
method index (line 15) | def index
method show_decision_page (line 75) | def show_decision_page(oidreq, message="Do you trust this site with yo...
method user_page (line 86) | def user_page
method user_xrds (line 114) | def user_xrds
method idp_xrds (line 124) | def idp_xrds
method decision (line 132) | def decision
method server (line 170) | def server
method approved (line 180) | def approved(trust_root)
method is_authorized (line 185) | def is_authorized(identity_url, trust_root)
method render_xrds (line 189) | def render_xrds(types)
method add_sreg (line 213) | def add_sreg(oidreq, oidresp)
method add_pape (line 231) | def add_pape(oidreq, oidresp)
method render_response (line 239) | def render_response(oidresp)
FILE: examples/rails_openid/app/helpers/application_helper.rb
type ApplicationHelper (line 1) | module ApplicationHelper
FILE: examples/rails_openid/app/helpers/login_helper.rb
type LoginHelper (line 1) | module LoginHelper
FILE: examples/rails_openid/app/helpers/server_helper.rb
type ServerHelper (line 2) | module ServerHelper
function url_for_user (line 4) | def url_for_user
FILE: examples/rails_openid/config/application.rb
type RailsOpenid (line 12) | module RailsOpenid
class Application (line 13) | class Application < Rails::Application
FILE: examples/rails_openid/public/javascripts/controls.js
function addText (line 561) | function addText(mode, condition) {
function fallback (line 857) | function fallback(name, expr) {
FILE: examples/rails_openid/public/javascripts/effects.js
function codeForEvent (line 231) | function codeForEvent(options,eventName){
function dispatch (line 248) | function dispatch(effect, eventName) {
function parseColor (line 952) | function parseColor(color){
FILE: examples/rails_openid/public/javascripts/prototype.js
function klass (line 50) | function klass() {
function $A (line 812) | function $A(iterable) {
function $w (line 945) | function $w(string) {
function $H (line 993) | function $H(object) {
function toQueryPair (line 999) | function toQueryPair(key, value) {
function $ (line 1513) | function $(element) {
function stripAlpha (line 2289) | function stripAlpha(filter){
function extend (line 2627) | function extend(tagName) {
function copy (line 2634) | function copy(methods, destination, onlyIfAbsent) {
function findDOMClass (line 2644) | function findDOMClass(tagName) {
function $$ (line 3443) | function $$() {
function getEventID (line 3935) | function getEventID(element) {
function getDOMEventName (line 3941) | function getDOMEventName(eventName) {
function getCacheForID (line 3946) | function getCacheForID(id) {
function getWrappersForEventName (line 3950) | function getWrappersForEventName(id, eventName) {
function createWrapper (line 3955) | function createWrapper(element, eventName, handler) {
function findWrapper (line 3974) | function findWrapper(id, eventName, handler) {
function destroyWrapper (line 3979) | function destroyWrapper(id, eventName, handler) {
function destroyCache (line 3985) | function destroyCache() {
function fireContentLoadedEvent (line 4102) | function fireContentLoadedEvent() {
function iter (line 4251) | function iter(name) {
FILE: examples/rails_openid/test/functional/login_controller_test.rb
class LoginController (line 5) | class LoginController; def rescue_action(e) raise e end; end
method rescue_action (line 5) | def rescue_action(e) raise e end
class LoginControllerTest (line 7) | class LoginControllerTest < Test::Unit::TestCase
method setup (line 8) | def setup
method test_truth (line 15) | def test_truth
FILE: examples/rails_openid/test/functional/server_controller_test.rb
class ServerController (line 5) | class ServerController; def rescue_action(e) raise e end; end
method rescue_action (line 5) | def rescue_action(e) raise e end
class ServerControllerTest (line 7) | class ServerControllerTest < Test::Unit::TestCase
method setup (line 8) | def setup
method test_truth (line 15) | def test_truth
FILE: examples/rails_openid/test/performance/browsing_test.rb
class BrowsingTest (line 4) | class BrowsingTest < ActionDispatch::PerformanceTest
method test_homepage (line 9) | def test_homepage
FILE: examples/rails_openid/test/test_helper.rb
class ActiveSupport::TestCase (line 5) | class ActiveSupport::TestCase
FILE: lib/hmac/hmac.rb
type HMAC (line 14) | module HMAC
class Base (line 15) | class Base
method initialize (line 16) | def initialize(algorithm, block_size, output_length, key)
method check_status (line 27) | def check_status
method set_key (line 35) | def set_key(key)
method reset_key (line 51) | def reset_key
method update (line 59) | def update(text)
method digest (line 74) | def digest
method hexdigest (line 79) | def hexdigest
method digest (line 88) | def Base.digest(key, text)
method hexdigest (line 98) | def Base.hexdigest(key, text)
FILE: lib/hmac/sha1.rb
type HMAC (line 4) | module HMAC
class SHA1 (line 5) | class SHA1 < Base
method initialize (line 6) | def initialize(key = nil)
FILE: lib/hmac/sha2.rb
type HMAC (line 4) | module HMAC
class SHA256 (line 5) | class SHA256 < Base
method initialize (line 6) | def initialize(key = nil)
class SHA384 (line 12) | class SHA384 < Base
method initialize (line 13) | def initialize(key = nil)
class SHA512 (line 19) | class SHA512 < Base
method initialize (line 20) | def initialize(key = nil)
FILE: lib/openid.rb
type OpenID (line 15) | module OpenID
FILE: lib/openid/association.rb
type OpenID (line 6) | module OpenID
function get_secret_size (line 8) | def self.get_secret_size(assoc_type)
class Association (line 20) | class Association
method deserialize (line 27) | def self.deserialize(serialized)
method from_expires_in (line 49) | def self.from_expires_in(expires_in, handle, secret, assoc_type)
method initialize (line 54) | def initialize(handle, secret, issued, lifetime, assoc_type)
method serialize (line 64) | def serialize
method expires_in (line 81) | def expires_in(now=nil)
method sign (line 96) | def sign(pairs)
method make_pairs (line 111) | def make_pairs(message)
method check_message_signature (line 122) | def check_message_signature(message)
method get_message_signature (line 132) | def get_message_signature(message)
method == (line 136) | def ==(other)
method sign_message (line 151) | def sign_message(message)
class AssociationNegotiator (line 183) | class AssociationNegotiator
method get_session_types (line 186) | def self.get_session_types(assoc_type)
method check_session_type (line 197) | def self.check_session_type(assoc_type, session_type)
method initialize (line 204) | def initialize(allowed_types)
method copy (line 208) | def copy
method allowed_types= (line 212) | def allowed_types=(allowed_types)
method add_allowed_type (line 219) | def add_allowed_type(assoc_type, session_type=nil)
method allowed? (line 231) | def allowed?(assoc_type, session_type)
method get_allowed_type (line 235) | def get_allowed_type
FILE: lib/openid/consumer.rb
type OpenID (line 12) | module OpenID
class Consumer (line 180) | class Consumer
method initialize (line 192) | def initialize(session, store)
method begin (line 222) | def begin(openid_identifier, anonymous=false)
method begin_without_discovery (line 244) | def begin_without_discovery(service, anonymous)
method complete (line 283) | def complete(query, current_url)
method session_get (line 301) | def session_get(name)
method session_set (line 305) | def session_set(name, val)
method session_key (line 309) | def session_key(suffix)
method last_requested_endpoint (line 313) | def last_requested_endpoint
method last_requested_endpoint= (line 317) | def last_requested_endpoint=(endpoint)
method cleanup_last_requested_endpoint (line 321) | def cleanup_last_requested_endpoint
method discovery_manager (line 325) | def discovery_manager(openid_identifier)
method cleanup_session (line 329) | def cleanup_session
method discover (line 334) | def discover(identifier)
method negotiator (line 338) | def negotiator
method association_manager (line 342) | def association_manager(service)
method handle_idres (line 347) | def handle_idres(message, current_url)
method complete_invalid (line 351) | def complete_invalid(message, unused_return_to)
method complete_cancel (line 357) | def complete_cancel(unused_message, unused_return_to)
method complete_error (line 361) | def complete_error(message, unused_return_to)
method complete_setup_needed (line 370) | def complete_setup_needed(message, unused_return_to)
method complete_id_res (line 379) | def complete_id_res(message, current_url)
FILE: lib/openid/consumer/associationmanager.rb
type OpenID (line 8) | module OpenID
class Consumer (line 9) | class Consumer
class DiffieHellmanSession (line 12) | class DiffieHellmanSession
method initialize (line 18) | def initialize(dh=nil)
method get_request (line 27) | def get_request
method extract_secret (line 39) | def extract_secret(response)
class DiffieHellmanSHA1Session (line 52) | class DiffieHellmanSHA1Session < DiffieHellmanSession
class DiffieHellmanSHA256Session (line 61) | class DiffieHellmanSHA256Session < DiffieHellmanSession
class NoEncryptionSession (line 69) | class NoEncryptionSession
method get_request (line 76) | def get_request
method extract_secret (line 80) | def extract_secret(response)
class AssociationManager (line 88) | class AssociationManager
method create_session (line 89) | def self.create_session(session_type)
method initialize (line 103) | def initialize(store, server_url, compatibility_mode=false,
method get_association (line 111) | def get_association
method negotiate_association (line 127) | def negotiate_association
method extract_supported_association_type (line 154) | def extract_supported_association_type(server_error, assoc_type)
method request_association (line 191) | def request_association(assoc_type, session_type)
method create_associate_request (line 215) | def create_associate_request(assoc_type, session_type)
method get_openid1_session_type (line 246) | def get_openid1_session_type(assoc_response)
method extract_expires_in (line 272) | def self.extract_expires_in(message)
method extract_association (line 284) | def extract_association(assoc_response, assoc_session)
FILE: lib/openid/consumer/checkid_request.rb
type OpenID (line 4) | module OpenID
class Consumer (line 5) | class Consumer
class CheckIDRequest (line 15) | class CheckIDRequest
method initialize (line 22) | def initialize(assoc, endpoint)
method anonymous= (line 39) | def anonymous=(is_anonymous)
method add_extension (line 51) | def add_extension(extension_request)
method add_extension_arg (line 62) | def add_extension_arg(namespace, key, value)
method get_message (line 77) | def get_message(realm, return_to=nil, immediate=false)
method redirect_url (line 144) | def redirect_url(realm, return_to=nil, immediate=false)
method form_markup (line 155) | def form_markup(realm, return_to=nil, immediate=false,
method html_markup (line 164) | def html_markup(realm, return_to=nil, immediate=false,
method send_redirect? (line 176) | def send_redirect?(realm, return_to=nil, immediate=false)
FILE: lib/openid/consumer/discovery.rb
type OpenID (line 16) | module OpenID
class OpenIDServiceEndpoint (line 28) | class OpenIDServiceEndpoint
method initialize (line 48) | def initialize
method display_identifier (line 58) | def display_identifier
method display_identifier= (line 77) | def display_identifier=(display_identifier)
method uses_extension (line 81) | def uses_extension(extension_uri)
method preferred_namespace (line 85) | def preferred_namespace
method supports_type (line 94) | def supports_type(type_uri)
method compatibility_mode (line 104) | def compatibility_mode
method is_op_identifier (line 108) | def is_op_identifier
method parse_service (line 112) | def parse_service(yadis_url, uri, type_uris, service_element)
method get_local_id (line 129) | def get_local_id
method to_session_value (line 139) | def to_session_value
method == (line 143) | def ==(other)
method from_session_value (line 147) | def self.from_session_value(value)
method from_basic_service_endpoint (line 157) | def self.from_basic_service_endpoint(endpoint)
method from_html (line 181) | def self.from_html(uri, html)
method from_xrds (line 214) | def self.from_xrds(uri, xrds)
method from_discovery_result (line 223) | def self.from_discovery_result(discoveryResult)
method from_op_endpoint_url (line 241) | def self.from_op_endpoint_url(op_endpoint_url)
method to_s (line 253) | def to_s
function find_op_local_identifier (line 261) | def self.find_op_local_identifier(service_element, type_uris)
function normalize_xri (line 309) | def self.normalize_xri(xri)
function normalize_url (line 316) | def self.normalize_url(url)
function best_matching_service (line 330) | def self.best_matching_service(service, preferred_types)
function arrange_by_type (line 347) | def self.arrange_by_type(service_list, preferred_types)
function get_op_or_user_services (line 370) | def self.get_op_or_user_services(openid_services)
function discover_yadis (line 391) | def self.discover_yadis(uri)
function discover_xri (line 437) | def self.discover_xri(iname)
function discover_no_yadis (line 469) | def self.discover_no_yadis(uri)
function discover_uri (line 483) | def self.discover_uri(uri)
function discover (line 508) | def self.discover(identifier)
FILE: lib/openid/consumer/discovery_manager.rb
type OpenID (line 1) | module OpenID
class Consumer (line 2) | class Consumer
class DiscoveredServices (line 6) | class DiscoveredServices
method initialize (line 9) | def initialize(starting_url, yadis_url, services)
method next (line 16) | def next
method for_url? (line 20) | def for_url?(url)
method started? (line 24) | def started?
method empty? (line 28) | def empty?
method to_session_value (line 32) | def to_session_value
method == (line 44) | def ==(other)
method from_session_value (line 48) | def self.from_session_value(value)
class DiscoveryManager (line 62) | class DiscoveryManager
method initialize (line 63) | def initialize(session, url, session_key_suffix=nil)
method get_next_service (line 70) | def get_next_service
method cleanup (line 92) | def cleanup(force=false)
method get_manager (line 105) | def get_manager(force=false)
method create_manager (line 114) | def create_manager(yadis_url, services)
method destroy_manager (line 127) | def destroy_manager(force=false)
method session_key (line 133) | def session_key
method store (line 137) | def store(manager)
method load (line 141) | def load
method destroy! (line 145) | def destroy!
FILE: lib/openid/consumer/html_parse.rb
type OpenID (line 3) | module OpenID
function openid_unescape (line 23) | def OpenID.openid_unescape(s)
function unescape_hash (line 27) | def OpenID.unescape_hash(h)
function parse_link_attrs (line 36) | def OpenID.parse_link_attrs(html)
function rel_matches (line 91) | def OpenID.rel_matches(rel_attr, target_rel)
function link_has_rel (line 105) | def OpenID.link_has_rel(link_attrs, target_rel)
function find_links_rel (line 113) | def OpenID.find_links_rel(link_attrs_list, target_rel)
function find_first_href (line 130) | def OpenID.find_first_href(link_attrs_list, target_rel)
FILE: lib/openid/consumer/idres.rb
type OpenID (line 7) | module OpenID
class TypeURIMismatch (line 8) | class TypeURIMismatch < ProtocolError
method initialize (line 11) | def initialize(type_uri, endpoint)
class Consumer (line 17) | class Consumer
method openid1_return_to_nonce_name= (line 24) | def self.openid1_return_to_nonce_name=(query_arg_name)
method openid1_return_to_nonce_name (line 29) | def self.openid1_return_to_nonce_name
method openid1_return_to_claimed_id_name= (line 37) | def self.openid1_return_to_claimed_id_name=(query_arg_name)
method openid1_return_to_claimed_id_name (line 42) | def self.openid1_return_to_claimed_id_name
class IdResHandler (line 48) | class IdResHandler
method initialize (line 51) | def initialize(message, current_url, store=nil, endpoint=nil)
method signed_fields (line 62) | def signed_fields
method id_res (line 72) | def id_res
method server_url (line 80) | def server_url
method openid_namespace (line 84) | def openid_namespace
method fetch (line 88) | def fetch(field, default=NO_DEFAULT)
method signed_list (line 92) | def signed_list
method check_for_fields (line 104) | def check_for_fields
method verify_return_to (line 140) | def verify_return_to
method verify_return_to_args (line 153) | def verify_return_to_args(msg_return_to)
method verify_return_to_base (line 190) | def verify_return_to_base(msg_return_to)
method check_signature (line 205) | def check_signature
method check_auth (line 228) | def check_auth
method create_check_auth_request (line 242) | def create_check_auth_request
method process_check_auth_response (line 258) | def process_check_auth_response(response)
method check_nonce (line 277) | def check_nonce
method verify_discovery_results (line 309) | def verify_discovery_results
method verify_discovery_results_openid2 (line 324) | def verify_discovery_results_openid2
method verify_discovery_results_openid1 (line 367) | def verify_discovery_results_openid1
method discover_and_verify (line 418) | def discover_and_verify(claimed_id, to_match_endpoints)
method verify_discovered_services (line 431) | def verify_discovered_services(claimed_id, services, to_match_endp...
method verify_discovery_single (line 460) | def verify_discovery_single(endpoint, to_match)
FILE: lib/openid/consumer/responses.rb
type OpenID (line 1) | module OpenID
class Consumer (line 2) | class Consumer
type Response (line 22) | module Response
function status (line 25) | def status
function identity_url (line 31) | def identity_url
function display_identifier (line 48) | def display_identifier
class SuccessResponse (line 55) | class SuccessResponse
method initialize (line 62) | def initialize(endpoint, message, signed_fields)
method is_openid1 (line 73) | def is_openid1
method signed? (line 79) | def signed?(ns_uri, ns_key)
method get_signed (line 85) | def get_signed(ns_uri, ns_key, default=nil)
method get_signed_ns (line 96) | def get_signed_ns(ns_uri)
method extension_response (line 109) | def extension_response(namespace_uri, require_signed)
class FailureResponse (line 118) | class FailureResponse
method initialize (line 123) | def initialize(endpoint, message, contact=nil, reference=nil)
class CancelResponse (line 131) | class CancelResponse
method initialize (line 134) | def initialize(endpoint)
class SetupNeededResponse (line 139) | class SetupNeededResponse
method initialize (line 144) | def initialize(endpoint, setup_url)
FILE: lib/openid/consumer/session.rb
type OpenID (line 1) | module OpenID
class Consumer (line 2) | class Consumer
class Session (line 3) | class Session
method initialize (line 4) | def initialize(session, decode_klass = nil)
method [] (line 9) | def [](key)
method []= (line 14) | def []=(key, val)
method keys (line 18) | def keys
method to_session_value (line 24) | def to_session_value(val)
FILE: lib/openid/cryptutil.rb
type OpenID (line 18) | module OpenID
type CryptUtil (line 21) | module CryptUtil
function rand (line 30) | def CryptUtil.rand(max)
function sha1 (line 35) | def CryptUtil.sha1(text)
function hmac_sha1 (line 39) | def CryptUtil.hmac_sha1(key, text)
function sha256 (line 47) | def CryptUtil.sha256(text)
function hmac_sha256 (line 51) | def CryptUtil.hmac_sha256(key, text)
function random_string (line 62) | def CryptUtil.random_string(length, chars=nil)
function num_to_binary (line 75) | def CryptUtil.num_to_binary(n)
function binary_to_num (line 83) | def CryptUtil.binary_to_num(s)
function num_to_base64 (line 95) | def CryptUtil.num_to_base64(l)
function base64_to_num (line 100) | def CryptUtil.base64_to_num(s)
function const_eq (line 104) | def CryptUtil.const_eq(s1, s2)
FILE: lib/openid/dh.rb
type OpenID (line 4) | module OpenID
class DiffieHellman (line 12) | class DiffieHellman
method from_defaults (line 22) | def DiffieHellman.from_defaults
method initialize (line 26) | def initialize(modulus=nil, generator=nil, priv=nil)
method get_shared_secret (line 32) | def get_shared_secret(composite)
method xor_secret (line 36) | def xor_secret(algorithm, composite, secret)
method using_default_values? (line 43) | def using_default_values?
method set_private (line 48) | def set_private(priv)
method strxor (line 53) | def DiffieHellman.strxor(s, t)
method powermod (line 71) | def DiffieHellman.powermod(x, n, q)
FILE: lib/openid/extension.rb
type OpenID (line 3) | module OpenID
class Extension (line 5) | class Extension < Object
method initialize (line 7) | def initialize
method get_extension_args (line 14) | def get_extension_args
method to_message (line 21) | def to_message(message = nil)
FILE: lib/openid/extensions/ax.rb
type OpenID (line 7) | module OpenID
type AX (line 8) | module AX
function check_alias (line 14) | def self.check_alias(name)
class Error (line 22) | class Error < ArgumentError
class AXMessage (line 26) | class AXMessage < Extension
method initialize (line 37) | def initialize
method check_mode (line 47) | def check_mode(ax_args)
method new_args (line 54) | def new_args
class AttrInfo (line 85) | class AttrInfo < Object
method initialize (line 88) | def initialize(type_uri, ns_alias=nil, required=false, count=1)
method wants_unlimited_values? (line 95) | def wants_unlimited_values?
function to_type_uris (line 104) | def self.to_type_uris(namespace_map, alias_list_s)
class FetchRequest (line 117) | class FetchRequest < AXMessage
method initialize (line 123) | def initialize(update_url = nil)
method add (line 134) | def add(attribute)
method get_extension_args (line 143) | def get_extension_args
method get_required_attrs (line 176) | def get_required_attrs
method from_openid_request (line 189) | def self.from_openid_request(oidreq)
method parse_extension_args (line 211) | def parse_extension_args(ax_args)
method attributes (line 255) | def attributes
method requested_types (line 260) | def requested_types
method member? (line 264) | def member?(type_uri)
class KeyValueMessage (line 273) | class KeyValueMessage < AXMessage
method initialize (line 275) | def initialize
method add_value (line 285) | def add_value(type_uri, value)
method set_values (line 291) | def set_values(type_uri, values)
method _get_extension_kv_args (line 297) | def _get_extension_kv_args(aliases = nil)
method parse_extension_args (line 326) | def parse_extension_args(ax_args)
method get_single (line 369) | def get_single(type_uri, default = nil)
method get (line 380) | def get(type_uri)
method [] (line 385) | def [](type_uri)
method count (line 390) | def count(type_uri)
class FetchResponse (line 397) | class FetchResponse < KeyValueMessage
method initialize (line 405) | def initialize(update_url = nil)
method get_extension_args (line 417) | def get_extension_args(request = nil)
method parse_extension_args (line 467) | def parse_extension_args(ax_args)
method from_success_response (line 474) | def self.from_success_response(success_response, signed=true)
class StoreRequest (line 492) | class StoreRequest < KeyValueMessage
method initialize (line 496) | def initialize
method from_openid_request (line 504) | def self.from_openid_request(oidreq)
method get_extension_args (line 513) | def get_extension_args(aliases=nil)
class StoreResponse (line 523) | class StoreResponse < AXMessage
method initialize (line 528) | def initialize(succeeded = true, error_message = nil)
method from_success_response (line 541) | def self.from_success_response(success_response)
method succeeded? (line 546) | def succeeded?
method get_extension_args (line 550) | def get_extension_args
FILE: lib/openid/extensions/oauth.rb
type OpenID (line 7) | module OpenID
type OAuth (line 9) | module OAuth
class Request (line 13) | class Request < Extension
method initialize (line 15) | def initialize(consumer=nil, scope=nil)
method get_extension_args (line 23) | def get_extension_args
method from_openid_request (line 33) | def self.from_openid_request(oid_req)
method parse_extension_args (line 45) | def parse_extension_args(args)
class Response (line 54) | class Response < Extension
method initialize (line 56) | def initialize(request_token=nil, scope=nil)
method from_success_response (line 64) | def self.from_success_response(success_response)
method parse_extension_args (line 76) | def parse_extension_args(args, strict=false)
method get_extension_args (line 81) | def get_extension_args
FILE: lib/openid/extensions/pape.rb
type OpenID (line 7) | module OpenID
type PAPE (line 9) | module PAPE
class Request (line 20) | class Request < Extension
method initialize (line 22) | def initialize(preferred_auth_policies=[], max_auth_age=nil)
method add_policy_uri (line 32) | def add_policy_uri(policy_uri)
method get_extension_args (line 38) | def get_extension_args
method from_openid_request (line 49) | def self.from_openid_request(oid_req)
method parse_extension_args (line 61) | def parse_extension_args(args)
method preferred_types (line 81) | def preferred_types(supported_types)
class Response (line 88) | class Response < Extension
method initialize (line 90) | def initialize(auth_policies=[], auth_time=nil, nist_auth_level=nil)
method add_policy_uri (line 100) | def add_policy_uri(policy_uri)
method from_success_response (line 105) | def self.from_success_response(success_response)
method parse_extension_args (line 117) | def parse_extension_args(args, strict=false)
method get_extension_args (line 153) | def get_extension_args
FILE: lib/openid/extensions/sreg.rb
type OpenID (line 5) | module OpenID
type SReg (line 6) | module SReg
function check_sreg_field_name (line 30) | def OpenID.check_sreg_field_name(fieldname)
function supports_sreg? (line 37) | def OpenID.supports_sreg?(endpoint)
function get_sreg_ns (line 45) | def OpenID.get_sreg_ns(message)
class NamespaceError (line 72) | class NamespaceError < ArgumentError
class Request (line 76) | class Request < Extension
method initialize (line 79) | def initialize(required = nil, optional = nil, policy_url = nil, n...
method from_openid_request (line 101) | def self.from_openid_request(request)
method parse_extension_args (line 126) | def parse_extension_args(args, strict = false)
method all_requested_fields (line 153) | def all_requested_fields
method were_fields_requested? (line 158) | def were_fields_requested?
method request_field (line 171) | def request_field(field_name, required=false, strict=false)
method request_fields (line 196) | def request_fields(field_names, required = false, strict = false)
method get_extension_args (line 206) | def get_extension_args
method member? (line 214) | def member?(field_name)
class Response (line 224) | class Response < Extension
method initialize (line 227) | def initialize(data = {}, ns_uri=NS_URI)
method extract_response (line 235) | def self.extract_response(request, data)
method from_success_response (line 245) | def self.from_success_response(success_response, signed_only = true)
method get_extension_args (line 259) | def get_extension_args
method [] (line 265) | def [](field_name)
method empty? (line 270) | def empty?
FILE: lib/openid/extensions/ui.rb
type OpenID (line 6) | module OpenID
type UI (line 8) | module UI
class Request (line 11) | class Request < Extension
method initialize (line 13) | def initialize(mode = nil, icon = nil, lang = nil)
method get_extension_args (line 21) | def get_extension_args
method from_openid_request (line 32) | def self.from_openid_request(oid_req)
method parse_extension_args (line 43) | def parse_extension_args(args)
FILE: lib/openid/fetchers.rb
type Net (line 15) | module Net
class HTTP (line 16) | class HTTP
method post_connection_check (line 17) | def post_connection_check(hostname)
type OpenID (line 46) | module OpenID
class HTTPResponse (line 49) | class HTTPResponse
method _from_net_response (line 54) | def self._from_net_response(response, final_url, headers=nil)
method method_missing (line 61) | def method_missing(method, *args)
method body= (line 65) | def body=(s)
class FetchingError (line 76) | class FetchingError < OpenIDError
class HTTPRedirectLimitReached (line 79) | class HTTPRedirectLimitReached < FetchingError
class SSLFetchingError (line 82) | class SSLFetchingError < FetchingError
function fetch (line 87) | def self.fetch(url, body=nil, headers=nil,
function fetcher (line 92) | def self.fetcher
function fetcher= (line 100) | def self.fetcher=(fetcher)
function fetcher_use_env_http_proxy (line 106) | def self.fetcher_use_env_http_proxy
class StandardFetcher (line 115) | class StandardFetcher
method initialize (line 126) | def initialize(proxy_addr=nil, proxy_port=nil,
method supports_ssl? (line 133) | def supports_ssl?(conn)
method make_http (line 137) | def make_http(uri)
method set_verified (line 144) | def set_verified(conn, verify)
method make_connection (line 152) | def make_connection(uri)
method fetch (line 181) | def fetch(url, body=nil, headers=nil, redirect_limit=REDIRECT_LIMIT)
method setup_encoding (line 252) | def setup_encoding(response)
FILE: lib/openid/kvform.rb
type OpenID (line 2) | module OpenID
class KVFormError (line 4) | class KVFormError < Exception
type Util (line 7) | module Util
function seq_to_kv (line 9) | def Util.seq_to_kv(seq, strict=false)
function kv_to_seq (line 63) | def Util.kv_to_seq(data, strict=false)
function dict_to_kv (line 127) | def Util.dict_to_kv(d)
function kv_to_dict (line 131) | def Util.kv_to_dict(s)
FILE: lib/openid/kvpost.rb
type OpenID (line 4) | module OpenID
class ServerError (line 7) | class ServerError < OpenIDError
method initialize (line 10) | def initialize(error_text, error_code, message)
method from_message (line 17) | def self.from_message(msg)
class KVPostNetworkError (line 25) | class KVPostNetworkError < OpenIDError
class HTTPStatusError (line 27) | class HTTPStatusError < OpenIDError
class Message (line 30) | class Message
method from_http_response (line 31) | def self.from_http_response(response, server_url)
function make_kv_post (line 50) | def self.make_kv_post(request_message, server_url)
FILE: lib/openid/message.rb
type OpenID (line 4) | module OpenID
class UndefinedOpenIDNamespace (line 54) | class UndefinedOpenIDNamespace < Exception; end
class NamespaceAliasRegistrationError (line 57) | class NamespaceAliasRegistrationError < Exception; end
class InvalidOpenIDNamespace (line 61) | class InvalidOpenIDNamespace < Exception; end
class Message (line 63) | class Message
class KeyNotFound (line 67) | class KeyNotFound < IndexError ; end
method register_namespace_alias (line 78) | def Message.register_namespace_alias(namespace_uri, alias_)
method initialize (line 100) | def initialize(openid_namespace=nil)
method from_post_args (line 114) | def Message.from_post_args(args)
method from_openid_args (line 139) | def Message.from_openid_args(openid_args)
method _from_openid_args (line 147) | def _from_openid_args(openid_args)
method _get_default_namespace (line 188) | def _get_default_namespace(mystery_alias)
method set_openid_namespace (line 196) | def set_openid_namespace(openid_ns_uri, implicit)
method get_openid_namespace (line 204) | def get_openid_namespace
method is_openid1 (line 208) | def is_openid1
method is_openid2 (line 212) | def is_openid2
method from_kvform (line 217) | def Message.from_kvform(kvform_string)
method copy (line 221) | def copy
method to_post_args (line 226) | def to_post_args
method to_args (line 253) | def to_args
method to_form_markup (line 268) | def to_form_markup(action_url, form_tag_attrs=nil, submit_text='Cont...
method to_url (line 300) | def to_url(base_url)
method to_kvform (line 307) | def to_kvform
method to_url_encoded (line 312) | def to_url_encoded
method _fix_ns (line 318) | def _fix_ns(namespace)
method has_key? (line 351) | def has_key?(namespace, ns_key)
method get_key (line 357) | def get_key(namespace, ns_key)
method get_arg (line 376) | def get_arg(namespace, key, default=nil)
method get_args (line 388) | def get_args(namespace)
method update_args (line 399) | def update_args(namespace, updates)
method set_arg (line 405) | def set_arg(namespace, key, value)
method del_arg (line 414) | def del_arg(namespace, key)
method == (line 420) | def ==(other)
method get_aliased_arg (line 424) | def get_aliased_arg(aliased_key, default=nil)
class NamespaceMap (line 458) | class NamespaceMap
method initialize (line 460) | def initialize
method get_alias (line 466) | def get_alias(namespace_uri)
method get_namespace_uri (line 470) | def get_namespace_uri(namespace_alias)
method add_alias (line 475) | def add_alias(namespace_uri, desired_alias, implicit=false)
method add (line 510) | def add(namespace_uri)
method member? (line 531) | def member?(namespace_uri)
method each (line 535) | def each
method namespace_uris (line 539) | def namespace_uris
method implicit? (line 544) | def implicit?(namespace_uri)
method aliases (line 548) | def aliases
FILE: lib/openid/protocolerror.rb
type OpenID (line 3) | module OpenID
class ProtocolError (line 6) | class ProtocolError < OpenIDError
FILE: lib/openid/server.rb
type OpenID (line 12) | module OpenID
type Server (line 14) | module Server
class OpenIDRequest (line 28) | class OpenIDRequest
method initialize (line 35) | def initialize
method namespace (line 40) | def namespace
class CheckAuthRequest (line 53) | class CheckAuthRequest < OpenIDRequest
method initialize (line 76) | def initialize(assoc_handle, signed, invalidate_handle=nil)
method from_message (line 89) | def self.from_message(message, op_endpoint=UNUSED)
method answer (line 121) | def answer(signatory)
method to_s (line 141) | def to_s
class BaseServerSession (line 157) | class BaseServerSession
method initialize (line 160) | def initialize(session_type, allowed_assoc_types)
method allowed_assoc_type? (line 165) | def allowed_assoc_type?(typ)
class PlainTextServerSession (line 175) | class PlainTextServerSession < BaseServerSession
method initialize (line 181) | def initialize
method from_message (line 185) | def self.from_message(unused_request)
method answer (line 189) | def answer(secret)
class DiffieHellmanSHA1ServerSession (line 199) | class DiffieHellmanSHA1ServerSession < BaseServerSession
method initialize (line 210) | def initialize(dh, consumer_pubkey)
method from_message (line 222) | def self.from_message(message)
method answer (line 260) | def answer(secret)
class DiffieHellmanSHA256ServerSession (line 271) | class DiffieHellmanSHA256ServerSession < DiffieHellmanSHA1ServerSession
method initialize (line 272) | def initialize(*args)
class AssociateRequest (line 284) | class AssociateRequest < OpenIDRequest
method initialize (line 303) | def initialize(session, assoc_type)
method from_message (line 312) | def self.from_message(message, op_endpoint=UNUSED)
method answer (line 363) | def answer(assoc)
method answer_unsupported (line 383) | def answer_unsupported(message, preferred_association_type=nil,
class CheckIDRequest (line 411) | class CheckIDRequest < OpenIDRequest
method initialize (line 447) | def initialize(identity, return_to, op_endpoint, trust_root=nil,
method from_message (line 490) | def self.from_message(message, op_endpoint)
method id_select (line 573) | def id_select
method trust_root_valid (line 579) | def trust_root_valid
method return_to_verified (line 612) | def return_to_verified
method answer (line 657) | def answer(allow, server_url=nil, identity=nil, claimed_id=nil)
method encode_to_url (line 769) | def encode_to_url(server_url)
method cancel_url (line 804) | def cancel_url
method to_s (line 829) | def to_s
class OpenIDResponse (line 850) | class OpenIDResponse
method initialize (line 860) | def initialize(request)
method to_s (line 866) | def to_s
method to_form_markup (line 878) | def to_form_markup(form_tag_attrs=nil)
method to_html (line 884) | def to_html(form_tag_attrs=nil)
method render_as_form (line 888) | def render_as_form
method needs_signing (line 894) | def needs_signing
method which_encoding (line 901) | def which_encoding
method encode_to_url (line 916) | def encode_to_url
method add_extension (line 922) | def add_extension(extension_response)
method encode_to_kvform (line 931) | def encode_to_kvform
method copy (line 943) | def copy
class WebResponse (line 953) | class WebResponse
method initialize (line 964) | def initialize(code=HTTP_OK, headers=nil, body="")
class Signatory (line 986) | class Signatory
method _normal_key (line 997) | def self._normal_key
method _dumb_key (line 1001) | def self._dumb_key
method initialize (line 1009) | def initialize(store)
method verify (line 1016) | def verify(assoc_handle, message)
method sign (line 1040) | def sign(response)
method create_association (line 1076) | def create_association(dumb=true, assoc_type='HMAC-SHA1')
method get_association (line 1095) | def get_association(assoc_handle, dumb, checkExpiration=true)
method invalidate (line 1128) | def invalidate(assoc_handle, dumb)
class Encoder (line 1146) | class Encoder
method encode (line 1153) | def encode(response)
class SigningEncoder (line 1180) | class SigningEncoder < Encoder
method initialize (line 1185) | def initialize(signatory)
method encode (line 1196) | def encode(response)
class Decoder (line 1218) | class Decoder
method initialize (line 1231) | def initialize(server)
method decode (line 1242) | def decode(query)
method default_decoder (line 1270) | def default_decoder(message, server)
class Server (line 1289) | class Server
method initialize (line 1314) | def initialize(store, op_endpoint)
method handle_request (line 1329) | def handle_request(request)
method openid_check_authentication (line 1342) | def openid_check_authentication(request)
method openid_associate (line 1347) | def openid_associate(request)
method decode_request (line 1370) | def decode_request(query)
method encode_response (line 1381) | def encode_response(response)
class ProtocolError (line 1387) | class ProtocolError < Exception
method initialize (line 1394) | def initialize(message, text=nil, reference=nil, contact=nil)
method get_return_to (line 1403) | def get_return_to
method has_return_to (line 1412) | def has_return_to
method to_message (line 1418) | def to_message
method encode_to_url (line 1437) | def encode_to_url
method encode_to_kvform (line 1441) | def encode_to_kvform
method to_form_markup (line 1445) | def to_form_markup
method to_html (line 1449) | def to_html
method which_encoding (line 1458) | def which_encoding
class VersionError (line 1488) | class VersionError < Exception
class NoReturnToError (line 1493) | class NoReturnToError < Exception
class EncodingError (line 1499) | class EncodingError < Exception
method initialize (line 1503) | def initialize(response)
class AlreadySigned (line 1510) | class AlreadySigned < EncodingError
class UntrustedReturnURL (line 1514) | class UntrustedReturnURL < ProtocolError
method initialize (line 1517) | def initialize(message, return_to, trust_root)
method to_s (line 1523) | def to_s
class MalformedReturnURL (line 1531) | class MalformedReturnURL < ProtocolError
method initialize (line 1534) | def initialize(openid_message, return_to)
class MalformedTrustRoot (line 1541) | class MalformedTrustRoot < ProtocolError
FILE: lib/openid/store/filesystem.rb
type OpenID (line 9) | module OpenID
type Store (line 10) | module Store
class Filesystem (line 11) | class Filesystem < Interface
method initialize (line 15) | def initialize(directory)
method get_association_filename (line 28) | def get_association_filename(server_url, handle)
method store_association (line 46) | def store_association(server_url, association)
method get_association (line 79) | def get_association(server_url, handle=nil)
method _get_association (line 99) | def _get_association(filename)
method remove_association (line 129) | def remove_association(server_url, handle)
method use_nonce (line 141) | def use_nonce(server_url, timestamp, salt)
method cleanup (line 170) | def cleanup
method cleanup_associations (line 175) | def cleanup_associations
method cleanup_nonces (line 205) | def cleanup_nonces
method mktemp (line 225) | def mktemp
method filename_escape (line 231) | def filename_escape(s)
method safe64 (line 240) | def safe64(s)
method remove_if_present (line 250) | def remove_if_present(filename)
method ensure_dir (line 260) | def ensure_dir(dir_name)
FILE: lib/openid/store/interface.rb
type OpenID (line 3) | module OpenID
type Store (line 9) | module Store
class Interface (line 15) | class Interface < Object
method store_association (line 21) | def store_association(server_url, association)
method get_association (line 29) | def get_association(server_url, handle=nil)
method remove_association (line 35) | def remove_association(server_url, handle)
method use_nonce (line 48) | def use_nonce(server_url, timestamp, salt)
method cleanup_nonces (line 56) | def cleanup_nonces
method cleanup_associations (line 63) | def cleanup_associations
method cleanup (line 70) | def cleanup
FILE: lib/openid/store/memcache.rb
type OpenID (line 6) | module OpenID
type Store (line 7) | module Store
class Memcache (line 8) | class Memcache < Interface
method initialize (line 11) | def initialize(cache_client, key_prefix='openid-store:')
method store_association (line 20) | def store_association(server_url, association)
method get_association (line 32) | def get_association(server_url, handle=nil)
method remove_association (line 43) | def remove_association(server_url, handle)
method use_nonce (line 61) | def use_nonce(server_url, timestamp, salt)
method assoc_key (line 73) | def assoc_key(server_url, assoc_handle=nil)
method cleanup_nonces (line 81) | def cleanup_nonces
method cleanup (line 84) | def cleanup
method cleanup_associations (line 87) | def cleanup_associations
method delete (line 92) | def delete(key)
method serialize (line 101) | def serialize(assoc)
method deserialize (line 105) | def deserialize(assoc_str)
method expiry (line 110) | def expiry(t)
FILE: lib/openid/store/memory.rb
type OpenID (line 2) | module OpenID
type Store (line 3) | module Store
class Memory (line 9) | class Memory < Interface
method initialize (line 11) | def initialize
method store_association (line 16) | def store_association(server_url, assoc)
method get_association (line 21) | def get_association(server_url, handle=nil)
method remove_association (line 33) | def remove_association(server_url, handle)
method use_nonce (line 42) | def use_nonce(server_url, timestamp, salt)
method cleanup_associations (line 50) | def cleanup_associations
method cleanup_nonces (line 63) | def cleanup_nonces
method deepcopy (line 77) | def deepcopy(o)
FILE: lib/openid/store/nonce.rb
type OpenID (line 5) | module OpenID
type Nonce (line 6) | module Nonce
function skew (line 17) | def Nonce.skew
function skew= (line 21) | def Nonce.skew=(new_skew)
function split_nonce (line 26) | def Nonce.split_nonce(nonce_str)
function check_timestamp (line 37) | def Nonce.check_timestamp(nonce_str, allowed_skew=nil, now=nil)
function mk_nonce (line 56) | def Nonce.mk_nonce(time = nil)
FILE: lib/openid/trustroot.rb
type OpenID (line 4) | module OpenID
class RealmVerificationRedirected (line 6) | class RealmVerificationRedirected < Exception
method initialize (line 8) | def initialize(relying_party_url, rp_url_after_redirects)
method to_s (line 13) | def to_s
type TrustRoot (line 19) | module TrustRoot
function _extract_return_url (line 59) | def TrustRoot._extract_return_url(endpoint)
function return_to_matches (line 69) | def TrustRoot.return_to_matches(allowed_return_to_urls, return_to)
function get_allowed_return_urls (line 96) | def TrustRoot.get_allowed_return_urls(relying_party_url)
function verify_return_to (line 118) | def TrustRoot.verify_return_to(realm_str, return_to, _vrfy=nil)
class TrustRoot (line 150) | class TrustRoot
method _build_path (line 156) | def TrustRoot._build_path(path, query=nil, frag=nil)
method _parse_url (line 173) | def TrustRoot._parse_url(url)
method parse (line 194) | def TrustRoot.parse(trust_root)
method check_sanity (line 224) | def TrustRoot.check_sanity(trust_root_string)
method check_url (line 235) | def self.check_url(trust_root, url)
method build_discovery_url (line 250) | def build_discovery_url
method initialize (line 261) | def initialize(unparsed, proto, wildcard, host, port, path)
method sane? (line 270) | def sane?
method validate_url (line 303) | def validate_url(url)
FILE: lib/openid/urinorm.rb
type OpenID (line 3) | module OpenID
type URINorm (line 5) | module URINorm
function urinorm (line 7) | def URINorm.urinorm(uri)
function reserved (line 35) | def URINorm.reserved(chr)
function remove_dot_segments (line 39) | def URINorm.remove_dot_segments(path)
FILE: lib/openid/util.rb
type OpenID (line 6) | module OpenID
class AssertionError (line 7) | class AssertionError < Exception
class OpenIDError (line 13) | class OpenIDError < StandardError
type Util (line 16) | module Util
function assert (line 27) | def Util.assert(value, message=nil)
function to_base64 (line 33) | def Util.to_base64(s)
function from_base64 (line 37) | def Util.from_base64(s)
function urlencode (line 45) | def Util.urlencode(args)
function parse_query (line 61) | def Util.parse_query(qs)
function append_args (line 67) | def Util.append_args(url, args)
function logger= (line 82) | def Util.logger=(logger)
function logger (line 86) | def Util.logger
function log (line 91) | def Util.log(message)
function auto_submit_html (line 95) | def Util.auto_submit_html(form, title='OpenID transaction in progress')
function html_encode (line 116) | def Util.html_encode(str)
FILE: lib/openid/version.rb
type OpenID (line 1) | module OpenID
FILE: lib/openid/yadis/accept.rb
type OpenID (line 1) | module OpenID
type Yadis (line 3) | module Yadis
function generate_accept_header (line 8) | def self.generate_accept_header(*elements)
function parse_accept_header (line 39) | def self.parse_accept_header(value)
function match_types (line 80) | def self.match_types(accept_types, have_types)
function get_acceptable (line 132) | def self.get_acceptable(accept_header, have_types)
FILE: lib/openid/yadis/constants.rb
type OpenID (line 4) | module OpenID
type Yadis (line 6) | module Yadis
FILE: lib/openid/yadis/discovery.rb
type OpenID (line 7) | module OpenID
class DiscoveryFailure (line 10) | class DiscoveryFailure < OpenIDError
method initialize (line 13) | def initialize(message, http_response)
type Yadis (line 20) | module Yadis
class DiscoveryResult (line 23) | class DiscoveryResult
method initialize (line 40) | def initialize(request_uri)
method used_yadis_location? (line 52) | def used_yadis_location?
method is_xrds (line 57) | def is_xrds
function discover (line 74) | def self.discover(uri)
function where_is_yadis? (line 124) | def self.where_is_yadis?(resp)
FILE: lib/openid/yadis/filters.rb
type OpenID (line 6) | module OpenID
type Yadis (line 7) | module Yadis
class BasicServiceEndpoint (line 8) | class BasicServiceEndpoint
method initialize (line 22) | def initialize(yadis_url, type_uris, uri, service_element)
method match_types (line 33) | def match_types(type_uris)
method from_basic_service_endpoint (line 42) | def self.from_basic_service_endpoint(endpoint)
method from_basic_service_endpoint (line 48) | def from_basic_service_endpoint(endpoint)
class TransformFilterMaker (line 66) | class TransformFilterMaker
method initialize (line 75) | def initialize(filter_procs)
method get_service_endpoints (line 81) | def get_service_endpoints(yadis_url, service_element)
method apply_filters (line 100) | def apply_filters(endpoint)
class CompoundFilter (line 116) | class CompoundFilter
method initialize (line 121) | def initialize(subfilters)
method get_service_endpoints (line 127) | def get_service_endpoints(yadis_url, service_element)
function make_filter (line 145) | def self.make_filter(parts)
function mk_compound_filter (line 163) | def self.mk_compound_filter(parts)
FILE: lib/openid/yadis/htmltokenizer.rb
class HTMLTokenizer (line 46) | class HTMLTokenizer
method version (line 50) | def self.version
method initialize (line 57) | def initialize(content)
method reset (line 63) | def reset
method peekNextToken (line 68) | def peekNextToken
method getNextToken (line 103) | def getNextToken
method getTag (line 119) | def getTag(*sought_tags)
method getText (line 133) | def getText(until_tag = nil)
method getTrimmedText (line 163) | def getTrimmedText(until_tag = nil)
class HTMLTokenizerError (line 169) | class HTMLTokenizerError < Exception
class HTMLToken (line 173) | class HTMLToken
method initialize (line 177) | def initialize(text)
method to_s (line 182) | def to_s
method text (line 187) | def text
method trimmed_text (line 191) | def trimmed_text
method == (line 196) | def ==(other)
class HTMLText (line 202) | class HTMLText < HTMLToken
method text (line 203) | def text
class HTMLComment (line 209) | class HTMLComment < HTMLToken
method initialize (line 211) | def initialize(text)
class HTMLTag (line 223) | class HTMLTag < HTMLToken
method initialize (line 225) | def initialize(text)
method attr_hash (line 254) | def attr_hash
method text (line 289) | def text
FILE: lib/openid/yadis/parsehtml.rb
type OpenID (line 4) | module OpenID
type Yadis (line 5) | module Yadis
function html_yadis_location (line 6) | def Yadis.html_yadis_location(html)
FILE: lib/openid/yadis/services.rb
type OpenID (line 6) | module OpenID
type Yadis (line 7) | module Yadis
function get_service_endpoints (line 8) | def Yadis.get_service_endpoints(input_url, flt=nil)
function apply_filter (line 27) | def Yadis.apply_filter(normalized_uri, xrd_data, flt=nil)
FILE: lib/openid/yadis/xrds.rb
type OpenID (line 7) | module OpenID
type Yadis (line 8) | module Yadis
class XRDSError (line 18) | class XRDSError < StandardError; end
class XRDSFraud (line 22) | class XRDSFraud < XRDSError
function get_canonical_id (line 25) | def Yadis::get_canonical_id(iname, xrd_tree)
class XRDSError (line 87) | class XRDSError < StandardError
function parseXRDS (line 90) | def Yadis::parseXRDS(text)
function disable_entity_expansion (line 110) | def Yadis::disable_entity_expansion
function is_xrds? (line 118) | def Yadis::is_xrds?(xrds_tree)
function get_yadis_xrd (line 125) | def Yadis::get_yadis_xrd(xrds_tree)
function each_service (line 135) | def Yadis::each_service(xrds_tree, &block)
function services (line 140) | def Yadis::services(xrds_tree)
function expand_service (line 148) | def Yadis::expand_service(service_element)
function prio_sort (line 159) | def Yadis::prio_sort(elements)
FILE: lib/openid/yadis/xri.rb
type OpenID (line 3) | module OpenID
type Yadis (line 4) | module Yadis
type XRI (line 5) | module XRI
function identifier_scheme (line 11) | def self.identifier_scheme(identifier)
function to_iri_normal (line 25) | def self.to_iri_normal(xri)
function escape_for_iri (line 33) | def self.escape_for_iri(xri)
function to_uri_normal (line 48) | def self.to_uri_normal(xri)
function iri_to_uri (line 53) | def self.iri_to_uri(iri)
function provider_is_authoritative (line 60) | def self.provider_is_authoritative(provider_id, canonical_id)
function root_authority (line 67) | def self.root_authority(xri)
function make_xri (line 81) | def self.make_xri(xri)
FILE: lib/openid/yadis/xrires.rb
type OpenID (line 6) | module OpenID
type Yadis (line 8) | module Yadis
type XRI (line 10) | module XRI
class XRIHTTPError (line 12) | class XRIHTTPError < StandardError; end
class ProxyResolver (line 14) | class ProxyResolver
method initialize (line 18) | def initialize(proxy_url=nil)
method query_url (line 28) | def query_url(xri, service_type=nil)
method query (line 45) | def query(xri)
function urlencode (line 69) | def self.urlencode(args)
function append_args (line 77) | def self.append_args(url, args)
FILE: setup.rb
type Enumerable (line 12) | module Enumerable
function read (line 18) | def File.read(fname)
type Errno (line 26) | module Errno
class ENOTEMPTY (line 27) | class ENOTEMPTY
function binread (line 33) | def File.binread(fname)
function dir? (line 40) | def File.dir?(path)
class ConfigTable (line 45) | class ConfigTable
method initialize (line 49) | def initialize(rbconfig)
method verbose? (line 66) | def verbose?
method no_harm? (line 72) | def no_harm?
method [] (line 78) | def [](key)
method []= (line 82) | def []=(key, val)
method names (line 86) | def names
method each (line 90) | def each(&block)
method key? (line 94) | def key?(name)
method lookup (line 98) | def lookup(name)
method add (line 102) | def add(item)
method remove (line 107) | def remove(name)
method load_script (line 114) | def load_script(path, inst = nil)
method savefile (line 120) | def savefile
method load_savefile (line 124) | def load_savefile
method save (line 135) | def save
method load_standard_entries (line 144) | def load_standard_entries
method standard_entries (line 150) | def standard_entries(rbconfig)
method load_multipackage_entries (line 263) | def load_multipackage_entries
method multipackage_entries (line 269) | def multipackage_entries
method fixup (line 298) | def fixup
method parse_opt (line 307) | def parse_opt(opt)
method dllext (line 312) | def dllext
method value_config? (line 316) | def value_config?(name)
class Item (line 320) | class Item
method initialize (line 321) | def initialize(name, template, default, desc)
method help_opt (line 335) | def help_opt
method value? (line 339) | def value?
method value (line 343) | def value
method resolve (line 347) | def resolve(table)
method set (line 351) | def set(val)
method check (line 357) | def check(val)
class BoolItem (line 363) | class BoolItem < Item
method config_type (line 364) | def config_type
method help_opt (line 368) | def help_opt
method check (line 374) | def check(val)
class PathItem (line 383) | class PathItem < Item
method config_type (line 384) | def config_type
method check (line 390) | def check(path)
class ProgramItem (line 396) | class ProgramItem < Item
method config_type (line 397) | def config_type
class SelectItem (line 402) | class SelectItem < Item
method initialize (line 403) | def initialize(name, selection, default, desc)
method config_type (line 408) | def config_type
method check (line 414) | def check(val)
class ExecItem (line 422) | class ExecItem < Item
method initialize (line 423) | def initialize(name, selection, desc, &block)
method config_type (line 429) | def config_type
method value? (line 433) | def value?
method resolve (line 437) | def resolve(table)
method evaluate (line 443) | def evaluate(val, table)
class PackageSelectionItem (line 452) | class PackageSelectionItem < Item
method initialize (line 453) | def initialize(name, template, default, help_default, desc)
method config_type (line 460) | def config_type
method check (line 466) | def check(val)
class MetaConfigEnvironment (line 474) | class MetaConfigEnvironment
method intiailize (line 475) | def intiailize(config, installer)
method config_names (line 480) | def config_names
method config? (line 484) | def config?(name)
method bool_config? (line 488) | def bool_config?(name)
method path_config? (line 492) | def path_config?(name)
method value_config? (line 496) | def value_config?(name)
method add_config (line 500) | def add_config(item)
method add_bool_config (line 504) | def add_bool_config(name, default, desc)
method add_path_config (line 508) | def add_path_config(name, default, desc)
method set_config_default (line 512) | def set_config_default(name, default)
method remove_config (line 516) | def remove_config(name)
method packages (line 521) | def packages
method declare_packages (line 527) | def declare_packages(list)
type FileOperations (line 537) | module FileOperations
function mkdir_p (line 539) | def mkdir_p(dirname, prefix = nil)
function rm_f (line 556) | def rm_f(path)
function rm_rf (line 562) | def rm_rf(path)
function remove_tree (line 568) | def remove_tree(path)
function remove_tree0 (line 578) | def remove_tree0(path)
function move_file (line 598) | def move_file(src, dest)
function force_remove_file (line 611) | def force_remove_file(path)
function remove_file (line 618) | def remove_file(path)
function install (line 623) | def install(from, dest, mode, prefix = nil)
function diff? (line 649) | def diff?(new_content, path)
function command (line 654) | def command(*args)
function ruby (line 660) | def ruby(*args)
function make (line 664) | def make(task = nil)
function extdir? (line 668) | def extdir?(dir)
function files_of (line 672) | def files_of(dir)
function directories_of (line 680) | def directories_of(dir)
type HookScriptAPI (line 690) | module HookScriptAPI
function get_config (line 692) | def get_config(key)
function set_config (line 699) | def set_config(key, val)
function curr_srcdir (line 707) | def curr_srcdir
function curr_objdir (line 711) | def curr_objdir
function srcfile (line 715) | def srcfile(path)
function srcexist? (line 719) | def srcexist?(path)
function srcdirectory? (line 723) | def srcdirectory?(path)
function srcfile? (line 727) | def srcfile?(path)
function srcentries (line 731) | def srcentries(path = '.')
function srcfiles (line 737) | def srcfiles(path = '.')
function srcdirectories (line 743) | def srcdirectories(path = '.')
class ToplevelInstaller (line 752) | class ToplevelInstaller
method invoke (line 768) | def ToplevelInstaller.invoke
method multipackage? (line 777) | def ToplevelInstaller.multipackage?
method load_rbconfig (line 781) | def ToplevelInstaller.load_rbconfig
method initialize (line 792) | def initialize(ardir_root, config)
method config (line 799) | def config(key)
method inspect (line 803) | def inspect
method invoke (line 807) | def invoke
method run_metaconfigs (line 831) | def run_metaconfigs
method init_installers (line 835) | def init_installers
method srcdir_root (line 843) | def srcdir_root
method objdir_root (line 847) | def objdir_root
method relpath (line 851) | def relpath
method parsearg_global (line 859) | def parsearg_global
method valid_task? (line 885) | def valid_task?(t)
method valid_task_re (line 889) | def valid_task_re
method parsearg_no_options (line 893) | def parsearg_no_options
method parsearg_config (line 905) | def parsearg_config
method parsearg_install (line 931) | def parsearg_install
method print_usage (line 948) | def print_usage(out)
method exec_config (line 990) | def exec_config
method exec_setup (line 995) | def exec_setup
method exec_install (line 999) | def exec_install
method exec_test (line 1003) | def exec_test
method exec_show (line 1007) | def exec_show
method exec_clean (line 1013) | def exec_clean
method exec_distclean (line 1017) | def exec_distclean
class ToplevelInstallerMulti (line 1024) | class ToplevelInstallerMulti < ToplevelInstaller
method initialize (line 1028) | def initialize(ardir_root, config)
method run_metaconfigs (line 1035) | def run_metaconfigs
method packages= (line 1044) | def packages=(list)
method init_installers (line 1053) | def init_installers
method extract_selection (line 1068) | def extract_selection(list)
method print_usage (line 1076) | def print_usage(f)
method exec_config (line 1087) | def exec_config
method exec_setup (line 1094) | def exec_setup
method exec_install (line 1100) | def exec_install
method exec_test (line 1106) | def exec_test
method exec_clean (line 1112) | def exec_clean
method exec_distclean (line 1119) | def exec_distclean
method each_selected_installers (line 1130) | def each_selected_installers
method run_hook (line 1141) | def run_hook(id)
method verbose? (line 1146) | def verbose?
method no_harm? (line 1151) | def no_harm?
class Installer (line 1158) | class Installer
method initialize (line 1165) | def initialize(config, srcroot, objroot)
method inspect (line 1172) | def inspect
method srcdir_root (line 1180) | def srcdir_root
method objdir_root (line 1184) | def objdir_root
method relpath (line 1188) | def relpath
method verbose? (line 1197) | def verbose?
method no_harm? (line 1202) | def no_harm?
method verbose_off (line 1206) | def verbose_off
method exec_config (line 1219) | def exec_config
method config_dir_bin (line 1223) | def config_dir_bin(rel)
method config_dir_lib (line 1226) | def config_dir_lib(rel)
method config_dir_man (line 1229) | def config_dir_man(rel)
method config_dir_ext (line 1232) | def config_dir_ext(rel)
method extconf (line 1236) | def extconf
method config_dir_data (line 1240) | def config_dir_data(rel)
method config_dir_conf (line 1243) | def config_dir_conf(rel)
method exec_setup (line 1250) | def exec_setup
method setup_dir_bin (line 1254) | def setup_dir_bin(rel)
method adjust_shebang (line 1260) | def adjust_shebang(path)
method setup_dir_lib (line 1279) | def setup_dir_lib(rel)
method setup_dir_man (line 1282) | def setup_dir_man(rel)
method setup_dir_ext (line 1285) | def setup_dir_ext(rel)
method setup_dir_data (line 1289) | def setup_dir_data(rel)
method setup_dir_conf (line 1292) | def setup_dir_conf(rel)
method exec_install (line 1299) | def exec_install
method install_dir_bin (line 1304) | def install_dir_bin(rel)
method install_dir_lib (line 1308) | def install_dir_lib(rel)
method install_dir_ext (line 1312) | def install_dir_ext(rel)
method install_dir_data (line 1319) | def install_dir_data(rel)
method install_dir_conf (line 1323) | def install_dir_conf(rel)
method install_dir_man (line 1329) | def install_dir_man(rel)
method install_files (line 1333) | def install_files(list, dest, mode)
method rubyscripts (line 1340) | def rubyscripts
method rubyextentions (line 1344) | def rubyextentions(dir)
method targetfiles (line 1352) | def targetfiles
method mapdir (line 1356) | def mapdir(ents)
method existfiles (line 1374) | def existfiles
method hookfiles (line 1378) | def hookfiles
method glob_select (line 1384) | def glob_select(pat, ents)
method glob_reject (line 1389) | def glob_reject(pats, ents)
method globs2re (line 1401) | def globs2re(pats)
method exec_test (line 1413) | def exec_test
method exec_clean (line 1426) | def exec_clean
method clean_dir_bin (line 1432) | def clean_dir_bin(rel)
method clean_dir_lib (line 1435) | def clean_dir_lib(rel)
method clean_dir_ext (line 1438) | def clean_dir_ext(rel)
method clean_dir_data (line 1443) | def clean_dir_data(rel)
method clean_dir_conf (line 1446) | def clean_dir_conf(rel)
method exec_distclean (line 1453) | def exec_distclean
method distclean_dir_bin (line 1459) | def distclean_dir_bin(rel)
method distclean_dir_lib (line 1462) | def distclean_dir_lib(rel)
method distclean_dir_ext (line 1465) | def distclean_dir_ext(rel)
method distclean_dir_data (line 1470) | def distclean_dir_data(rel)
method distclean_dir_conf (line 1473) | def distclean_dir_conf(rel)
method exec_task_traverse (line 1480) | def exec_task_traverse(task)
method traverse (line 1492) | def traverse(task, rel, mid)
method dive_into (line 1503) | def dive_into(rel)
method run_hook (line 1518) | def run_hook(id)
class SetupError (line 1533) | class SetupError < StandardError; end
function setup_rb_error (line 1535) | def setup_rb_error(msg)
FILE: test/discoverdata.rb
type OpenID (line 7) | module OpenID
type DiscoverData (line 9) | module DiscoverData
function readTests (line 39) | def readTests(filename)
function getData (line 50) | def getData(filename, name)
function fillTemplate (line 59) | def fillTemplate(test_name, template, base_url, example_xrds)
function generateSample (line 74) | def generateSample(test_name, base_url,
function generateResult (line 90) | def generateResult(base_url, input_name, id_name, result_name, success)
FILE: test/test_accept.rb
type OpenID (line 6) | module OpenID
class AcceptTest (line 8) | class AcceptTest < Minitest::Test
method getTestData (line 11) | def getTestData()
method chunk (line 24) | def chunk(lines)
method parseLines (line 49) | def parseLines(chunk)
method parseAvailable (line 63) | def parseAvailable(available_text)
method parseExpected (line 70) | def parseExpected(expected_text)
method test_accept_headers (line 92) | def test_accept_headers
method test_generate_accept_header (line 130) | def test_generate_accept_header
FILE: test/test_association.rb
type OpenID (line 5) | module OpenID
class AssociationTestCase (line 6) | class AssociationTestCase < Minitest::Test
method setup (line 7) | def setup
method test_round_trip (line 18) | def test_round_trip
method test_deserialize_failure (line 25) | def test_deserialize_failure
method test_serialization_identity (line 40) | def test_serialization_identity
method test_expires_in (line 45) | def test_expires_in
method test_from_expires_in (line 52) | def test_from_expires_in
method test_sign_sha1 (line 71) | def test_sign_sha1
method test_sign_message_with_sig (line 95) | def test_sign_message_with_sig
method test_sign_message_with_signed (line 105) | def test_sign_message_with_signed
method test_sign_different_assoc_handle (line 115) | def test_sign_different_assoc_handle
method test_sign_bad_assoc_type (line 125) | def test_sign_bad_assoc_type
method test_make_pairs (line 132) | def test_make_pairs
method test_check_message_signature_no_signed (line 148) | def test_check_message_signature_no_signed
method test_check_message_signature_no_sig (line 161) | def test_check_message_signature_no_sig
method test_check_message_signature_bad_sig (line 174) | def test_check_message_signature_bad_sig
method test_check_message_signature_good_sig (line 186) | def test_check_message_signature_good_sig
class AssociationNegotiatorTestCase (line 206) | class AssociationNegotiatorTestCase < Minitest::Test
method assert_equal_under (line 207) | def assert_equal_under(item1, item2)
method test_copy (line 213) | def test_copy
method test_add_allowed (line 220) | def test_add_allowed
method test_bad_assoc_type (line 239) | def test_bad_assoc_type
method test_bad_session_type (line 245) | def test_bad_session_type
method test_default_negotiator (line 251) | def test_default_negotiator
method test_encrypted_negotiator (line 257) | def test_encrypted_negotiator
FILE: test/test_associationmanager.rb
type OpenID (line 14) | module OpenID
class DHAssocSessionTest (line 15) | class DHAssocSessionTest < Minitest::Test
method test_sha1_get_request (line 16) | def test_sha1_get_request
method test_sha1_get_request_custom_dh (line 23) | def test_sha1_get_request_custom_dh
type TestDiffieHellmanResponseParametersMixin (line 35) | module TestDiffieHellmanResponseParametersMixin
function setup (line 36) | def setup
function test_extract_secret (line 60) | def test_extract_secret
function test_absent_serve_public (line 68) | def test_absent_serve_public
function test_absent_mac_key (line 76) | def test_absent_mac_key
function test_invalid_base64_public (line 84) | def test_invalid_base64_public
function test_invalid_base64_mac_key (line 93) | def test_invalid_base64_mac_key
class TestConsumerOpenID1DHSHA1 (line 103) | class TestConsumerOpenID1DHSHA1 < Minitest::Test
class TestConsumerOpenID2DHSHA1 (line 113) | class TestConsumerOpenID2DHSHA1 < Minitest::Test
class TestConsumerOpenID2DHSHA256 (line 123) | class TestConsumerOpenID2DHSHA256 < Minitest::Test
class TestConsumerNoEncryptionSession (line 133) | class TestConsumerNoEncryptionSession < Minitest::Test
method setup (line 134) | def setup
method test_empty_request (line 138) | def test_empty_request
method test_get_secret (line 142) | def test_get_secret
class TestCreateAssociationRequest (line 150) | class TestCreateAssociationRequest < Minitest::Test
method setup (line 151) | def setup
method test_no_encryption_sends_type (line 162) | def test_no_encryption_sends_type
method test_no_encryption_compatibility (line 179) | def test_no_encryption_compatibility
method test_dh_sha1_compatibility (line 192) | def test_dh_sha1_compatibility
class TestAssociationManagerExpiresIn (line 217) | class TestAssociationManagerExpiresIn < Minitest::Test
method expires_in_msg (line 218) | def expires_in_msg(val)
method test_parse_fail (line 223) | def test_parse_fail
method test_parse (line 237) | def test_parse
class TestAssociationManagerCreateSession (line 249) | class TestAssociationManagerCreateSession < Minitest::Test
method test_invalid (line 250) | def test_invalid
method test_sha256 (line 256) | def test_sha256
type NegotiationTestMixin (line 262) | module NegotiationTestMixin
function mk_message (line 264) | def mk_message(args)
function call_negotiate (line 269) | def call_negotiate(responses, negotiator=nil)
class TestOpenID2SessionNegotiation (line 293) | class TestOpenID2SessionNegotiation < Minitest::Test
method setup (line 298) | def setup
method test_bad_response (line 305) | def test_bad_response
method test_empty_assoc_type (line 313) | def test_empty_assoc_type
method test_empty_session_type (line 330) | def test_empty_session_type
method test_not_allowed (line 347) | def test_not_allowed
method test_unsupported_with_retry (line 366) | def test_unsupported_with_retry
method test_unsupported_with_retry_and_fail (line 382) | def test_unsupported_with_retry_and_fail
method test_valid (line 397) | def test_valid
class TestOpenID1SessionNegotiation (line 414) | class TestOpenID1SessionNegotiation < Minitest::Test
method setup (line 419) | def setup
method test_bad_response (line 424) | def test_bad_response
method test_empty_assoc_type (line 431) | def test_empty_assoc_type
method test_empty_session_type (line 443) | def test_empty_session_type
method test_not_allowed (line 455) | def test_not_allowed
method test_unsupported_with_retry (line 473) | def test_unsupported_with_retry
method test_valid (line 489) | def test_valid
class TestExtractAssociation (line 499) | class TestExtractAssociation < Minitest::Test
method setup (line 510) | def setup
method assert_session_mismatch (line 559) | def assert_session_mismatch(req_type, resp_type, ns)
method test_openid1_no_encryption_fallback (line 599) | def test_openid1_no_encryption_fallback
class GetOpenIDSessionTypeTest (line 620) | class GetOpenIDSessionTypeTest < Minitest::Test
method do_test (line 625) | def do_test(expected_session_type, session_type_value)
method test_explicit_no_encryption (line 660) | def test_explicit_no_encryption
class ExtractAssociationTest (line 667) | class ExtractAssociationTest < Minitest::Test
method setup (line 672) | def setup
method call_extract (line 712) | def call_extract
method test_works_with_good_fields (line 718) | def test_works_with_good_fields
method test_bad_assoc_type (line 727) | def test_bad_assoc_type
method test_bad_expires_in (line 734) | def test_bad_expires_in
class TestExtractAssociationDiffieHellman (line 741) | class TestExtractAssociationDiffieHellman < Minitest::Test
method setup (line 746) | def setup
method setup_dh (line 750) | def setup_dh
method test_success (line 774) | def test_success
method test_openid2success (line 784) | def test_openid2success
method test_bad_dh_values (line 791) | def test_bad_dh_values
class TestAssocManagerGetAssociation (line 800) | class TestAssocManagerGetAssociation < Minitest::Test
method setup (line 806) | def setup
method set_negotiate_response (line 815) | def set_negotiate_response(assoc)
method test_not_in_store_no_response (line 819) | def test_not_in_store_no_response
method test_not_in_store_negotiate_assoc (line 824) | def test_not_in_store_negotiate_assoc
method test_in_store_no_response (line 838) | def test_in_store_no_response
method test_request_assoc_with_status_error (line 844) | def test_request_assoc_with_status_error
class TestAssocManagerRequestAssociation (line 860) | class TestAssocManagerRequestAssociation < Minitest::Test
method setup (line 864) | def setup
method make_request (line 878) | def make_request
method test_success (line 892) | def test_success
method test_missing_fields (line 898) | def test_missing_fields
method test_protocol_error (line 907) | def test_protocol_error
FILE: test/test_ax.rb
type OpenID (line 8) | module OpenID
type AX (line 9) | module AX
class BogusAXMessage (line 10) | class BogusAXMessage < AXMessage
method get_extension_args (line 13) | def get_extension_args
method do_check_mode (line 17) | def do_check_mode(args)
method do_check_mode_new_args (line 21) | def do_check_mode_new_args
class AXMessageTest (line 26) | class AXMessageTest < Minitest::Test
method setup (line 27) | def setup
method test_check_mode (line 31) | def test_check_mode
method test_check_mode_new_args (line 36) | def test_check_mode_new_args
class AttrInfoTest (line 41) | class AttrInfoTest < Minitest::Test
method test_construct (line 42) | def test_construct
class ToTypeURIsTest (line 54) | class ToTypeURIsTest < Minitest::Test
method setup (line 55) | def setup
method test_empty (line 59) | def test_empty
method test_undefined (line 66) | def test_undefined
method test_one (line 72) | def test_one
method test_two (line 80) | def test_two
class ParseAXValuesTest (line 94) | class ParseAXValuesTest < Minitest::Test
method ax_values (line 95) | def ax_values(ax_args, expected_args)
method ax_error (line 101) | def ax_error(ax_args, error)
method test_empty_is_valid (line 108) | def test_empty_is_valid
method test_missing_value_for_alias_explodes (line 112) | def test_missing_value_for_alias_explodes
method test_count_present_but_not_value (line 116) | def test_count_present_but_not_value
method test_invalid_count_value (line 120) | def test_invalid_count_value
method test_request_unlimited_values (line 128) | def test_request_unlimited_values
method test_long_alias (line 141) | def test_long_alias
method test_invalid_alias (line 155) | def test_invalid_alias
method test_count_present_and_is_zero (line 174) | def test_count_present_and_is_zero
method test_singleton_empty (line 183) | def test_singleton_empty
method test_double_alias (line 192) | def test_double_alias
method test_double_singleton (line 203) | def test_double_singleton
method singleton_value (line 214) | def singleton_value
class FetchRequestTest (line 224) | class FetchRequestTest < Minitest::Test
method setup (line 225) | def setup
method test_mode (line 231) | def test_mode
method test_construct (line 235) | def test_construct
method test_add (line 244) | def test_add
method test_add_twice (line 253) | def test_add_twice
method do_extension_args (line 260) | def do_extension_args(expected_args)
method test_get_extension_args_empty (line 265) | def test_get_extension_args_empty
method test_get_extension_args_no_alias (line 269) | def test_get_extension_args_no_alias
method test_get_extension_args_alias_if_available (line 283) | def test_get_extension_args_alias_if_available
method test_get_extension_args_alias_req (line 291) | def test_get_extension_args_alias_req
method test_get_required_attrs_empty (line 300) | def test_get_required_attrs_empty
method test_parse_extension_args_extra_type (line 304) | def test_parse_extension_args_extra_type
method test_parse_extension_args (line 312) | def test_parse_extension_args
method test_extension_args_idempotent (line 329) | def test_extension_args_idempotent
method test_extension_args_idempotent_count_required (line 340) | def test_extension_args_idempotent_count_required
method test_extension_args_count1 (line 352) | def test_extension_args_count1
method test_from_openid_request_no_ax (line 368) | def test_from_openid_request_no_ax
method test_from_openid_request_wrong_ax_mode (line 376) | def test_from_openid_request_wrong_ax_mode
method test_openid_update_url_verification_error (line 397) | def test_openid_update_url_verification_error
method test_openid_no_realm (line 413) | def test_openid_no_realm
method test_openid_update_url_verification_success (line 428) | def test_openid_update_url_verification_success
method test_openid_update_url_verification_success_return_to (line 443) | def test_openid_update_url_verification_success_return_to
method test_add_extension (line 458) | def test_add_extension
class FetchResponseTest (line 486) | class FetchResponseTest < Minitest::Test
method setup (line 487) | def setup
method test_construct (line 496) | def test_construct
method test_get_extension_args_empty (line 501) | def test_get_extension_args_empty
method test_get_extension_args_empty_request (line 508) | def test_get_extension_args_empty_request
method test_get_extension_args_empty_request_some (line 516) | def test_get_extension_args_empty_request_some
method test_update_url_in_response (line 529) | def test_update_url_in_response
method test_get_extension_args_single_value_response (line 543) | def test_get_extension_args_single_value_response
method test_get_extension_args_array_value_response (line 557) | def test_get_extension_args_array_value_response
method test_get_extension_args_some_not_request (line 576) | def test_get_extension_args_some_not_request
method test_get_single_success (line 582) | def test_get_single_success
method test_get_single_none (line 587) | def test_get_single_none
method test_get_single_extra (line 591) | def test_get_single_extra
method test_from_unsigned_success_response (line 596) | def test_from_unsigned_success_response
method test_from_signed_success_response (line 621) | def test_from_signed_success_response
method test_from_signed_success_response_with_unsigned_attributes (line 647) | def test_from_signed_success_response_with_unsigned_attributes
method test_from_empty_success_response (line 669) | def test_from_empty_success_response
class StoreRequestTest (line 678) | class StoreRequestTest < Minitest::Test
method setup (line 679) | def setup
method test_construct (line 685) | def test_construct
method test_get_extension_args_empty (line 689) | def test_get_extension_args_empty
method test_from_openid_request_wrong_ax_mode (line 696) | def test_from_openid_request_wrong_ax_mode
method test_get_extension_args_nonempty (line 717) | def test_get_extension_args_nonempty
class StoreResponseTest (line 732) | class StoreResponseTest < Minitest::Test
method test_success (line 733) | def test_success
method test_fail_nomsg (line 741) | def test_fail_nomsg
method test_fail_msg (line 749) | def test_fail_msg
FILE: test/test_checkid_request.rb
type OpenID (line 7) | module OpenID
class Consumer (line 8) | class Consumer
class CheckIDRequest (line 9) | class CheckIDRequest
class DummyEndpoint (line 10) | class DummyEndpoint
method initialize (line 14) | def initialize
method get_local_id (line 21) | def get_local_id
method compatibility_mode (line 25) | def compatibility_mode
type CheckIDTestMixin (line 30) | module CheckIDTestMixin
function setup (line 33) | def setup
function assert_has_identifiers (line 45) | def assert_has_identifiers(msg, local_id, claimed_id)
function assert_openid_key_exists (line 50) | def assert_openid_key_exists(msg, key)
function assert_openid_key_absent (line 55) | def assert_openid_key_absent(msg, key)
function assert_openid_value_equal (line 59) | def assert_openid_value_equal(msg, key, expected)
function assert_anonymous (line 66) | def assert_anonymous(msg)
function assert_has_required_fields (line 72) | def assert_has_required_fields(msg)
function test_check_no_assoc_handle (line 88) | def test_check_no_assoc_handle
function test_add_extension_arg (line 96) | def test_add_extension_arg
function test_standard (line 115) | def test_standard
function test_send_redirect? (line 122) | def test_send_redirect?
class TestCheckIDRequestOpenID2 (line 138) | class TestCheckIDRequestOpenID2 < Minitest::Test
method immediate (line 141) | def immediate
method expected_mode (line 145) | def expected_mode
method preferred_namespace (line 149) | def preferred_namespace
method assert_has_realm (line 155) | def assert_has_realm(msg)
method assert_identifiers_present (line 160) | def assert_identifiers_present(msg)
method test_set_anonymous_works_for_openid2 (line 168) | def test_set_anonymous_works_for_openid2
method test_user_anonymous_ignores_identfier (line 174) | def test_user_anonymous_ignores_identfier
method test_op_anonymous_ignores_identifier (line 183) | def test_op_anonymous_ignores_identifier
method test_op_identifier_sends_identifier_select (line 193) | def test_op_identifier_sends_identifier_select
method test_no_assoc_handle (line 202) | def test_no_assoc_handle
class TestCheckIDRequestOpenID1 (line 210) | class TestCheckIDRequestOpenID1 < Minitest::Test
method immediate (line 213) | def immediate
method preferred_namespace (line 217) | def preferred_namespace
method expected_mode (line 221) | def expected_mode
method assert_has_identifiers (line 226) | def assert_has_identifiers(msg, op_specific_id, claimed_id)
method assert_identifiers_present (line 231) | def assert_identifiers_present(msg)
method assert_has_realm (line 238) | def assert_has_realm(msg)
method test_set_anonymous_fails_for_openid1 (line 246) | def test_set_anonymous_fails_for_openid1
method test_identifier_select (line 258) | def test_identifier_select
class TestCheckIDRequestOpenID1Immediate (line 270) | class TestCheckIDRequestOpenID1Immediate < TestCheckIDRequestOpenID1
method immediate (line 271) | def immediate
method expected_mode (line 275) | def expected_mode
class TestCheckid_RequestOpenID2Immediate (line 280) | class TestCheckid_RequestOpenID2Immediate < TestCheckIDRequestOpenID2
method immediate (line 281) | def immediate
method expected_mode (line 285) | def expected_mode
FILE: test/test_consumer.rb
type OpenID (line 5) | module OpenID
class Consumer (line 6) | class Consumer
type TestConsumer (line 7) | module TestConsumer
class TestLastEndpoint (line 8) | class TestLastEndpoint < Minitest::Test
method test_set_get (line 9) | def test_set_get
class TestBegin (line 23) | class TestBegin < Minitest::Test
method setup (line 27) | def setup
method consumer (line 37) | def consumer
method test_begin (line 54) | def test_begin
method test_begin_failure (line 61) | def test_begin_failure
method test_begin_fallback (line 68) | def test_begin_fallback
class TestBeginWithoutDiscovery (line 82) | class TestBeginWithoutDiscovery < Minitest::Test
method setup (line 84) | def setup
method consumer (line 93) | def consumer
method call_begin_without_discovery (line 109) | def call_begin_without_discovery
method cid_name (line 118) | def cid_name
method nonce_name (line 122) | def nonce_name
method test_begin_without_openid1 (line 126) | def test_begin_without_openid1
method test_begin_without_openid1_anonymous (line 134) | def test_begin_without_openid1_anonymous
method test_begin_without_openid2 (line 141) | def test_begin_without_openid2
method test_begin_without_openid2_anonymous (line 148) | def test_begin_without_openid2_anonymous
class TestComplete (line 157) | class TestComplete < Minitest::Test
method setup (line 158) | def setup
method test_bad_mode (line 163) | def test_bad_mode
method test_missing_mode (line 169) | def test_missing_mode
method test_cancel (line 174) | def test_cancel
method test_setup_needed_openid1 (line 179) | def test_setup_needed_openid1
method test_setup_needed_openid2 (line 184) | def test_setup_needed_openid2
method test_idres_setup_needed_openid1 (line 192) | def test_idres_setup_needed_openid1
method test_error (line 203) | def test_error
method test_idres_openid1 (line 223) | def test_idres_openid1
FILE: test/test_cryptutil.rb
class CryptUtilTestCase (line 6) | class CryptUtilTestCase < Minitest::Test
method test_rand (line 9) | def test_rand
method test_rand_doesnt_depend_on_srand (line 22) | def test_rand_doesnt_depend_on_srand
method test_random_binary_convert (line 30) | def test_random_binary_convert
method test_enumerated_binary_convert (line 40) | def test_enumerated_binary_convert
method with_n2b64 (line 58) | def with_n2b64
method test_base64_to_num (line 69) | def test_base64_to_num
method test_base64_to_num_invalid (line 75) | def test_base64_to_num_invalid
method test_num_to_base64 (line 81) | def test_num_to_base64
method test_randomstring (line 87) | def test_randomstring
method test_randomstring_population (line 95) | def test_randomstring_population
method test_sha1 (line 100) | def test_sha1
method test_hmac_sha1 (line 105) | def test_hmac_sha1
method test_sha256 (line 110) | def test_sha256
method test_hmac_sha256 (line 115) | def test_hmac_sha256
FILE: test/test_dh.rb
type OpenID (line 5) | module OpenID
class DiffieHellmanExposed (line 6) | class DiffieHellmanExposed < OpenID::DiffieHellman
method strxor_for_testing (line 7) | def DiffieHellmanExposed.strxor_for_testing(a, b)
class DiffieHellmanTestCase (line 12) | class DiffieHellmanTestCase < Minitest::Test
method test_strxor_success (line 17) | def test_strxor_success
method test_strxor_failure (line 34) | def test_strxor_failure
method test_simple_exchange (line 47) | def test_simple_exchange
method test_xor_secret (line 55) | def test_xor_secret
method test_dh (line 64) | def test_dh
method test_using_defaults (line 79) | def test_using_defaults
FILE: test/test_discover.rb
type OpenID (line 14) | module OpenID
class SimpleMockFetcher (line 15) | class SimpleMockFetcher
method initialize (line 16) | def initialize(test, responses)
method fetch (line 21) | def fetch(url, body=nil, headers=nil, limit=nil)
class TestDiscoveryFailure (line 29) | class TestDiscoveryFailure < Minitest::Test
method initialize (line 30) | def initialize(*args)
method test_discovery_failure (line 44) | def test_discovery_failure
class ErrorRaisingFetcher (line 67) | class ErrorRaisingFetcher
method initialize (line 70) | def initialize(thing_to_raise)
method fetch (line 74) | def fetch(url, body=nil, headers=nil, limit=nil)
class DidFetch (line 79) | class DidFetch < Exception
class TestFetchException (line 83) | class TestFetchException < Minitest::Test
method initialize (line 86) | def initialize(*args)
method test_fetch_exception (line 97) | def test_fetch_exception
class TestNormalization (line 110) | class TestNormalization < Minitest::Test
method test_addingProtocol (line 111) | def test_addingProtocol
class DiscoveryMockFetcher (line 126) | class DiscoveryMockFetcher
method initialize (line 127) | def initialize(documents)
method fetch (line 133) | def fetch(url, body=nil, headers=nil, limit=nil)
class BaseTestDiscovery (line 155) | class BaseTestDiscovery < Minitest::Test
method initialize (line 158) | def initialize(*args)
method _checkService (line 165) | def _checkService(s, server_url, claimed_id=nil,
method setup (line 211) | def setup
method teardown (line 217) | def teardown
method test_blank (line 221) | def test_blank
class TestDiscovery (line 232) | class TestDiscovery < BaseTestDiscovery
method _discover (line 235) | def _discover(content_type, data,
method test_404 (line 249) | def test_404
method test_noOpenID (line 255) | def test_noOpenID
method test_malformed_meta_tag (line 274) | def test_malformed_meta_tag
method test_html1 (line 301) | def test_html1
method test_html1Fragment (line 315) | def test_html1Fragment
method test_html2 (line 339) | def test_html2
method test_html1And2 (line 353) | def test_html1And2
method test_html_utf8 (line 370) | def test_html_utf8
method test_yadisEmpty (line 384) | def test_yadisEmpty
method test_htmlEmptyYadis (line 390) | def test_htmlEmptyYadis
method test_yadis1NoDelegate (line 410) | def test_yadis1NoDelegate
method test_yadis2NoLocalID (line 424) | def test_yadis2NoLocalID
method test_yadis2 (line 438) | def test_yadis2
method test_yadis2OP (line 452) | def test_yadis2OP
method test_yadis2OPDelegate (line 464) | def test_yadis2OPDelegate
method test_yadis2BadLocalID (line 477) | def test_yadis2BadLocalID
method test_yadis1And2 (line 485) | def test_yadis1And2
method test_yadis1And2BadLocalID (line 499) | def test_yadis1And2BadLocalID
class MockFetcherForXRIProxy (line 508) | class MockFetcherForXRIProxy
method initialize (line 510) | def initialize(documents, proxy_url=Yadis::XRI::ProxyResolver::DEFAU...
method fetch (line 516) | def fetch(url, body=nil, headers=nil, limit=nil)
class TestXRIDiscovery (line 547) | class TestXRIDiscovery < BaseTestDiscovery
method initialize (line 552) | def initialize(*args)
method test_xri (line 563) | def test_xri
method test_xri_normalize (line 585) | def test_xri_normalize
method test_xriNoCanonicalID (line 607) | def test_xriNoCanonicalID
method test_useCanonicalID (line 614) | def test_useCanonicalID
class TestXRIDiscoveryIDP (line 624) | class TestXRIDiscoveryIDP < BaseTestDiscovery
method initialize (line 627) | def initialize(*args)
method test_xri (line 636) | def test_xri
class TestPreferredNamespace (line 644) | class TestPreferredNamespace < Minitest::Test
method initialize (line 645) | def initialize(*args)
method test_preferred_namespace (line 662) | def test_preferred_namespace
class TestIsOPIdentifier (line 673) | class TestIsOPIdentifier < Minitest::Test
method setup (line 674) | def setup
method test_none (line 678) | def test_none
method test_openid1_0 (line 682) | def test_openid1_0
method test_openid1_1 (line 687) | def test_openid1_1
method test_openid2 (line 692) | def test_openid2
method test_openid2OP (line 697) | def test_openid2OP
method test_multipleMissing (line 702) | def test_multipleMissing
method test_multiplePresent (line 708) | def test_multiplePresent
class TestFromOPEndpointURL (line 716) | class TestFromOPEndpointURL < Minitest::Test
method setup (line 717) | def setup
method test_isOPEndpoint (line 722) | def test_isOPEndpoint
method test_noIdentifiers (line 726) | def test_noIdentifiers
method test_compatibility (line 731) | def test_compatibility
method test_canonical_id (line 735) | def test_canonical_id
method test_serverURL (line 739) | def test_serverURL
class TestDiscoverFunction (line 744) | class TestDiscoverFunction < Minitest::Test
method test_discover_function (line 745) | def test_discover_function
class TestEndpointSupportsType (line 766) | class TestEndpointSupportsType < Minitest::Test
method setup (line 767) | def setup
method failUnlessSupportsOnly (line 771) | def failUnlessSupportsOnly(*types)
method test_supportsNothing (line 787) | def test_supportsNothing
method test_openid2 (line 791) | def test_openid2
method test_openid2provider (line 796) | def test_openid2provider
method test_openid1_0 (line 802) | def test_openid1_0
method test_openid1_1 (line 807) | def test_openid1_1
method test_multiple (line 812) | def test_multiple
method test_multipleWithProvider (line 819) | def test_multipleWithProvider
class TestEndpointDisplayIdentifier (line 829) | class TestEndpointDisplayIdentifier < Minitest::Test
method test_strip_fragment (line 830) | def test_strip_fragment
class TestNormalizeURL (line 838) | class TestNormalizeURL < Minitest::Test
method test_no_host (line 839) | def test_no_host
FILE: test/test_discovery_manager.rb
type OpenID (line 5) | module OpenID
class TestDiscoveredServices (line 6) | class TestDiscoveredServices < Minitest::Test
method setup (line 7) | def setup
method test_next (line 17) | def test_next
method test_for_url (line 28) | def test_for_url
method test_started (line 36) | def test_started
method test_empty (line 46) | def test_empty
class PassthroughDiscoveryManager (line 60) | class PassthroughDiscoveryManager < Consumer::DiscoveryManager
method method_missing (line 61) | def method_missing(m, *args)
class TestDiscoveryManager (line 66) | class TestDiscoveryManager < Minitest::Test
method setup (line 67) | def setup
method test_construct (line 77) | def test_construct
method test_get_next_service (line 86) | def test_get_next_service
method test_cleanup (line 129) | def test_cleanup
method test_get_manager (line 166) | def test_get_manager
method test_create_manager (line 185) | def test_create_manager
class DestroyCalledException (line 212) | class DestroyCalledException < StandardError; end
method test_destroy_manager (line 214) | def test_destroy_manager
method test_session_key (line 235) | def test_session_key
method test_store (line 240) | def test_store
method test_load (line 247) | def test_load
method test_destroy! (line 253) | def test_destroy!
FILE: test/test_extension.rb
type OpenID (line 5) | module OpenID
class DummyExtension (line 6) | class DummyExtension < OpenID::Extension
method initialize (line 9) | def initialize
method get_extension_args (line 14) | def get_extension_args
class ToMessageTest (line 19) | class ToMessageTest < Minitest::Test
method test_OpenID1 (line 20) | def test_OpenID1
method test_OpenID2 (line 33) | def test_OpenID2
FILE: test/test_fetchers.rb
type OpenSSL (line 15) | module OpenSSL
type SSL (line 16) | module SSL
class SSLError (line 17) | class SSLError < StandardError; end
type HttpResultAssertions (line 22) | module HttpResultAssertions
function assert_http_result_is (line 23) | def assert_http_result_is(expected, result)
class BogusFetcher (line 30) | class BogusFetcher
method fetch (line 33) | def fetch(url, body=nil, headers=nil, redirect_limit=5)
class FetcherTestCase (line 38) | class FetcherTestCase < Minitest::Test
class ExpectedResponse (line 45) | class ExpectedResponse < Net::HTTPResponse
method initialize (line 48) | def initialize(code, final_url, body="the expected body",
method body (line 56) | def body
method _redirect_with_code (line 76) | def _redirect_with_code(code)
method _respond_with_code (line 83) | def _respond_with_code(code)
method _require_header (line 90) | def _require_header
method _require_post (line 97) | def _require_post
method _redirect_loop (line 104) | def _redirect_loop
method _utf8_page (line 120) | def _utf8_page
method _unencoded_page (line 128) | def _unencoded_page
method _badly_encoded_page (line 136) | def _badly_encoded_page
method setup (line 144) | def setup
method _uri_build (line 181) | def _uri_build(path='/')
method teardown (line 190) | def teardown
method test_headers (line 213) | def test_headers
method test_headers_after_redirect (line 224) | def test_headers_after_redirect
method test_post (line 235) | def test_post
method test_redirect_limit (line 243) | def test_redirect_limit
method test_utf8_page (line 251) | def test_utf8_page
method test_unencoded_page (line 260) | def test_unencoded_page
method test_badly_encoded_page (line 271) | def test_badly_encoded_page
method test_cases (line 283) | def test_cases
method test_https_no_openssl (line 316) | def test_https_no_openssl
class FakeConnection (line 335) | class FakeConnection < Net::HTTP
method initialize (line 338) | def initialize *args
method use_ssl= (line 343) | def use_ssl=(v)
method ca_file= (line 347) | def ca_file=(ca_file)
method test_ssl_with_ca_file (line 352) | def test_ssl_with_ca_file
method test_ssl_without_ca_file (line 372) | def test_ssl_without_ca_file
method test_make_http_nil (line 394) | def test_make_http_nil
method test_make_http_invalid (line 407) | def test_make_http_invalid
class BrokenSSLConnection (line 420) | class BrokenSSLConnection
method start (line 421) | def start(&block)
method test_sslfetchingerror (line 426) | def test_sslfetchingerror
class TimeoutConnection (line 439) | class TimeoutConnection
method start (line 440) | def start(&block)
method test_fetchingerror (line 445) | def test_fetchingerror
class TestingException (line 458) | class TestingException < OpenID::FetchingError; end
class NoSSLSupportConnection (line 460) | class NoSSLSupportConnection
method supports_ssl? (line 461) | def supports_ssl?
method start (line 465) | def start
method request_get (line 469) | def request_get(*args)
method post_connection_check (line 473) | def post_connection_check(hostname)
method use_ssl? (line 477) | def use_ssl?
class NoUseSSLConnection (line 482) | class NoUseSSLConnection < NoSSLSupportConnection
method use_ssl? (line 483) | def use_ssl?
method test_post_connection_check_no_support_ssl (line 488) | def test_post_connection_check_no_support_ssl
method test_post_connection_check_no_use_ssl (line 502) | def test_post_connection_check_no_use_ssl
class PostConnectionCheckException (line 516) | class PostConnectionCheckException < OpenID::FetchingError; end
class UseSSLConnection (line 518) | class UseSSLConnection < NoSSLSupportConnection
method use_ssl? (line 519) | def use_ssl?
method post_connection_check (line 523) | def post_connection_check(hostname)
method test_post_connection_check (line 528) | def test_post_connection_check
class DefaultFetcherTest (line 547) | class DefaultFetcherTest < Minitest::Test
method setup (line 548) | def setup
method test_default_fetcher (line 552) | def test_default_fetcher
class ProxyTest (line 567) | class ProxyTest < Minitest::Test
method test_proxy_unreachable (line 568) | def test_proxy_unreachable
method test_proxy_env (line 585) | def test_proxy_env
FILE: test/test_filters.rb
type OpenID (line 7) | module OpenID
class BasicServiceEndpointTest (line 8) | class BasicServiceEndpointTest < Minitest::Test
method test_match_types (line 9) | def test_match_types
method test_from_basic_service_endpoint (line 30) | def test_from_basic_service_endpoint
class TransformFilterMakerTest (line 42) | class TransformFilterMakerTest < Minitest::Test
method make_service_element (line 43) | def make_service_element(types, uris)
method test_get_service_endpoints (line 53) | def test_get_service_endpoints
method test_empty_transform_filter (line 75) | def test_empty_transform_filter
method test_nil_filter (line 82) | def test_nil_filter
method test_identity_filter (line 90) | def test_identity_filter
method test_return_different_endpoint (line 99) | def test_return_different_endpoint
method test_multiple_filters (line 109) | def test_multiple_filters
class BogusServiceEndpointExtractor (line 136) | class BogusServiceEndpointExtractor
method initialize (line 137) | def initialize(data)
method get_service_endpoints (line 141) | def get_service_endpoints(yadis_url, service_element)
class CompoundFilterTest (line 146) | class CompoundFilterTest < Minitest::Test
method test_get_service_endpoints (line 147) | def test_get_service_endpoints
class MakeFilterTest (line 162) | class MakeFilterTest < Minitest::Test
method test_parts_nil (line 163) | def test_parts_nil
method test_parts_array (line 168) | def test_parts_array
method test_parts_single (line 178) | def test_parts_single
class MakeCompoundFilterTest (line 185) | class MakeCompoundFilterTest < Minitest::Test
method test_no_filters (line 186) | def test_no_filters
method test_single_transform_filter (line 191) | def test_single_transform_filter
method test_single_endpoint (line 196) | def test_single_endpoint
method test_single_proc (line 207) | def test_single_proc
method test_multiple_filters_same_type (line 218) | def test_multiple_filters_same_type
method test_multiple_filters_different_type (line 230) | def test_multiple_filters_different_type
method test_filter_type_error (line 250) | def test_filter_type_error
FILE: test/test_idres.rb
type OpenID (line 9) | module OpenID
class Consumer (line 10) | class Consumer
class IdResHandler (line 11) | class IdResHandler
class IdResHandler (line 16) | class IdResHandler < OpenID::Consumer::IdResHandler
method id_res (line 17) | def id_res
class CheckForFieldsTest (line 21) | class CheckForFieldsTest < Minitest::Test
method mkMsg (line 33) | def mkMsg(ns, fields, signed_fields)
method test_112 (line 105) | def test_112
method test_no_signed_list (line 134) | def test_no_signed_list
method test_success_openid1 (line 142) | def test_success_openid1
method test_success_openid1_1 (line 148) | def test_success_openid1_1
class ReturnToArgsTest (line 155) | class ReturnToArgsTest < Minitest::Test
method check_return_to_args (line 158) | def check_return_to_args(query)
method assert_bad_args (line 167) | def assert_bad_args(msg, query)
method test_return_to_args_okay (line 173) | def test_return_to_args_okay
method test_unexpected_arg_okay (line 181) | def test_unexpected_arg_okay
method test_return_to_mismatch (line 189) | def test_return_to_mismatch
class ReturnToVerifyTest (line 203) | class ReturnToVerifyTest < Minitest::Test
method test_bad_return_to (line 204) | def test_bad_return_to
method test_good_return_to (line 233) | def test_good_return_to
class DummyEndpoint (line 252) | class DummyEndpoint
method initialize (line 254) | def initialize(server_url)
class CheckSigTest (line 259) | class CheckSigTest < Minitest::Test
method setup (line 263) | def setup
method call_idres_method (line 280) | def call_idres_method(method_name)
method call_check_sig (line 287) | def call_check_sig(&proc)
method no_check_auth (line 291) | def no_check_auth(idres)
method test_sign_good (line 295) | def test_sign_good
method test_bad_sig (line 299) | def test_bad_sig
method test_check_auth_ok (line 306) | def test_check_auth_ok
method test_check_auth_ok_no_store (line 317) | def test_check_auth_ok_no_store
method test_expired_assoc (line 328) | def test_expired_assoc
method call_check_auth (line 336) | def call_check_auth(&proc)
method test_check_auth_create_fail (line 342) | def test_check_auth_create_fail
method test_check_auth_okay (line 352) | def test_check_auth_okay
method test_check_auth_process_fail (line 372) | def test_check_auth_process_fail
method test_create_check_auth_request_success (line 407) | def test_create_check_auth_request_success
class CheckAuthResponseTest (line 416) | class CheckAuthResponseTest < Minitest::Test
method setup (line 420) | def setup
method call_process (line 431) | def call_process
method test_valid (line 435) | def test_valid
method test_invalid (line 439) | def test_invalid
method test_valid_invalidate (line 448) | def test_valid_invalidate
method test_invalid_invalidate (line 453) | def test_invalid_invalidate
method test_invalidate_no_store (line 465) | def test_invalidate_no_store
class NonceTest (line 475) | class NonceTest < Minitest::Test
method setup (line 479) | def setup
method call_check_nonce (line 492) | def call_check_nonce(post_args, succeed=false)
method test_openid1_success (line 501) | def test_openid1_success
method test_openid1_missing (line 510) | def test_openid1_missing
method test_openid2_ignore_rp_nonce (line 519) | def test_openid2_ignore_rp_nonce
method test_openid2_success (line 526) | def test_openid2_success
method test_openid1_ignore_response_nonce (line 531) | def test_openid1_ignore_response_nonce
method test_no_store (line 542) | def test_no_store
method test_already_used (line 547) | def test_already_used
method test_malformed_nonce (line 553) | def test_malformed_nonce
class DiscoveryVerificationTest (line 560) | class DiscoveryVerificationTest < Minitest::Test
method setup (line 564) | def setup
method call_verify (line 568) | def call_verify(msg_args)
method call_verify_modify (line 572) | def call_verify_modify(msg_args)
method assert_verify_protocol_error (line 581) | def assert_verify_protocol_error(error_prefix, openid_args)
method test_openid1_no_local_id (line 585) | def test_openid1_no_local_id
method test_openid1_no_endpoint (line 591) | def test_openid1_no_endpoint
method test_openid1_fallback_1_0 (line 598) | def test_openid1_fallback_1_0
method test_openid2_no_op_endpoint (line 633) | def test_openid2_no_op_endpoint
method test_openid2_local_id_no_claimed (line 640) | def test_openid2_local_id_no_claimed
method test_openid2_no_local_id_claimed (line 647) | def test_openid2_no_local_id_claimed
method test_openid2_no_identifiers (line 657) | def test_openid2_no_identifiers
method test_openid2_no_endpoint_does_disco (line 668) | def test_openid2_no_endpoint_does_disco
method test_openid2_mismatched_does_disco (line 686) | def test_openid2_mismatched_does_disco
method test_verify_discovery_single_claimed_id_mismatch (line 707) | def test_verify_discovery_single_claimed_id_mismatch
method test_openid1_1_verify_discovery_single_no_server_url (line 723) | def test_openid1_1_verify_discovery_single_no_server_url
method test_openid2_use_pre_discovered (line 738) | def test_openid2_use_pre_discovered
method test_openid2_use_pre_discovered_wrong_type (line 754) | def test_openid2_use_pre_discovered_wrong_type
method test_openid1_use_pre_discovered (line 787) | def test_openid1_use_pre_discovered
method test_openid1_use_pre_discovered_wrong_type (line 801) | def test_openid1_use_pre_discovered_wrong_type
method test_openid2_fragment (line 822) | def test_openid2_fragment
method test_endpoint_without_local_id (line 844) | def test_endpoint_without_local_id
class IdResTopLevelTest (line 862) | class IdResTopLevelTest < Minitest::Test
method test_id_res (line 863) | def test_id_res
class DiscoverAndVerifyTest (line 906) | class DiscoverAndVerifyTest < Minitest::Test
method test_no_services (line 911) | def test_no_services
class VerifyDiscoveredServicesTest (line 930) | class VerifyDiscoveredServicesTest < Minitest::Test
method test_no_services (line 934) | def test_no_services
FILE: test/test_kvform.rb
class KVFormTests (line 8) | class KVFormTests < Minitest::Test
method test_kvdict (line 11) | def test_kvdict
method _run_kvdictTest (line 48) | def _run_kvdictTest(case_)
method test_kvseq (line 80) | def test_kvseq
method _cleanSeq (line 104) | def _cleanSeq(seq)
method _run_kvseqTest (line 110) | def _run_kvseqTest(case_)
method test_kvexc (line 138) | def test_kvexc
method _run_kvexcTest (line 151) | def _run_kvexcTest(case_)
method test_convert (line 159) | def test_convert
FILE: test/test_kvpost.rb
type OpenID (line 7) | module OpenID
class KVPostTestCase (line 8) | class KVPostTestCase < Minitest::Test
method mk_resp (line 11) | def mk_resp(status, resp_hash)
method test_msg_from_http_resp_success (line 15) | def test_msg_from_http_resp_success
method test_400 (line 21) | def test_400
method test_500 (line 36) | def test_500
method make_kv_post_with_response (line 45) | def make_kv_post_with_response(status, args)
method test_make_kv_post (line 58) | def test_make_kv_post
FILE: test/test_linkparse.rb
class LinkParseTestCase (line 5) | class LinkParseTestCase < Minitest::Test
method attr_cmp (line 8) | def attr_cmp(expected, found)
method test_attrcmp (line 36) | def test_attrcmp
method test_linkparse (line 56) | def test_linkparse
FILE: test/test_message.rb
type OpenID (line 7) | module OpenID
type GetArgsMixin (line 8) | module GetArgsMixin
function get_arg_tests (line 12) | def get_arg_tests(ns, key, expected=nil)
class EmptyMessageTestCase (line 29) | class EmptyMessageTestCase < Minitest::Test
method setup (line 32) | def setup
method test_get_aliased_arg_no_default (line 36) | def test_get_aliased_arg_no_default
method test_to_post_args (line 48) | def test_to_post_args
method test_to_args (line 52) | def test_to_args
method test_to_kvform (line 56) | def test_to_kvform
method test_from_kvform (line 60) | def test_from_kvform
method test_to_url_encoded (line 68) | def test_to_url_encoded
method test_to_url (line 72) | def test_to_url
method test_get_openid (line 77) | def test_get_openid
method test_get_key_openid (line 81) | def test_get_key_openid
method test_get_key_bare (line 87) | def test_get_key_bare
method test_get_key_ns1 (line 91) | def test_get_key_ns1
method test_get_key_ns2 (line 95) | def test_get_key_ns2
method test_get_key_ns3 (line 99) | def test_get_key_ns3
method test_has_key (line 103) | def test_has_key
method test_has_key_bare (line 109) | def test_has_key_bare
method test_has_key_ns1 (line 113) | def test_has_key_ns1
method test_has_key_ns2 (line 117) | def test_has_key_ns2
method test_has_key_ns3 (line 121) | def test_has_key_ns3
method test_get_arg (line 125) | def test_get_arg
method test_get_arg_bare (line 131) | def test_get_arg_bare
method test_get_arg_ns1 (line 135) | def test_get_arg_ns1
method test_get_arg_ns2 (line 139) | def test_get_arg_ns2
method test_get_arg_ns3 (line 143) | def test_get_arg_ns3
method test_get_args (line 147) | def test_get_args
method test_get_args_bare (line 153) | def test_get_args_bare
method test_get_args_ns1 (line 157) | def test_get_args_ns1
method test_get_args_ns2 (line 161) | def test_get_args_ns2
method test_get_args_ns3 (line 165) | def test_get_args_ns3
method test_update_args (line 169) | def test_update_args
method _test_update_args_ns (line 175) | def _test_update_args_ns(ns)
method test_update_args_bare (line 185) | def test_update_args_bare
method test_update_args_ns1 (line 188) | def test_update_args_ns1
method test_update_args_ns2 (line 191) | def test_update_args_ns2
method test_update_args_ns3 (line 194) | def test_update_args_ns3
method test_set_arg (line 198) | def test_set_arg
method _test_set_arg_ns (line 204) | def _test_set_arg_ns(ns)
method test_set_arg_bare (line 212) | def test_set_arg_bare
method test_set_arg_ns1 (line 215) | def test_set_arg_ns1
method test_set_arg_ns2 (line 218) | def test_set_arg_ns2
method test_set_arg_ns3 (line 221) | def test_set_arg_ns3
method test_del_arg (line 225) | def test_del_arg
method _test_del_arg_ns (line 231) | def _test_del_arg_ns(ns)
method test_del_arg_bare (line 236) | def test_del_arg_bare
method test_del_arg_ns1 (line 239) | def test_del_arg_ns1
method test_del_arg_ns2 (line 242) | def test_del_arg_ns2
method test_del_arg_ns3 (line 245) | def test_del_arg_ns3
method test_isOpenID1 (line 249) | def test_isOpenID1
method test_isOpenID2 (line 253) | def test_isOpenID2
method test_set_openid_namespace (line 257) | def test_set_openid_namespace
class OpenID1MessageTest (line 264) | class OpenID1MessageTest < Minitest::Test
method setup (line 267) | def setup
method test_has_openid_ns (line 272) | def test_has_openid_ns
method test_get_aliased_arg (line 278) | def test_get_aliased_arg
method test_get_aliased_arg_ns (line 282) | def test_get_aliased_arg_ns
method test_get_aliased_arg_with_ns (line 286) | def test_get_aliased_arg_with_ns
method test_get_aliased_arg_with_ns_default (line 299) | def test_get_aliased_arg_with_ns_default
method test_to_post_args (line 304) | def test_to_post_args
method test_to_post_args_ns (line 310) | def test_to_post_args_ns
method test_to_args (line 323) | def test_to_args
method test_to_kvform (line 329) | def test_to_kvform
method test_to_url_encoded (line 334) | def test_to_url_encoded
method test_to_url (line 339) | def test_to_url
method test_get_openid (line 350) | def test_get_openid
method test_get_key_openid (line 354) | def test_get_key_openid
method test_get_key_bare (line 358) | def test_get_key_bare
method test_get_key_ns1 (line 362) | def test_get_key_ns1
method test_get_key_ns2 (line 366) | def test_get_key_ns2
method test_get_key_ns3 (line 370) | def test_get_key_ns3
method test_has_key (line 374) | def test_has_key
method test_has_key_bare (line 377) | def test_has_key_bare
method test_has_key_ns1 (line 380) | def test_has_key_ns1
method test_has_key_ns2 (line 383) | def test_has_key_ns2
method test_has_key_ns3 (line 386) | def test_has_key_ns3
method test_get_arg (line 390) | def test_get_arg
method test_get_arg_bare (line 394) | def test_get_arg_bare
method test_get_arg_ns (line 398) | def test_get_arg_ns
method test_get_arg_ns1 (line 402) | def test_get_arg_ns1
method test_get_arg_ns2 (line 406) | def test_get_arg_ns2
method test_get_arg_ns3 (line 410) | def test_get_arg_ns3
method test_get_args (line 414) | def test_get_args
method test_get_args_bare (line 418) | def test_get_args_bare
method test_get_args_ns1 (line 421) | def test_get_args_ns1
method test_get_args_ns2 (line 425) | def test_get_args_ns2
method test_get_args_ns3 (line 428) | def test_get_args_ns3
method _test_update_args_ns (line 432) | def _test_update_args_ns(ns, before=nil)
method test_update_args (line 447) | def test_update_args
method test_update_args_bare (line 450) | def test_update_args_bare
method test_update_args_ns1 (line 453) | def test_update_args_ns1
method test_update_args_ns2 (line 456) | def test_update_args_ns2
method test_update_args_ns3 (line 459) | def test_update_args_ns3
method _test_set_arg_ns (line 463) | def _test_set_arg_ns(ns)
method test_set_arg (line 471) | def test_set_arg; _test_set_arg_ns(OPENID_NS); end
method test_set_arg_bare (line 472) | def test_set_arg_bare; _test_set_arg_ns(BARE_NS); end
method test_set_arg_ns1 (line 473) | def test_set_arg_ns1; _test_set_arg_ns(OPENID1_NS); end
method test_set_arg_ns2 (line 474) | def test_set_arg_ns2; _test_set_arg_ns(OPENID2_NS); end
method test_set_arg_ns3 (line 475) | def test_set_arg_ns3; _test_set_arg_ns('urn:xxx'); end
method _test_del_arg_ns (line 477) | def _test_del_arg_ns(ns)
method test_del_arg (line 486) | def test_del_arg; _test_del_arg_ns(OPENID_NS); end
method test_del_arg_bare (line 487) | def test_del_arg_bare; _test_del_arg_ns(BARE_NS); end
method test_del_arg_ns1 (line 488) | def test_del_arg_ns1; _test_del_arg_ns(OPENID1_NS); end
method test_del_arg_ns2 (line 489) | def test_del_arg_ns2; _test_del_arg_ns(OPENID2_NS); end
method test_del_arg_ns3 (line 490) | def test_del_arg_ns3; _test_del_arg_ns('urn:yyy'); end
method test_isOpenID1 (line 492) | def test_isOpenID1
method test_isOpenID2 (line 496) | def test_isOpenID2
method test_equal (line 500) | def test_equal
method test_from_openid_args_undefined_ns (line 505) | def test_from_openid_args_undefined_ns
method TODOtest_from_kvform (line 513) | def TODOtest_from_kvform
method test_initialize_sets_namespace (line 519) | def test_initialize_sets_namespace
class OpenID1ExplicitMessageTest (line 525) | class OpenID1ExplicitMessageTest < Minitest::Test
method setup (line 528) | def setup
method test_to_post_args (line 534) | def test_to_post_args
method test_to_post_args_ns (line 542) | def test_to_post_args_ns
method test_to_args (line 556) | def test_to_args
method test_to_kvform (line 564) | def test_to_kvform
method test_to_url_encoded (line 569) | def test_to_url_encoded
method test_to_url (line 574) | def test_to_url
class OpenID2MessageTest (line 591) | class OpenID2MessageTest < Minitest::Test
method setup (line 594) | def setup
method test_to_args_fails (line 601) | def test_to_args_fails
method test_fix_ns_non_string (line 607) | def test_fix_ns_non_string
method test_fix_ns_non_uri (line 614) | def test_fix_ns_non_uri
method test_fix_ns_sreg_literal (line 621) | def test_fix_ns_sreg_literal
method test_copy (line 628) | def test_copy
method test_to_post_args (line 633) | def test_to_post_args
method test_to_post_args_ns (line 641) | def test_to_post_args_ns
method test_to_args (line 654) | def test_to_args
method test_to_kvform (line 662) | def test_to_kvform
method _test_urlencoded (line 668) | def _test_urlencoded(s)
method test_to_urlencoded (line 680) | def test_to_urlencoded
method test_to_url (line 684) | def test_to_url
method test_get_openid (line 694) | def test_get_openid
method test_get_key_openid (line 698) | def test_get_key_openid
method test_get_key_bare (line 702) | def test_get_key_bare
method test_get_key_ns1 (line 706) | def test_get_key_ns1
method test_get_key_ns2 (line 710) | def test_get_key_ns2
method test_get_key_ns3 (line 714) | def test_get_key_ns3
method test_has_key_openid (line 718) | def test_has_key_openid
method test_has_key_bare (line 722) | def test_has_key_bare
method test_has_key_ns1 (line 726) | def test_has_key_ns1
method test_has_key_ns2 (line 730) | def test_has_key_ns2
method test_has_key_ns3 (line 734) | def test_has_key_ns3
method test_get_arg_openid (line 739) | def test_get_arg_openid
method test_get_arg_bare (line 743) | def test_get_arg_bare
method test_get_arg_ns1 (line 747) | def test_get_arg_ns1
method test_get_arg_ns2 (line 751) | def test_get_arg_ns2
method test_get_arg_ns3 (line 755) | def test_get_arg_ns3
method test_get_args_openid (line 759) | def test_get_args_openid
method test_get_args_bare (line 764) | def test_get_args_bare
method test_get_args_ns1 (line 769) | def test_get_args_ns1
method test_get_args_ns2 (line 774) | def test_get_args_ns2
method test_get_args_ns3 (line 779) | def test_get_args_ns3
method _test_update_args_ns (line 784) | def _test_update_args_ns(ns, before=nil)
method test_update_args_openid (line 795) | def test_update_args_openid
method test_update_args_bare (line 799) | def test_update_args_bare
method test_update_args_ns1 (line 803) | def test_update_args_ns1
method test_update_args_ns2 (line 807) | def test_update_args_ns2
method test_update_args_ns3 (line 811) | def test_update_args_ns3
method _test_set_arg_ns (line 815) | def _test_set_arg_ns(ns)
method test_set_arg_openid (line 823) | def test_set_arg_openid; _test_set_arg_ns(OPENID_NS); end
method test_set_arg_bare (line 824) | def test_set_arg_bare; _test_set_arg_ns(BARE_NS); end
method test_set_arg_ns1 (line 825) | def test_set_arg_ns1; _test_set_arg_ns(OPENID1_NS); end
method test_set_arg_ns2 (line 826) | def test_set_arg_ns2; _test_set_arg_ns(OPENID2_NS); end
method test_set_arg_ns3 (line 827) | def test_set_arg_ns3; _test_set_arg_ns('urn:g'); end
method test_bad_alias (line 829) | def test_bad_alias
method test_from_post_args (line 848) | def test_from_post_args
method _test_del_arg_ns (line 853) | def _test_del_arg_ns(ns)
method test_del_arg_openid (line 863) | def test_del_arg_openid; _test_del_arg_ns(OPENID_NS); end
method test_del_arg_bare (line 864) | def test_del_arg_bare; _test_del_arg_ns(BARE_NS); end
method test_del_arg_ns1 (line 865) | def test_del_arg_ns1; _test_del_arg_ns(OPENID1_NS); end
method test_del_arg_ns2 (line 866) | def test_del_arg_ns2; _test_del_arg_ns(OPENID2_NS); end
method test_del_arg_ns3 (line 867) | def test_del_arg_ns3; _test_del_arg_ns('urn:tofu'); end
method test_overwrite_extension_arg (line 869) | def test_overwrite_extension_arg
method test_argList (line 881) | def test_argList
method test_isOpenID1 (line 887) | def test_isOpenID1
method test_isOpenID2 (line 891) | def test_isOpenID2
class MessageTest (line 896) | class MessageTest < Minitest::Test
method setup (line 897) | def setup
method _checkForm (line 925) | def _checkForm(html, message_, action_url,
method test_toFormMarkup (line 1010) | def test_toFormMarkup
method test_overrideMethod (line 1018) | def test_overrideMethod
method test_overrideRequired (line 1031) | def test_overrideRequired
class NamespaceMapTestCase (line 1047) | class NamespaceMapTestCase < Minitest::Test
method test_onealias (line 1049) | def test_onealias
method test_iteration (line 1059) | def test_iteration
method test_register_default_alias (line 1082) | def test_register_default_alias
method test_alias_defined_twice (line 1106) | def test_alias_defined_twice
FILE: test/test_nonce.rb
type OpenID (line 4) | module OpenID
class NonceTestCase (line 5) | class NonceTestCase < Minitest::Test
method test_mk_nonce (line 9) | def test_mk_nonce
method test_mk_nonce_time (line 15) | def test_mk_nonce_time
method test_split (line 22) | def test_split
method test_mk_split (line 31) | def test_mk_split
method test_bad_split (line 40) | def test_bad_split
method test_check_timestamp (line 55) | def test_check_timestamp
FILE: test/test_oauth.rb
type OpenID (line 8) | module OpenID
type OAuthTest (line 9) | module OAuthTest
class OAuthRequestTestCase (line 10) | class OAuthRequestTestCase < Minitest::Test
method setup (line 11) | def setup
method test_construct (line 15) | def test_construct
method test_add_consumer (line 25) | def test_add_consumer
method test_add_scope (line 30) | def test_add_scope
method test_get_extension_args (line 35) | def test_get_extension_args
method test_parse_extension_args (line 43) | def test_parse_extension_args
method test_parse_extension_args_empty (line 50) | def test_parse_extension_args_empty
method test_from_openid_request (line 56) | def test_from_openid_request
method test_from_openid_request_no_oauth (line 71) | def test_from_openid_request_no_oauth
class DummySuccessResponse (line 81) | class DummySuccessResponse
method initialize (line 84) | def initialize(message, signed_stuff)
method get_signed_ns (line 89) | def get_signed_ns(ns_uri)
class OAuthResponseTestCase (line 95) | class OAuthResponseTestCase < Minitest::Test
method setup (line 96) | def setup
method test_construct (line 100) | def test_construct
method test_add_request_token (line 109) | def test_add_request_token
method test_add_scope (line 114) | def test_add_scope
method test_get_extension_args (line 119) | def test_get_extension_args
method test_parse_extension_args (line 127) | def test_parse_extension_args
method test_parse_extension_args_empty (line 134) | def test_parse_extension_args_empty
method test_from_success_response (line 140) | def test_from_success_response
method test_from_success_response_unsigned (line 159) | def test_from_success_response_unsigned
FILE: test/test_openid_yadis.rb
type OpenID (line 5) | module OpenID
function mkXRDS (line 18) | def self.mkXRDS(services)
function mkService (line 22) | def self.mkService(uris=nil, type_uris=nil, local_id=nil, dent=" ...
function subsets (line 68) | def OpenID.subsets(l)
class OpenIDYadisTest (line 91) | class OpenIDYadisTest
method initialize (line 92) | def initialize(uris, type_uris, local_id)
method runTest (line 107) | def runTest(testcase)
class OpenIDYadisTests (line 146) | class OpenIDYadisTests < Minitest::Test
method test_openid_yadis (line 147) | def test_openid_yadis
FILE: test/test_pape.rb
type OpenID (line 7) | module OpenID
type PAPETest (line 8) | module PAPETest
class PapeRequestTestCase (line 9) | class PapeRequestTestCase < Minitest::Test
method setup (line 10) | def setup
method test_construct (line 14) | def test_construct
method test_add_policy_uri (line 24) | def test_add_policy_uri
method test_get_extension_args (line 36) | def test_get_extension_args
method test_parse_extension_args (line 46) | def test_parse_extension_args
method test_parse_extension_args_empty (line 54) | def test_parse_extension_args_empty
method test_from_openid_request (line 60) | def test_from_openid_request
method test_from_openid_request_no_pape (line 75) | def test_from_openid_request_no_pape
method test_preferred_types (line 83) | def test_preferred_types
class DummySuccessResponse (line 92) | class DummySuccessResponse
method initialize (line 95) | def initialize(message, signed_stuff)
method get_signed_ns (line 100) | def get_signed_ns(ns_uri)
class PapeResponseTestCase (line 106) | class PapeResponseTestCase < Minitest::Test
method setup (line 107) | def setup
method test_construct (line 111) | def test_construct
method test_add_policy_uri (line 123) | def test_add_policy_uri
method test_get_extension_args (line 135) | def test_get_extension_args
method test_get_extension_args_error_auth_age (line 147) | def test_get_extension_args_error_auth_age
method test_get_extension_args_error_nist_auth_level (line 152) | def test_get_extension_args_error_nist_auth_level
method test_parse_extension_args (line 161) | def test_parse_extension_args
method test_parse_extension_args_empty (line 169) | def test_parse_extension_args_empty
method test_parse_extension_args_strict_bogus1 (line 175) | def test_parse_extension_args_strict_bogus1
method test_parse_extension_args_strict_bogus2 (line 183) | def test_parse_extension_args_strict_bogus2
method test_parse_extension_args_strict_good (line 192) | def test_parse_extension_args_strict_good
method test_parse_extension_args_nostrict_bogus (line 202) | def test_parse_extension_args_nostrict_bogus
method test_from_success_response (line 213) | def test_from_success_response
method test_from_success_response_unsigned (line 232) | def test_from_success_response_unsigned
FILE: test/test_parsehtml.rb
type OpenID (line 5) | module OpenID
class ParseHTMLTestCase (line 6) | class ParseHTMLTestCase < Minitest::Test
method test_parsehtml (line 9) | def test_parsehtml
class TC_TestHTMLTokenizer (line 30) | class TC_TestHTMLTokenizer < Minitest::Test
method test_bad_link (line 31) | def test_bad_link
method test_namespace (line 36) | def test_namespace
method test_comment (line 41) | def test_comment
method test_full (line 48) | def test_full
FILE: test/test_responses.rb
type OpenID (line 5) | module OpenID
class Consumer (line 6) | class Consumer
type TestResponses (line 7) | module TestResponses
class TestSuccessResponse (line 8) | class TestSuccessResponse < Minitest::Test
method setup (line 9) | def setup
method test_extension_response (line 14) | def test_extension_response
method test_extension_response_signed (line 32) | def test_extension_response_signed
FILE: test/test_server.rb
type OpenID (line 21) | module OpenID
class CatchLogs (line 26) | class CatchLogs
method catchlogs_setup (line 27) | def catchlogs_setup
method got_log_message (line 33) | def got_log_message(message)
method teardown (line 37) | def teardown
class TestProtocolError (line 42) | class TestProtocolError < Minitest::Test
method test_browserWithReturnTo (line 43) | def test_browserWithReturnTo
method test_browserWithReturnTo_OpenID2_GET (line 64) | def test_browserWithReturnTo_OpenID2_GET
method test_browserWithReturnTo_OpenID2_POST (line 88) | def test_browserWithReturnTo_OpenID2_POST
method test_browserWithReturnTo_OpenID1_exceeds_limit (line 106) | def test_browserWithReturnTo_OpenID1_exceeds_limit
method test_noReturnTo (line 129) | def test_noReturnTo
method test_no_message (line 142) | def test_no_message
method test_which_encoding_no_message (line 148) | def test_which_encoding_no_message
class TestDecode (line 154) | class TestDecode < Minitest::Test
method setup (line 155) | def setup
method test_none (line 167) | def test_none
method test_irrelevant (line 173) | def test_irrelevant
method test_bad (line 183) | def test_bad
method test_dictOfLists (line 193) | def test_dictOfLists
method test_checkidImmediate (line 210) | def test_checkidImmediate
method test_checkidImmediate_constructor (line 230) | def test_checkidImmediate_constructor
method test_checkid_missing_return_to_and_trust_root (line 237) | def test_checkid_missing_return_to_and_trust_root
method test_checkid_id_select (line 251) | def test_checkid_id_select
method test_checkid_not_id_select (line 266) | def test_checkid_not_id_select
method test_checkidSetup (line 290) | def test_checkidSetup
method test_checkidSetupOpenID2 (line 307) | def test_checkidSetupOpenID2
method test_checkidSetupNoClaimedIDOpenID2 (line 327) | def test_checkidSetupNoClaimedIDOpenID2
method test_checkidSetupNoIdentityOpenID2 (line 341) | def test_checkidSetupNoIdentityOpenID2
method test_checkidSetupNoReturnOpenID1 (line 358) | def test_checkidSetupNoReturnOpenID1
method test_checkidSetupNoReturnOpenID2 (line 372) | def test_checkidSetupNoReturnOpenID2
method test_checkidSetupRealmRequiredOpenID2 (line 401) | def test_checkidSetupRealmRequiredOpenID2
method test_checkidSetupBadReturn (line 416) | def test_checkidSetupBadReturn
method test_checkidSetupUntrustedReturn (line 432) | def test_checkidSetupUntrustedReturn
method test_checkidSetupUntrustedReturn_Constructor (line 449) | def test_checkidSetupUntrustedReturn_Constructor
method test_checkidSetupMalformedReturnURL_Constructor (line 457) | def test_checkidSetupMalformedReturnURL_Constructor
method test_checkAuth (line 465) | def test_checkAuth
method test_checkAuthMissingSignature (line 482) | def test_checkAuthMissingSignature
method test_checkAuthAndInvalidate (line 496) | def test_checkAuthAndInvalidate
method test_associateDH (line 513) | def test_associateDH
method test_associateDHMissingKey (line 527) | def test_associateDHMissingKey
method test_associateDHpubKeyNotB64 (line 539) | def test_associateDHpubKeyNotB64
method test_associateDHModGen (line 550) | def test_associateDHModGen
method test_associateDHCorruptModGen (line 570) | def test_associateDHCorruptModGen
method test_associateDHMissingGen (line 585) | def test_associateDHMissingGen
method test_associateDHMissingMod (line 597) | def test_associateDHMissingMod
method test_associateWeirdSession (line 622) | def test_associateWeirdSession
method test_associatePlain (line 633) | def test_associatePlain
method test_nomode (line 644) | def test_nomode
method test_invalidns (line 654) | def test_invalidns
class BogusEncoder (line 666) | class BogusEncoder < Server::Encoder
method encode (line 667) | def encode(response)
class BogusDecoder (line 672) | class BogusDecoder < Server::Decoder
method decode (line 673) | def decode(query)
class TestEncode (line 678) | class TestEncode < Minitest::Test
method setup (line 679) | def setup
method test_id_res_OpenID2_GET (line 687) | def test_id_res_OpenID2_GET
method test_id_res_OpenID2_POST (line 713) | def test_id_res_OpenID2_POST
method test_to_form_markup (line 740) | def test_to_form_markup
method test_to_html (line 761) | def test_to_html
method test_id_res_OpenID1_exceeds_limit (line 782) | def test_id_res_OpenID1_exceeds_limit
method test_id_res (line 810) | def test_id_res
method test_cancel (line 838) | def test_cancel
method test_cancel_to_form (line 855) | def test_cancel_to_form
method test_assocReply (line 871) | def test_assocReply
method test_checkauthReply (line 886) | def test_checkauthReply
method test_unencodableError (line 904) | def test_unencodableError
method test_encodableError (line 914) | def test_encodableError
class TestSigningEncode (line 927) | class TestSigningEncode < Minitest::Test
method setup (line 928) | def setup
method test_idres (line 952) | def test_idres
method test_idresDumb (line 970) | def test_idresDumb
method test_forgotStore (line 982) | def test_forgotStore
method test_cancel (line 989) | def test_cancel
method test_assocReply (line 1007) | def test_assocReply
method test_alreadySigned (line 1020) | def test_alreadySigned
class TestCheckID (line 1028) | class TestCheckID < Minitest::Test
method setup (line 1029) | def setup
method test_trustRootInvalid (line 1042) | def test_trustRootInvalid
method test_trustRootInvalid_modified (line 1048) | def test_trustRootInvalid_modified
method test_trustRootvalid_absent_trust_root (line 1060) | def test_trustRootvalid_absent_trust_root
method test_trustRootValid (line 1065) | def test_trustRootValid
method test_trustRootValidNoReturnTo (line 1071) | def test_trustRootValidNoReturnTo
method test_returnToVerified_callsVerify (line 1082) | def test_returnToVerified_callsVerify
method _expectAnswer (line 1128) | def _expectAnswer(answer, identity=nil, claimed_id=nil)
method test_answerAllow (line 1159) | def test_answerAllow
method test_answerAllowDelegatedIdentity (line 1169) | def test_answerAllowDelegatedIdentity
method test_answerAllowWithoutIdentityReally (line 1176) | def test_answerAllowWithoutIdentityReally
method test_answerAllowAnonymousFail (line 1183) | def test_answerAllowAnonymousFail
method test_answerAllowWithIdentity (line 1192) | def test_answerAllowWithIdentity
method test_answerAllowWithNoIdentity (line 1199) | def test_answerAllowWithNoIdentity
method test_immediate_openid1_no_identity (line 1206) | def test_immediate_openid1_no_identity
method test_checkid_setup_openid1_no_identity (line 1214) | def test_checkid_setup_openid1_no_identity
method test_immediate_openid1_no_server_url (line 1222) | def test_immediate_openid1_no_server_url
method test_immediate_encode_to_url (line 1233) | def test_immediate_encode_to_url
method test_answerAllowWithDelegatedIdentityOpenID2 (line 1257) | def test_answerAllowWithDelegatedIdentityOpenID2
method test_answerAllowWithDelegatedIdentityOpenID1 (line 1268) | def test_answerAllowWithDelegatedIdentityOpenID1
method test_answerAllowWithAnotherIdentity (line 1280) | def test_answerAllowWithAnotherIdentity
method test_answerAllowNoIdentityOpenID1 (line 1288) | def test_answerAllowNoIdentityOpenID1
method test_answerAllowForgotEndpoint (line 1296) | def test_answerAllowForgotEndpoint
method test_checkIDWithNoIdentityOpenID1 (line 1303) | def test_checkIDWithNoIdentityOpenID1
method test_fromMessageClaimedIDWithoutIdentityOpenID2 (line 1315) | def test_fromMessageClaimedIDWithoutIdentityOpenID2
method test_fromMessageIdentityWithoutClaimedIDOpenID2 (line 1326) | def test_fromMessageIdentityWithoutClaimedIDOpenID2
method test_fromMessageWithEmptyTrustRoot (line 1337) | def test_fromMessageWithEmptyTrustRoot
method test_trustRootOpenID1 (line 1352) | def test_trustRootOpenID1
method test_trustRootOpenID2 (line 1367) | def test_trustRootOpenID2
method test_answerAllowNoTrustRoot (line 1383) | def test_answerAllowNoTrustRoot
method test_answerImmediateDenyOpenID2 (line 1390) | def test_answerImmediateDenyOpenID2
method test_answerImmediateDenyOpenID1 (line 1410) | def test_answerImmediateDenyOpenID1
method test_answerSetupDeny (line 1431) | def test_answerSetupDeny
method test_encodeToURL (line 1438) | def test_encodeToURL
method test_getCancelURL (line 1457) | def test_getCancelURL
method test_getCancelURLimmed (line 1466) | def test_getCancelURLimmed
method test_fromMessageWithoutTrustRoot (line 1474) | def test_fromMessageWithoutTrustRoot
method test_fromMessageWithoutTrustRootOrReturnTo (line 1487) | def test_fromMessageWithoutTrustRootOrReturnTo
class TestCheckIDExtension (line 1500) | class TestCheckIDExtension < Minitest::Test
method setup (line 1502) | def setup
method test_addField (line 1518) | def test_addField
method test_addFields (line 1530) | def test_addFields
class MockSignatory (line 1543) | class MockSignatory
method initialize (line 1546) | def initialize(assoc)
method verify (line 1551) | def verify(assoc_handle, message)
method get_association (line 1560) | def get_association(assoc_handle, dumb)
method invalidate (line 1570) | def invalidate(assoc_handle, dumb)
class TestCheckAuth (line 1577) | class TestCheckAuth < Minitest::Test
method setup (line 1578) | def setup
method test_to_s (line 1592) | def test_to_s
method test_valid (line 1596) | def test_valid
method test_invalid (line 1603) | def test_invalid
method test_replay (line 1611) | def test_replay
method test_invalidatehandle (line 1629) | def test_invalidatehandle
method test_invalidatehandleNo (line 1638) | def test_invalidatehandleNo
class TestAssociate (line 1647) | class TestAssociate < Minitest::Test
method setup (line 1651) | def setup
method test_dhSHA1 (line 1657) | def test_dhSHA1
method test_dhSHA256 (line 1681) | def test_dhSHA256
method test_protoError256 (line 1705) | def test_protoError256
method test_protoError (line 1729) | def test_protoError
method test_protoErrorFields (line 1754) | def test_protoErrorFields
method failUnlessExpiresInMatches (line 1787) | def failUnlessExpiresInMatches(msg, expected_expires_in)
method test_plaintext (line 1802) | def test_plaintext
method test_plaintext_v2 (line 1820) | def test_plaintext_v2
method test_plaintext256 (line 1852) | def test_plaintext256
method test_unsupportedPrefer (line 1870) | def test_unsupportedPrefer
method test_unsupported (line 1889) | def test_unsupported
method test_openid1_unsupported_explode (line 1904) | def test_openid1_unsupported_explode
class UnhandledError (line 1915) | class UnhandledError < Exception
class TestServer (line 1918) | class TestServer < Minitest::Test
method setup (line 1921) | def setup
method test_failed_dispatch (line 1927) | def test_failed_dispatch
method test_decode_request (line 1936) | def test_decode_request
method test_encode_response (line 1941) | def test_encode_response
method test_dispatch (line 1946) | def test_dispatch
method test_associate (line 1960) | def test_associate
method test_associate2 (line 1967) | def test_associate2
method test_associate3 (line 1991) | def test_associate3
method test_associate4 (line 2016) | def test_associate4
method test_no_encryption_openid1 (line 2036) | def test_no_encryption_openid1
method test_missingSessionTypeOpenID2 (line 2048) | def test_missingSessionTypeOpenID2
method test_checkAuth (line 2059) | def test_checkAuth
class TestingRequest (line 2070) | class TestingRequest < Server::OpenIDRequest
class TestSignatory (line 2074) | class TestSignatory < Minitest::Test
method setup (line 2077) | def setup
method test_get_association_nil (line 2085) | def test_get_association_nil
method test_sign (line 2091) | def test_sign
method test_signDumb (line 2116) | def test_signDumb
method test_signExpired (line 2138) | def test_signExpired
method test_signInvalidHandle (line 2196) | def test_signInvalidHandle
method test_verify (line 2229) | def test_verify
method test_verifyBadSig (line 2249) | def test_verifyBadSig
method test_verifyBadHandle (line 2269) | def test_verifyBadHandle
method test_verifyAssocMismatch (line 2285) | def test_verifyAssocMismatch
method test_getAssoc (line 2307) | def test_getAssoc
method test_getAssocExpired (line 2314) | def test_getAssocExpired
method test_getAssocInvalid (line 2323) | def test_getAssocInvalid
method test_getAssocDumbVsNormal (line 2331) | def test_getAssocDumbVsNormal
method test_getAssocNormalVsDumb (line 2340) | def test_getAssocNormalVsDumb
method test_createAssociation (line 2354) | def test_createAssociation
method makeAssoc (line 2362) | def makeAssoc(dumb, lifetime=60)
method test_invalidate (line 2374) | def test_invalidate
class RunthroughTestCase (line 2393) | class RunthroughTestCase < Minitest::Test
method setup (line 2394) | def setup
method test_openid1_assoc_checkid (line 2399) | def test_openid1_assoc_checkid
FILE: test/test_sreg.rb
type OpenID (line 6) | module OpenID
type SReg (line 7) | module SReg
type SRegTest (line 8) | module SRegTest
class SRegTest (line 20) | class SRegTest < Minitest::Test
method test_is11 (line 22) | def test_is11
method test_check_field_name (line 26) | def test_check_field_name
method test_unsupported (line 34) | def test_unsupported
method test_supported_1_1 (line 40) | def test_supported_1_1
method test_supported_1_0 (line 46) | def test_supported_1_0
class FakeEndpoint (line 54) | class FakeEndpoint < Object
method initialize (line 56) | def initialize(supported)
method uses_extension (line 61) | def uses_extension(namespace_uri)
class FakeMessage (line 67) | class FakeMessage < Object
method initialize (line 70) | def initialize
method is_openid1 (line 75) | def is_openid1
class GetNSTest (line 81) | class GetNSTest < Minitest::Test
method setup (line 82) | def setup
method test_openid2_empty (line 86) | def test_openid2_empty
method test_openid1_empty (line 92) | def test_openid1_empty
method test_openid1defined_1_0 (line 99) | def test_openid1defined_1_0
method test_openid1_defined_1_0_override_alias (line 106) | def test_openid1_defined_1_0_override_alias
method test_openid1_defined_badly (line 121) | def test_openid1_defined_badly
method test_openid2_defined_badly (line 127) | def test_openid2_defined_badly
method test_openid2_defined_1_0 (line 132) | def test_openid2_defined_1_0
method test_openid1_sreg_ns_from_args (line 138) | def test_openid1_sreg_ns_from_args
class SRegRequestTest (line 152) | class SRegRequestTest < Minitest::Test
method test_construct_empty (line 153) | def test_construct_empty
method test_construct_fields (line 161) | def test_construct_fields
method test_construct_bad_fields (line 169) | def test_construct_bad_fields
method test_from_openid_request_message_copied (line 173) | def test_from_openid_request_message_copied
method test_from_openid_request_ns_1_0 (line 184) | def test_from_openid_request_ns_1_0
method test_from_openid_request_no_sreg (line 194) | def test_from_openid_request_no_sreg
method test_parse_extension_args_empty (line 202) | def test_parse_extension_args_empty
method test_parse_extension_args_extra_ignored (line 207) | def test_parse_extension_args_extra_ignored
method test_parse_extension_args_non_strict (line 212) | def test_parse_extension_args_non_strict
method test_parse_extension_args_strict (line 218) | def test_parse_extension_args_strict
method test_parse_extension_args_policy (line 225) | def test_parse_extension_args_policy
method test_parse_extension_args_required_empty (line 231) | def test_parse_extension_args_required_empty
method test_parse_extension_args_optional_empty (line 237) | def test_parse_extension_args_optional_empty
method test_parse_extension_args_optional_single (line 243) | def test_parse_extension_args_optional_single
method test_parse_extension_args_optional_list (line 249) | def test_parse_extension_args_optional_list
method test_parse_extension_args_optional_list_bad_nonstrict (line 255) | def test_parse_extension_args_optional_list_bad_nonstrict
method test_parse_extension_args_optional_list_bad_strict (line 261) | def test_parse_extension_args_optional_list_bad_strict
method test_parse_extension_args_both_nonstrict (line 268) | def test_parse_extension_args_both_nonstrict
method test_parse_extension_args_both_strict (line 275) | def test_parse_extension_args_both_strict
method test_parse_extension_args_both_list (line 282) | def test_parse_extension_args_both_list
method test_all_requested_fields (line 289) | def test_all_requested_fields
method test_were_fields_requested (line 299) | def test_were_fields_requested
method test_member (line 306) | def test_member
method test_request_field_bogus (line 318) | def test_request_field_bogus
method test_request_fields_type (line 342) | def test_request_fields_type
method test_request_fields (line 347) | def test_request_fields
method test_get_extension_args (line 377) | def test_get_extension_args
class DummySuccessResponse (line 404) | class DummySuccessResponse
method initialize (line 406) | def initialize(message, signed_stuff)
method get_signed_ns (line 410) | def get_signed_ns(ns_uri)
class SRegResponseTest (line 416) | class SRegResponseTest < Minitest::Test
method test_construct (line 417) | def test_construct
method test_from_success_response_signed (line 426) | def test_from_success_response_signed
method test_from_success_response_unsigned (line 435) | def test_from_success_response_unsigned
class SendFieldsTest (line 447) | class SendFieldsTest < Minitest::Test
method test_send_fields (line 449) | def test_send_fields
FILE: test/test_stores.rb
type OpenID (line 10) | module OpenID
type Store (line 11) | module Store
type StoreTestCase (line 12) | module StoreTestCase
function _gen_nonce (line 16) | def _gen_nonce
function _gen_handle (line 20) | def _gen_handle(n)
function _gen_secret (line 24) | def _gen_secret(n, chars=nil)
function _gen_assoc (line 28) | def _gen_assoc(issued, lifetime=600)
function _check_retrieve (line 35) | def _check_retrieve(url, handle=nil, expected=nil)
function _check_remove (line 47) | def _check_remove(url, handle, expected)
function test_store (line 52) | def test_store
function test_assoc_cleanup (line 142) | def test_assoc_cleanup
function _check_use_nonce (line 158) | def _check_use_nonce(nonce, expected, server_url, msg='')
function server_url (line 164) | def server_url
function test_nonce (line 168) | def test_nonce
function test_nonce_cleanup (line 183) | def test_nonce_cleanup
class FileStoreTestCase (line 217) | class FileStoreTestCase < Minitest::Test
method setup (line 220) | def setup
method teardown (line 225) | def teardown
class MemoryStoreTestCase (line 230) | class MemoryStoreTestCase < Minitest::Test
method setup (line 233) | def setup
class MemcacheStoreTestCase (line 242) | class MemcacheStoreTestCase < Minitest::Test
method setup (line 244) | def setup
method test_nonce_cleanup (line 250) | def test_nonce_cleanup
method test_assoc_cleanup (line 253) | def test_assoc_cleanup
class AbstractStoreTestCase (line 258) | class AbstractStoreTestCase < Minitest::Test
method test_abstract_class (line 259) | def test_abstract_class
FILE: test/test_trustroot.rb
class TrustRootTest (line 5) | class TrustRootTest < Minitest::Test
method _test_sanity (line 8) | def _test_sanity(case_, sanity, desc)
method _test_match (line 22) | def _test_match(trust_root, url, expected_match)
method test_trustroots (line 34) | def test_trustroots
method getTests (line 53) | def getTests(grps, head, dat)
method test_return_to_matches (line 73) | def test_return_to_matches
method test_build_discovery_url (line 97) | def test_build_discovery_url
FILE: test/test_ui.rb
type OpenID (line 6) | module OpenID
type UITest (line 7) | module UITest
class UIRequestTestCase (line 8) | class UIRequestTestCase < Minitest::Test
method setup (line 10) | def setup
method test_construct (line 14) | def test_construct
method test_add_mode (line 26) | def test_add_mode
method test_add_icon (line 31) | def test_add_icon
method test_add_lang (line 36) | def test_add_lang
method test_get_extension_args (line 41) | def test_get_extension_args
method test_parse_extension_args (line 51) | def test_parse_extension_args
method test_parse_extension_args_empty (line 59) | def test_parse_extension_args_empty
method test_from_openid_request (line 66) | def test_from_openid_request
method test_from_openid_request_no_ui_params (line 83) | def test_from_openid_request_no_ui_params
FILE: test/test_urinorm.rb
class URINormTestCase (line 5) | class URINormTestCase < Minitest::Test
method test_normalize (line 8) | def test_normalize
FILE: test/test_util.rb
type OpenID (line 5) | module OpenID
class UtilTestCase (line 6) | class UtilTestCase < Minitest::Test
method test_base64 (line 8) | def test_base64
method test_base64_valid (line 25) | def test_base64_valid
method test_base64_invalid (line 39) | def test_base64_invalid
method test_append_args (line 53) | def test_append_args()
method test_parse_query (line 139) | def test_parse_query
FILE: test/test_xrds.rb
type OpenID (line 5) | module OpenID
type Yadis (line 6) | module Yadis
type XRDSTestMixin (line 8) | module XRDSTestMixin
function read_xrds_data_file (line 17) | def read_xrds_data_file(filename)
class ParseXRDSTestCase (line 22) | class ParseXRDSTestCase < Minitest::Test
method test_parse (line 26) | def test_parse
method test_parse_no_xrds_xml (line 31) | def test_parse_no_xrds_xml
method test_parse_no_xrds_empty (line 38) | def test_parse_no_xrds_empty
method test_is_xrds (line 44) | def test_is_xrds
class GetYadisXRDTestCase (line 52) | class GetYadisXRDTestCase < Minitest::Test
method test_get_xrd (line 56) | def test_get_xrd
method test_no_xrd (line 64) | def test_no_xrd
class EachServiceTestCase (line 73) | class EachServiceTestCase < Minitest::Test
method test_get_xrd (line 76) | def test_get_xrd
method test_no_xrd (line 87) | def test_no_xrd
method test_equal_j3h (line 95) | def test_equal_j3h
class ExpandServiceTestCase (line 109) | class ExpandServiceTestCase < Minitest::Test
method test_expand_service (line 121) | def test_expand_service
class PrioSortTestCase (line 136) | class PrioSortTestCase < Minitest::Test
method new_uri (line 137) | def new_uri(priority)
method test_sorting (line 143) | def test_sorting
class GetCanonicalIDTestCase (line 158) | class GetCanonicalIDTestCase < Minitest::Test
method test_multisegment_xri (line 161) | def test_multisegment_xri
FILE: test/test_xri.rb
type OpenID (line 4) | module OpenID
type Yadis (line 6) | module Yadis
class XriDiscoveryTestCase (line 8) | class XriDiscoveryTestCase < Minitest::Test
method test_isXRI? (line 10) | def test_isXRI?
class XriEscapingTestCase (line 21) | class XriEscapingTestCase < Minitest::Test
method test_escaping_percents (line 22) | def test_escaping_percents
method test_escaping_xref (line 27) | def test_escaping_xref
class XriTransformationTestCase (line 40) | class XriTransformationTestCase < Minitest::Test
method test_to_iri_normal (line 41) | def test_to_iri_normal
FILE: test/test_xrires.rb
type OpenID (line 4) | module OpenID
type Yadis (line 5) | module Yadis
class XRDSFetcher (line 7) | class XRDSFetcher
method initialize (line 8) | def initialize(results)
method fetch (line 12) | def fetch(url, body=nil, headers=nil, redirect_limit=nil)
class ProxyQueryTestCase (line 21) | class ProxyQueryTestCase < Minitest::Test
method setup (line 22) | def setup
method test_proxy_url (line 29) | def test_proxy_url
method test_proxy_url_qmarks (line 59) | def test_proxy_url_qmarks
FILE: test/test_yadis_discovery.rb
type OpenID (line 9) | module OpenID
type YadisDiscovery (line 11) | module YadisDiscovery
function mkResponse (line 17) | def self.mkResponse(data)
class TestFetcher (line 32) | class TestFetcher
method initialize (line 35) | def initialize(base_url)
method fetch (line 39) | def fetch(url, headers, body, redirect_limit=nil)
class MockFetcher (line 63) | class MockFetcher
method initialize (line 64) | def initialize
method fetch (line 68) | def fetch(uri, headers=nil, body=nil, redirect_limit=nil)
class TestSecondGet (line 81) | class TestSecondGet < Minitest::Test
method test_404 (line 84) | def test_404
class DiscoveryTestCase (line 92) | class DiscoveryTestCase
method initialize (line 96) | def initialize(testcase, input_name, id_name, result_name, success)
method setup (line 105) | def setup
method do_discovery (line 113) | def do_discovery
method runCustomTest (line 119) | def runCustomTest
class NoContentTypeFetcher (line 155) | class NoContentTypeFetcher
method fetch (line 156) | def fetch(url, body=nil, headers=nil, redirect_limit=nil)
class BlankContentTypeFetcher (line 161) | class BlankContentTypeFetcher
method fetch (line 162) | def fetch(url, body=nil, headers=nil, redirect_limit=nil)
class TestYadisDiscovery (line 167) | class TestYadisDiscovery < Minitest::Test
method test_yadis_discovery (line 170) | def test_yadis_discovery
method test_is_xrds_yadis_location (line 177) | def test_is_xrds_yadis_location
method test_is_xrds_content_type (line 185) | def test_is_xrds_content_type
method test_is_xrds_neither (line 193) | def test_is_xrds_neither
method test_no_content_type (line 201) | def test_no_content_type
method test_blank_content_type (line 208) | def test_blank_content_type
FILE: test/testutil.rb
type OpenID (line 10) | module OpenID
type TestDataMixin (line 11) | module TestDataMixin
function read_data_file (line 15) | def read_data_file(filename, lines=true, data_dir=TEST_DATA_DIR)
type FetcherMixin (line 26) | module FetcherMixin
function with_fetcher (line 27) | def with_fetcher(fetcher)
type Const (line 38) | module Const
function const (line 39) | def const(symbol, value)
class MockResponse (line 46) | class MockResponse
method initialize (line 49) | def initialize(code, body)
type ProtocolErrorMixin (line 55) | module ProtocolErrorMixin
function assert_protocol_error (line 56) | def assert_protocol_error(str_prefix)
type OverrideMethodMixin (line 69) | module OverrideMethodMixin
function with_method_overridden (line 70) | def with_method_overridden(method_name, proc)
type InstanceDefExtension (line 99) | module InstanceDefExtension
function instance_def (line 100) | def instance_def(method_name, &proc)
class GoodAssoc (line 112) | class GoodAssoc
method initialize (line 115) | def initialize(handle='-blah-')
method check_message_signature (line 120) | def check_message_signature(msg)
class HTTPResponse (line 125) | class HTTPResponse
method _from_raw_data (line 126) | def self._from_raw_data(status, body="", headers={}, final_url=nil)
FILE: test/util.rb
type OpenID (line 4) | module OpenID
type TestUtil (line 5) | module TestUtil
function assert_log_matches (line 6) | def assert_log_matches(*regexes)
function assert_log_line_count (line 25) | def assert_log_line_count(num_lines)
function silence_logging (line 40) | def silence_logging
Condensed preview — 226 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,446K chars).
[
{
"path": ".gitignore",
"chars": 154,
"preview": "*.gem\n*.rbc\n.bundle\n.config\n.yardoc\nGemfile.lock\nInstalledFiles\n_yardoc\ncoverage\ndoc/\nlib/bundler/man\npkg\nrdoc\nspec/repo"
},
{
"path": ".travis.yml",
"chars": 368,
"preview": "language: ruby\nsudo: required\ndist: trusty\nscript: rake\nrvm:\n - \"1.9\"\n - \"2.0\"\n - \"2.1\"\n - \"2.2\"\n - \"2.3\"\n - \"2.4\""
},
{
"path": "CHANGELOG.md",
"chars": 5302,
"preview": "# Changelog\n\n## 2.9.2\n\n* Perform all checks before verifying endpoints.\n [#126](https://github.com/openid/ruby-openid/p"
},
{
"path": "CHANGES-2.0.0",
"chars": 1523,
"preview": "\n* API Changes\n * PAPE (Provider Authentication Policy Extension) module\n * Updated extension for specification dr"
},
{
"path": "CHANGES-2.1.0",
"chars": 1523,
"preview": "\n* API Changes\n * PAPE (Provider Authentication Policy Extension) module\n * Updated extension for specification dr"
},
{
"path": "Gemfile",
"chars": 108,
"preview": "source 'https://rubygems.org'\n\n# Specify your gem's dependencies in ruby-openid.gemspec\ngemspec\n\ngem 'rake'\n"
},
{
"path": "INSTALL.md",
"chars": 1016,
"preview": "# Ruby OpenID Library Installation\n\n## Install as a gem\n\n`ruby-openid` is distributed on [RubyGems](https://rubygems.org"
},
{
"path": "LICENSE",
"chars": 11754,
"preview": "The code in lib/hmac/ is Copyright 2001 by Daiki Ueno, and distributed under\nthe terms of the Ruby license. See http://"
},
{
"path": "NOTICE",
"chars": 105,
"preview": "This product includes software developed by JanRain,\navailable from http://github.com/openid/ruby-openid\n"
},
{
"path": "README.md",
"chars": 2488,
"preview": "# Ruby OpenID\n\nA Ruby library for verifying and serving OpenID identities.\n\n[ do"
},
{
"path": "UPGRADE.md",
"chars": 4511,
"preview": "# Upgrading from the OpenID 1.x series library\n\n## Consumer Upgrade\n\nThe flow is largely the same, however there are a n"
},
{
"path": "admin/build-docs",
"chars": 276,
"preview": "#!/usr/bin/env bash\n#\n# Build the HTML documentation for the JanRain PHP OpenID library\n#\n# Usage:\n# build-docs\n#\n# Mus"
},
{
"path": "admin/fixperms",
"chars": 224,
"preview": "#!/usr/bin/env bash\ncat <<EOF | xargs chmod +x\nadmin/prepare-release\nadmin/build-docs\nadmin/fixperms\nadmin/runtests\nadmi"
},
{
"path": "admin/gettlds.py",
"chars": 1061,
"preview": "\"\"\"\nFetch the current TLD list from the IANA Web site, parse it, and print\nan expression suitable for direct insertion i"
},
{
"path": "admin/graph-require.sh",
"chars": 639,
"preview": "#!/usr/bin/env bash\n\nOUTPUT_FILE=\"deps.png\"\n\nif [ ! \"$1\" ] ; then\n echo \"Usage: graph-require.sh <lib_directory> [outpu"
},
{
"path": "admin/library-name",
"chars": 11,
"preview": "ruby-openid"
},
{
"path": "admin/mkassoc",
"chars": 447,
"preview": "#!/usr/bin/env ruby\n\nrequire \"openid/consumer/associationmanager\"\nrequire \"openid/store/memory\"\n\nstore = OpenID::Store::"
},
{
"path": "admin/prepare-release",
"chars": 342,
"preview": "#!/usr/bin/env bash\n#\n# Prepare this repository for release\n#\n# required tools:\n# rdoc\n# darcs\n\nset -e\n\nHERE=$(readlin"
},
{
"path": "admin/runtests",
"chars": 332,
"preview": "#!/usr/bin/env bash\n\ncase \"$1\" in\n --coverage)\n shift\n\tRUBY=\"rcov --exclude=^lib/hmac/,^admin/ --sort=coverage"
},
{
"path": "examples/README.md",
"chars": 1263,
"preview": "This directory contains several examples that demonstrate use of the\nOpenID library. Make sure you have properly instal"
},
{
"path": "examples/active_record_openid_store/README",
"chars": 1886,
"preview": "=Active Record OpenID Store Plugin\n\nA store is required by an OpenID server and optionally by the consumer\nto store asso"
},
{
"path": "examples/active_record_openid_store/XXX_add_open_id_store_to_db.rb",
"chars": 830,
"preview": "# Use this migration to create the tables for the ActiveRecord store\nclass AddOpenIdStoreToDb < ActiveRecord::Migration\n"
},
{
"path": "examples/active_record_openid_store/XXX_upgrade_open_id_store.rb",
"chars": 772,
"preview": "# Use this migration to upgrade the old 1.1 ActiveRecord store schema\n# to the new 2.0 schema.\nclass UpgradeOpenIdStore "
},
{
"path": "examples/active_record_openid_store/init.rb",
"chars": 131,
"preview": "# might using the ruby-openid gem\nbegin\n require 'rubygems'\nrescue LoadError\n nil\nend\nrequire 'openid'\nrequire 'openid"
},
{
"path": "examples/active_record_openid_store/lib/association.rb",
"chars": 236,
"preview": "require 'openid/association'\nrequire 'time'\n\nclass Association < ActiveRecord::Base\n set_table_name 'open_id_associatio"
},
{
"path": "examples/active_record_openid_store/lib/nonce.rb",
"chars": 71,
"preview": "class Nonce < ActiveRecord::Base\n set_table_name 'open_id_nonces'\nend\n"
},
{
"path": "examples/active_record_openid_store/lib/open_id_setting.rb",
"chars": 83,
"preview": "class OpenIdSetting < ActiveRecord::Base\n \n validates_uniqueness_of :setting\nend\n"
},
{
"path": "examples/active_record_openid_store/lib/openid_ar_store.rb",
"chars": 1778,
"preview": "require 'association'\nrequire 'nonce'\nrequire 'openid/store/interface'\n\n# not in OpenID module to avoid namespace confli"
},
{
"path": "examples/active_record_openid_store/test/store_test.rb",
"chars": 7318,
"preview": "$:.unshift(File.dirname(__FILE__) + '/../lib')\nrequire 'test/unit'\nRAILS_ENV = \"test\"\nrequire File.expand_path(File.join"
},
{
"path": "examples/discover",
"chars": 1194,
"preview": "#!/usr/bin/env ruby\nrequire \"openid/consumer/discovery\"\nrequire 'openid/fetchers'\n\nOpenID::fetcher_use_env_http_proxy\n\n$"
},
{
"path": "examples/rails_openid/Gemfile",
"chars": 820,
"preview": "source 'https://rubygems.org'\n\ngem 'rails', '3.2.13'\n\n# Bundle edge Rails instead:\n# gem 'rails', :git => 'git://github."
},
{
"path": "examples/rails_openid/README",
"chars": 6064,
"preview": "== Welcome to Rails\n\nRails is a web-application and persistence framework that includes everything\nneeded to create data"
},
{
"path": "examples/rails_openid/README.rdoc",
"chars": 9220,
"preview": "== Welcome to Rails\n\nRails is a web-application framework that includes everything needed to create\ndatabase-backed web "
},
{
"path": "examples/rails_openid/Rakefile",
"chars": 276,
"preview": "#!/usr/bin/env rake\n# Add your own tasks in files placed in lib/tasks ending in .rake,\n# for example lib/tasks/capistran"
},
{
"path": "examples/rails_openid/app/assets/javascripts/application.js",
"chars": 641,
"preview": "// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//"
},
{
"path": "examples/rails_openid/app/assets/stylesheets/application.css",
"chars": 546,
"preview": "/*\n * This is a manifest file that'll be compiled into application.css, which will include all the files\n * listed below"
},
{
"path": "examples/rails_openid/app/controllers/application_controller.rb",
"chars": 80,
"preview": "class ApplicationController < ActionController::Base\n protect_from_forgery\nend\n"
},
{
"path": "examples/rails_openid/app/controllers/consumer_controller.rb",
"chars": 4272,
"preview": "require 'pathname'\n\nrequire \"openid\"\nrequire 'openid/extensions/sreg'\nrequire 'openid/extensions/pape'\nrequire 'openid/s"
},
{
"path": "examples/rails_openid/app/controllers/login_controller.rb",
"chars": 1248,
"preview": "# Controller for handling the login, logout process for \"users\" of our\n# little server. Users have no password. This i"
},
{
"path": "examples/rails_openid/app/controllers/server_controller.rb",
"chars": 6586,
"preview": "require 'pathname'\n\nrequire \"openid\"\nrequire \"openid/consumer/discovery\"\nrequire 'openid/extensions/sreg'\nrequire 'openi"
},
{
"path": "examples/rails_openid/app/helpers/application_helper.rb",
"chars": 29,
"preview": "module ApplicationHelper\nend\n"
},
{
"path": "examples/rails_openid/app/helpers/login_helper.rb",
"chars": 23,
"preview": "module LoginHelper\nend\n"
},
{
"path": "examples/rails_openid/app/helpers/server_helper.rb",
"chars": 118,
"preview": "\nmodule ServerHelper\n\n def url_for_user\n url_for :controller => 'user', :action => session[:username]\n end\n\nend\n\n"
},
{
"path": "examples/rails_openid/app/mailers/.gitkeep",
"chars": 0,
"preview": ""
},
{
"path": "examples/rails_openid/app/models/.gitkeep",
"chars": 0,
"preview": ""
},
{
"path": "examples/rails_openid/app/views/consumer/index.html.erb",
"chars": 2379,
"preview": "<html>\n<head>\n<title>Rails OpenID Example Relying Party</title>\n</head>\n <style type=\"text/css\">\n * {\n font"
},
{
"path": "examples/rails_openid/app/views/layouts/server.html.erb",
"chars": 1488,
"preview": "<html>\n <head><title>OpenID Server Example</title>\n <%#= csrf_meta_tags %>\n </head>\n <style type=\"text/css\">\n *"
},
{
"path": "examples/rails_openid/app/views/login/index.html.erb",
"chars": 1800,
"preview": "\n\n<% if session[:username].nil? %>\n\n<div id=\"login-form\">\n <form method=\"get\" action=\"<%= url_for :controller => 'login"
},
{
"path": "examples/rails_openid/app/views/server/decide.html.erb",
"chars": 808,
"preview": "<form method=\"post\" action=\"<%= url_for :controller => 'server', :action => 'decision' %>\">\n <input type=\"hidden\" name="
},
{
"path": "examples/rails_openid/config/application.rb",
"chars": 2816,
"preview": "require File.expand_path('../boot', __FILE__)\n\nrequire 'rails/all'\n\nif defined?(Bundler)\n # If you precompile assets be"
},
{
"path": "examples/rails_openid/config/boot.rb",
"chars": 191,
"preview": "require 'rubygems'\n\n# Set up gems listed in the Gemfile.\nENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __F"
},
{
"path": "examples/rails_openid/config/database.yml",
"chars": 576,
"preview": "# SQLite version 3.x\n# gem install sqlite3\n#\n# Ensure the SQLite 3 gem is defined in your Gemfile\n# gem 'sqlite3'\n"
},
{
"path": "examples/rails_openid/config/environment.rb",
"chars": 155,
"preview": "# Load the rails application\nrequire File.expand_path('../application', __FILE__)\n\n# Initialize the rails application\nRa"
},
{
"path": "examples/rails_openid/config/environments/development.rb",
"chars": 1378,
"preview": "RailsOpenid::Application.configure do\n # Settings specified here will take precedence over those in config/application."
},
{
"path": "examples/rails_openid/config/environments/production.rb",
"chars": 2485,
"preview": "RailsOpenid::Application.configure do\n # Settings specified here will take precedence over those in config/application."
},
{
"path": "examples/rails_openid/config/environments/test.rb",
"chars": 1531,
"preview": "RailsOpenid::Application.configure do\n # Settings specified here will take precedence over those in config/application."
},
{
"path": "examples/rails_openid/config/initializers/backtrace_silencers.rb",
"chars": 404,
"preview": "# Be sure to restart your server when you modify this file.\n\n# You can add backtrace silencers for libraries that you're"
},
{
"path": "examples/rails_openid/config/initializers/inflections.rb",
"chars": 533,
"preview": "# Be sure to restart your server when you modify this file.\n\n# Add new inflection rules using the following format\n# (al"
},
{
"path": "examples/rails_openid/config/initializers/mime_types.rb",
"chars": 205,
"preview": "# Be sure to restart your server when you modify this file.\n\n# Add new mime types for use in respond_to blocks:\n# Mime::"
},
{
"path": "examples/rails_openid/config/initializers/rails_root.rb",
"chars": 26,
"preview": "::RAILS_ROOT = Rails.root\n"
},
{
"path": "examples/rails_openid/config/initializers/secret_token.rb",
"chars": 502,
"preview": "# Be sure to restart your server when you modify this file.\n\n# Your secret key for verifying the integrity of signed coo"
},
{
"path": "examples/rails_openid/config/initializers/session_store.rb",
"chars": 429,
"preview": "# Be sure to restart your server when you modify this file.\n\nRailsOpenid::Application.config.session_store :cookie_store"
},
{
"path": "examples/rails_openid/config/initializers/wrap_parameters.rb",
"chars": 468,
"preview": "# Be sure to restart your server when you modify this file.\n#\n# This file contains settings for ActionController::Params"
},
{
"path": "examples/rails_openid/config/locales/en.yml",
"chars": 214,
"preview": "# Sample localization file for English. Add more files in this directory for other locales.\n# See https://github.com/sve"
},
{
"path": "examples/rails_openid/config/routes.rb",
"chars": 2312,
"preview": "RailsOpenid::Application.routes.draw do\n root :controller => 'login', :action => :index\n match 'server/xrds', :control"
},
{
"path": "examples/rails_openid/config.ru",
"chars": 161,
"preview": "# This file is used by Rack-based servers to start the application.\n\nrequire ::File.expand_path('../config/environment',"
},
{
"path": "examples/rails_openid/db/development.sqlite3",
"chars": 0,
"preview": ""
},
{
"path": "examples/rails_openid/db/seeds.rb",
"chars": 355,
"preview": "# This file should contain all the record creation needed to seed the database with its default values.\n# The data can t"
},
{
"path": "examples/rails_openid/lib/assets/.gitkeep",
"chars": 0,
"preview": ""
},
{
"path": "examples/rails_openid/lib/tasks/.gitkeep",
"chars": 0,
"preview": ""
},
{
"path": "examples/rails_openid/log/.gitkeep",
"chars": 0,
"preview": ""
},
{
"path": "examples/rails_openid/log/development.log",
"chars": 182782,
"preview": "Connecting to database specified by database.yml\n\n\nStarted GET \"/consumer\" for 127.0.0.1 at Sun Mar 31 05:22:11 -0700 20"
},
{
"path": "examples/rails_openid/public/404.html",
"chars": 728,
"preview": "<!DOCTYPE html>\n<html>\n<head>\n <title>The page you were looking for doesn't exist (404)</title>\n <style type=\"text/css"
},
{
"path": "examples/rails_openid/public/422.html",
"chars": 711,
"preview": "<!DOCTYPE html>\n<html>\n<head>\n <title>The change you wanted was rejected (422)</title>\n <style type=\"text/css\">\n bo"
},
{
"path": "examples/rails_openid/public/500.html",
"chars": 643,
"preview": "<!DOCTYPE html>\n<html>\n<head>\n <title>We're sorry, but something went wrong (500)</title>\n <style type=\"text/css\">\n "
},
{
"path": "examples/rails_openid/public/dispatch.cgi",
"chars": 499,
"preview": "#!/usr/bin/ruby1.8\n\n#!/usr/local/bin/ruby\n\nrequire File.dirname(__FILE__) + \"/../config/environment\" unless defined?(RAI"
},
{
"path": "examples/rails_openid/public/dispatch.fcgi",
"chars": 881,
"preview": "#!/usr/bin/ruby1.8\n\n#!/usr/local/bin/ruby\n#\n# You may specify the path to the FastCGI crash log (a log of unhandled\n# ex"
},
{
"path": "examples/rails_openid/public/dispatch.rb",
"chars": 499,
"preview": "#!/usr/bin/ruby1.8\n\n#!/usr/local/bin/ruby\n\nrequire File.dirname(__FILE__) + \"/../config/environment\" unless defined?(RAI"
},
{
"path": "examples/rails_openid/public/javascripts/application.js",
"chars": 148,
"preview": "// Place your application-specific JavaScript functions and classes here\n// This file is automatically included by javas"
},
{
"path": "examples/rails_openid/public/javascripts/controls.js",
"chars": 34716,
"preview": "// Copyright (c) 2005-2008 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)\n// (c) 2005-2008 Ivan Kr"
},
{
"path": "examples/rails_openid/public/javascripts/dragdrop.js",
"chars": 31103,
"preview": "// Copyright (c) 2005-2008 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)\n// (c) 2005-2008 Sammi W"
},
{
"path": "examples/rails_openid/public/javascripts/effects.js",
"chars": 38675,
"preview": "// Copyright (c) 2005-2008 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)\n// Contributors:\n// Justin Palmer"
},
{
"path": "examples/rails_openid/public/javascripts/prototype.js",
"chars": 129738,
"preview": "/* Prototype JavaScript framework, version 1.6.0.3\n * (c) 2005-2008 Sam Stephenson\n *\n * Prototype is freely distribu"
},
{
"path": "examples/rails_openid/public/robots.txt",
"chars": 204,
"preview": "# See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file\n#\n# To ban all spide"
},
{
"path": "examples/rails_openid/script/rails",
"chars": 295,
"preview": "#!/usr/bin/env ruby\n# This command will automatically be run when you run \"rails\" with Rails 3 gems installed from the r"
},
{
"path": "examples/rails_openid/test/fixtures/.gitkeep",
"chars": 0,
"preview": ""
},
{
"path": "examples/rails_openid/test/functional/.gitkeep",
"chars": 0,
"preview": ""
},
{
"path": "examples/rails_openid/test/functional/login_controller_test.rb",
"chars": 478,
"preview": "require File.dirname(__FILE__) + '/../test_helper'\nrequire 'login_controller'\n\n# Re-raise errors caught by the controlle"
},
{
"path": "examples/rails_openid/test/functional/server_controller_test.rb",
"chars": 482,
"preview": "require File.dirname(__FILE__) + '/../test_helper'\nrequire 'server_controller'\n\n# Re-raise errors caught by the controll"
},
{
"path": "examples/rails_openid/test/integration/.gitkeep",
"chars": 0,
"preview": ""
},
{
"path": "examples/rails_openid/test/performance/browsing_test.rb",
"chars": 370,
"preview": "require 'test_helper'\nrequire 'rails/performance_test_help'\n\nclass BrowsingTest < ActionDispatch::PerformanceTest\n # Re"
},
{
"path": "examples/rails_openid/test/test_helper.rb",
"chars": 454,
"preview": "ENV[\"RAILS_ENV\"] = \"test\"\nrequire File.expand_path('../../config/environment', __FILE__)\nrequire 'rails/test_help'\n\nclas"
},
{
"path": "examples/rails_openid/test/unit/.gitkeep",
"chars": 0,
"preview": ""
},
{
"path": "lib/hmac/hmac.rb",
"chars": 2741,
"preview": "# Copyright (C) 2001 Daiki Ueno <ueno@unixuser.org>\n# This library is distributed under the terms of the Ruby license.\n"
},
{
"path": "lib/hmac/sha1.rb",
"chars": 212,
"preview": "require 'hmac/hmac'\nrequire 'digest/sha1'\n\nmodule HMAC\n class SHA1 < Base\n def initialize(key = nil)\n super(Dig"
},
{
"path": "lib/hmac/sha2.rb",
"chars": 534,
"preview": "require 'hmac/hmac'\nrequire 'digest/sha2'\n\nmodule HMAC\n class SHA256 < Base\n def initialize(key = nil)\n super(D"
},
{
"path": "lib/openid/association.rb",
"chars": 7534,
"preview": "require \"openid/kvform\"\nrequire \"openid/util\"\nrequire \"openid/cryptutil\"\nrequire \"openid/message\"\n\nmodule OpenID\n\n def "
},
{
"path": "lib/openid/consumer/associationmanager.rb",
"chars": 13074,
"preview": "require \"openid/dh\"\nrequire \"openid/util\"\nrequire \"openid/kvpost\"\nrequire \"openid/cryptutil\"\nrequire \"openid/protocolerr"
},
{
"path": "lib/openid/consumer/checkid_request.rb",
"chars": 7372,
"preview": "require \"openid/message\"\nrequire \"openid/util\"\n\nmodule OpenID\n class Consumer\n # An object that holds the state nece"
},
{
"path": "lib/openid/consumer/discovery.rb",
"chars": 15900,
"preview": "# Functions to discover OpenID endpoints from identifiers.\n\nrequire 'uri'\nrequire 'openid/util'\nrequire 'openid/fetchers"
},
{
"path": "lib/openid/consumer/discovery_manager.rb",
"chars": 3658,
"preview": "module OpenID\n class Consumer\n\n # A set of discovered services, for tracking which providers have\n # been attempt"
},
{
"path": "lib/openid/consumer/html_parse.rb",
"chars": 3613,
"preview": "require \"openid/yadis/htmltokenizer\"\n\nmodule OpenID\n\n # Stuff to remove before we start looking for tags\n REMOVED_RE ="
},
{
"path": "lib/openid/consumer/idres.rb",
"chars": 18928,
"preview": "require \"openid/message\"\nrequire \"openid/protocolerror\"\nrequire \"openid/kvpost\"\nrequire \"openid/consumer/discovery\"\nrequ"
},
{
"path": "lib/openid/consumer/responses.rb",
"chars": 4549,
"preview": "module OpenID\n class Consumer\n # Code returned when either the of the\n # OpenID::OpenIDConsumer.begin_auth or Ope"
},
{
"path": "lib/openid/consumer/session.rb",
"chars": 775,
"preview": "module OpenID\n class Consumer\n class Session\n def initialize(session, decode_klass = nil)\n @session = se"
},
{
"path": "lib/openid/consumer.rb",
"chars": 15995,
"preview": "require \"openid/consumer/idres.rb\"\nrequire \"openid/consumer/checkid_request.rb\"\nrequire \"openid/consumer/associationmana"
},
{
"path": "lib/openid/cryptutil.rb",
"chars": 3063,
"preview": "require \"openid/util\"\nrequire \"digest/sha1\"\nrequire \"digest/sha2\"\nbegin\n require \"openssl\"\nrescue LoadError\n begin\n "
},
{
"path": "lib/openid/dh.rb",
"chars": 2726,
"preview": "require \"openid/util\"\nrequire \"openid/cryptutil\"\n\nmodule OpenID\n\n # Encapsulates a Diffie-Hellman key exchange. This c"
},
{
"path": "lib/openid/extension.rb",
"chars": 1150,
"preview": "require 'openid/message'\n\nmodule OpenID\n # An interface for OpenID extensions.\n class Extension < Object\n\n def init"
},
{
"path": "lib/openid/extensions/ax.rb",
"chars": 17736,
"preview": "# Implements the OpenID attribute exchange specification, version 1.0\n\nrequire 'openid/extension'\nrequire 'openid/trustr"
},
{
"path": "lib/openid/extensions/oauth.rb",
"chars": 2542,
"preview": "# An implementation of the OpenID OAuth Extension\n# Extension 1.0\n# see: http://openid.net/specs/\n\nrequire 'openid/exten"
},
{
"path": "lib/openid/extensions/pape.rb",
"chars": 6083,
"preview": "# An implementation of the OpenID Provider Authentication Policy\n# Extension 1.0\n# see: http://openid.net/specs/\n\nrequir"
},
{
"path": "lib/openid/extensions/sreg.rb",
"chars": 9598,
"preview": "require 'openid/extension'\nrequire 'openid/util'\nrequire 'openid/message'\n\nmodule OpenID\n module SReg\n DATA_FIELDS ="
},
{
"path": "lib/openid/extensions/ui.rb",
"chars": 1366,
"preview": "# An implementation of the OpenID User Interface Extension 1.0 - DRAFT 0.5\n# see: http://svn.openid.net/repos/specificat"
},
{
"path": "lib/openid/fetchers.rb",
"chars": 7635,
"preview": "require 'net/http'\nrequire 'openid/util'\nrequire 'openid/version'\n\nbegin\n require 'net/https'\nrescue LoadError\n OpenID"
},
{
"path": "lib/openid/kvform.rb",
"chars": 3340,
"preview": "\nmodule OpenID\n\n class KVFormError < Exception\n end\n\n module Util\n\n def Util.seq_to_kv(seq, strict=false)\n # "
},
{
"path": "lib/openid/kvpost.rb",
"chars": 1657,
"preview": "require \"openid/message\"\nrequire \"openid/fetchers\"\n\nmodule OpenID\n # Exception that is raised when the server returns a"
},
{
"path": "lib/openid/message.rb",
"chars": 16514,
"preview": "require 'openid/util'\nrequire 'openid/kvform'\n\nmodule OpenID\n\n IDENTIFIER_SELECT = 'http://specs.openid.net/auth/2.0/id"
},
{
"path": "lib/openid/protocolerror.rb",
"chars": 120,
"preview": "require 'openid/util'\n\nmodule OpenID\n\n # An error in the OpenID protocol\n class ProtocolError < OpenIDError\n end\nend\n"
},
{
"path": "lib/openid/server.rb",
"chars": 50910,
"preview": "\nrequire 'openid/cryptutil'\nrequire 'openid/util'\nrequire 'openid/dh'\nrequire 'openid/store/nonce'\nrequire 'openid/trust"
},
{
"path": "lib/openid/store/filesystem.rb",
"chars": 7201,
"preview": "require 'fileutils'\nrequire 'pathname'\nrequire 'tempfile'\n\nrequire 'openid/util'\nrequire 'openid/store/interface'\nrequir"
},
{
"path": "lib/openid/store/interface.rb",
"chars": 3053,
"preview": "require 'openid/util'\n\nmodule OpenID\n\n # Stores for Associations and nonces. Used by both the Consumer and\n # the Serv"
},
{
"path": "lib/openid/store/memcache.rb",
"chars": 3677,
"preview": "require 'openid/util'\nrequire 'openid/store/interface'\nrequire 'openid/store/nonce'\nrequire 'time'\n\nmodule OpenID\n modu"
},
{
"path": "lib/openid/store/memory.rb",
"chars": 2123,
"preview": "require 'openid/store/interface'\nmodule OpenID\n module Store\n # An in-memory implementation of Store. This class is"
},
{
"path": "lib/openid/store/nonce.rb",
"chars": 1974,
"preview": "require 'openid/cryptutil'\nrequire 'date'\nrequire 'time'\n\nmodule OpenID\n module Nonce\n DEFAULT_SKEW = 60*60*5\n TI"
},
{
"path": "lib/openid/trustroot.rb",
"chars": 10902,
"preview": "require 'uri'\nrequire 'openid/urinorm'\n\nmodule OpenID\n\n class RealmVerificationRedirected < Exception\n # Attempting "
},
{
"path": "lib/openid/urinorm.rb",
"chars": 1814,
"preview": "require 'uri'\n\nmodule OpenID\n\n module URINorm\n public\n def URINorm.urinorm(uri)\n uri = URI.parse(uri)\n\n "
},
{
"path": "lib/openid/util.rb",
"chars": 2802,
"preview": "require \"cgi\"\nrequire \"uri\"\nrequire \"logger\"\n\n# See OpenID::Consumer or OpenID::Server modules, as well as the store cla"
},
{
"path": "lib/openid/version.rb",
"chars": 38,
"preview": "module OpenID\n VERSION = \"2.9.2\"\nend\n"
},
{
"path": "lib/openid/yadis/accept.rb",
"chars": 3874,
"preview": "module OpenID\n\n module Yadis\n\n # Generate an accept header value\n #\n # [str or (str, float)] -> str\n def se"
},
{
"path": "lib/openid/yadis/constants.rb",
"chars": 632,
"preview": "\nrequire 'openid/yadis/accept'\n\nmodule OpenID\n\n module Yadis\n\n YADIS_HEADER_NAME = 'X-XRDS-Location'\n YADIS_CONTE"
},
{
"path": "lib/openid/yadis/discovery.rb",
"chars": 4716,
"preview": "\nrequire 'openid/util'\nrequire 'openid/fetchers'\nrequire 'openid/yadis/constants'\nrequire 'openid/yadis/parsehtml'\n\nmodu"
},
{
"path": "lib/openid/yadis/filters.rb",
"chars": 6814,
"preview": "# This file contains functions and classes used for extracting\n# endpoint information out of a Yadis XRD file using the "
},
{
"path": "lib/openid/yadis/htmltokenizer.rb",
"chars": 7589,
"preview": "# = HTMLTokenizer\n#\n# Author:: Ben Giddings (mailto:bg-rubyforge@infofiend.com)\n# Copyright:: Copyright (c) 2004 Ben"
},
{
"path": "lib/openid/yadis/parsehtml.rb",
"chars": 1358,
"preview": "require \"openid/yadis/htmltokenizer\"\nrequire 'cgi'\n\nmodule OpenID\n module Yadis\n def Yadis.html_yadis_location(html)"
},
{
"path": "lib/openid/yadis/services.rb",
"chars": 1329,
"preview": "\nrequire 'openid/yadis/filters'\nrequire 'openid/yadis/discovery'\nrequire 'openid/yadis/xrds'\n\nmodule OpenID\n module Yad"
},
{
"path": "lib/openid/yadis/xrds.rb",
"chars": 4126,
"preview": "require 'rexml/document'\nrequire 'rexml/element'\nrequire 'rexml/xpath'\n\nrequire 'openid/yadis/xri'\n\nmodule OpenID\n modu"
},
{
"path": "lib/openid/yadis/xri.rb",
"chars": 2596,
"preview": "require 'openid/fetchers'\n\nmodule OpenID\n module Yadis\n module XRI\n\n # The '(' is for cross-reference authoriti"
},
{
"path": "lib/openid/yadis/xrires.rb",
"chars": 2569,
"preview": "require \"cgi\"\nrequire \"openid/yadis/xri\"\nrequire \"openid/yadis/xrds\"\nrequire \"openid/fetchers\"\n\nmodule OpenID\n\n module "
},
{
"path": "lib/openid.rb",
"chars": 675,
"preview": "# Copyright 2006-2007 JanRain, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you\n# may not us"
},
{
"path": "lib/ruby-openid.rb",
"chars": 17,
"preview": "require 'openid'\n"
},
{
"path": "ruby-openid.gemspec",
"chars": 929,
"preview": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/openid/version', __FILE__)\n\nGem::Specification.new do |s|\n s"
},
{
"path": "setup.rb",
"chars": 34681,
"preview": "#\n# setup.rb\n#\n# Copyright (c) 2000-2005 Minero Aoki\n#\n# This program is free software.\n# You can distribute/modify this"
},
{
"path": "test/data/accept.txt",
"chars": 3384,
"preview": "# Accept: [Accept: header value from RFC2616,\n# http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html]\n# Available:"
},
{
"path": "test/data/dh.txt",
"chars": 17931,
"preview": "130706940119084053627151828062879423433929180135817317038378606310097533503449582079984816816837125851552273641820339909"
},
{
"path": "test/data/example-xrds.xml",
"chars": 307,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!-- Sample XRDS file at: NAME -->\n<xrds:XRDS\n xmlns:xrds=\"xri://$xrds\"\n xm"
},
{
"path": "test/data/linkparse.txt",
"chars": 7826,
"preview": "Num Tests: 72\n\nOpenID link parsing test cases\nCopyright (C) 2005-2008, JanRain, Inc.\nSee COPYING for license information"
},
{
"path": "test/data/n2b64",
"chars": 70604,
"preview": "AA== 0\nAQ== 1\nAg== 2\nAw== 3\nBA== 4\nBQ== 5\nBg== 6\nBw== 7\nCA== 8\nCQ== 9\nCg== 10\nCw== 11\nDA== 12\nDQ== 13\nDg== 14\nDw== 15\nEA"
},
{
"path": "test/data/test1-discover.txt",
"chars": 2138,
"preview": "equiv\nStatus: 200 OK\nContent-Type: text/html\n\n<html>\n<head>\n<meta http-equiv=\"YADIS_HEADER\" content=\"URL_BASE/xrds\">\n<ti"
},
{
"path": "test/data/test1-parsehtml.txt",
"chars": 3522,
"preview": "found\n<!-- minimal well-formed success case -->\n<html><head><meta http-equiv=\"X-XRDS-Location\" content=\"found\"></head></"
},
{
"path": "test/data/test_discover/malformed_meta_tag.html",
"chars": 423,
"preview": "<html>\n<head>\n<title />\n\n<link rel=\"openid.server\"\n\thref=\"http://www.myopenid.com/server\" />\n<link rel=\"openid.delegate\""
},
{
"path": "test/data/test_discover/openid.html",
"chars": 375,
"preview": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\""
},
{
"path": "test/data/test_discover/openid2.html",
"chars": 379,
"preview": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\""
},
{
"path": "test/data/test_discover/openid2_xrds.xml",
"chars": 360,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<xrds:XRDS xmlns:xrds=\"xri://$xrds\"\n xmlns=\"xri://$xrd*($v*2.0)\"\n "
},
{
"path": "test/data/test_discover/openid2_xrds_no_local_id.xml",
"chars": 307,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<xrds:XRDS xmlns:xrds=\"xri://$xrds\"\n xmlns=\"xri://$xrd*($v*2.0)\"\n "
},
{
"path": "test/data/test_discover/openid_1_and_2.html",
"chars": 409,
"preview": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\""
},
{
"path": "test/data/test_discover/openid_1_and_2_xrds.xml",
"chars": 532,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<xrds:XRDS xmlns:xrds=\"xri://$xrds\"\n xmlns=\"xri://$xrd*($v*2.0)\"\n "
},
{
"path": "test/data/test_discover/openid_1_and_2_xrds_bad_delegate.xml",
"chars": 585,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<xrds:XRDS xmlns:xrds=\"xri://$xrds\"\n xmlns=\"xri://$xrd*($v*2.0)\"\n "
},
{
"path": "test/data/test_discover/openid_and_yadis.html",
"chars": 457,
"preview": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\""
},
{
"path": "test/data/test_discover/openid_no_delegate.html",
"chars": 305,
"preview": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\""
},
{
"path": "test/data/test_discover/openid_utf8.html",
"chars": 377,
"preview": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\""
},
{
"path": "test/data/test_discover/yadis_0entries.xml",
"chars": 334,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<xrds:XRDS xmlns:xrds=\"xri://$xrds\"\n xmlns=\"xri://$xrd*($v*2.0)\"\n "
},
{
"path": "test/data/test_discover/yadis_2_bad_local_id.xml",
"chars": 473,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<xrds:XRDS xmlns:xrds=\"xri://$xrds\"\n xmlns=\"xri://$xrd*($v*2.0)\"\n "
},
{
"path": "test/data/test_discover/yadis_2entries_delegate.xml",
"chars": 684,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<xrds:XRDS xmlns:xrds=\"xri://$xrds\"\n xmlns=\"xri://$xrd*($v*2.0)\"\n "
},
{
"path": "test/data/test_discover/yadis_2entries_idp.xml",
"chars": 633,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<xrds:XRDS xmlns:xrds=\"xri://$xrds\"\n xmlns=\"xri://$xrd*($v*2.0)\"\n "
},
{
"path": "test/data/test_discover/yadis_another_delegate.xml",
"chars": 418,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<xrds:XRDS xmlns:xrds=\"xri://$xrds\"\n xmlns=\"xri://$xrd*($v*2.0)\"\n "
},
{
"path": "test/data/test_discover/yadis_idp.xml",
"chars": 361,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<xrds:XRDS xmlns:xrds=\"xri://$xrds\"\n xmlns=\"xri://$xrd*($v*2.0)\"\n "
},
{
"path": "test/data/test_discover/yadis_idp_delegate.xml",
"chars": 416,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<xrds:XRDS xmlns:xrds=\"xri://$xrds\"\n xmlns=\"xri://$xrd*($v*2.0)\"\n "
},
{
"path": "test/data/test_discover/yadis_no_delegate.xml",
"chars": 296,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<xrds:XRDS xmlns:xrds=\"xri://$xrds\"\n xmlns=\"xri://$xrd*($v*2.0)\"\n "
},
{
"path": "test/data/test_xrds/=j3h.2007.11.14.xrds",
"chars": 908,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<XRDS ref=\"xri://=j3h\" xmlns=\"xri://$xrds\">\n <XRD xmlns=\"xri://$xrd*($v*2.0)\">\n "
},
{
"path": "test/data/test_xrds/README",
"chars": 534,
"preview": "delegated-20060809.xrds - results from proxy.xri.net, determined by \n Drummond and Kevin "
},
{
"path": "test/data/test_xrds/delegated-20060809-r1.xrds",
"chars": 1274,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<XRDS ref=\"xri://@ootao*test1\" xmlns=\"xri://$xrds\">\n <XRD xmlns=\"xri://$xrd*($v*2"
},
{
"path": "test/data/test_xrds/delegated-20060809-r2.xrds",
"chars": 1302,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<XRDS ref=\"xri://@ootao*test1\" xmlns=\"xri://$xrds\">\n <XRD xmlns=\"xri://$xrd*($v*2"
},
{
"path": "test/data/test_xrds/delegated-20060809.xrds",
"chars": 1250,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<XRDS ref=\"xri://@ootao*test1\" xmlns=\"xri://$xrds\">\n <XRD xmlns=\"xri://$xrd*($v*2"
},
{
"path": "test/data/test_xrds/no-xrd.xml",
"chars": 221,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<xrds:XRDS\n xmlns:xrds=\"xri://$xrds\"\n xmlns:openid=\"http://openid.net/xmlns"
},
{
"path": "test/data/test_xrds/not-xrds.xml",
"chars": 47,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<x></x>\n"
},
{
"path": "test/data/test_xrds/prefixsometimes.xrds",
"chars": 1308,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<XRDS ref=\"xri://@ootao*test1\" xmlns=\"xri://$xrds\">\n <XRD xmlns=\"xri://$xrd*($v*2"
},
{
"path": "test/data/test_xrds/ref.xrds",
"chars": 4291,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<XRDS ref=\"xri://@ootao*test.ref\" xmlns=\"xri://$xrds\">\n <XRD xmlns=\"xri://$xrd*($"
},
{
"path": "test/data/test_xrds/sometimesprefix.xrds",
"chars": 1308,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<XRDS ref=\"xri://@ootao*test1\" xmlns=\"xri://$xrds\">\n <XRD xmlns=\"xri://$xrd*($v*2"
},
{
"path": "test/data/test_xrds/spoof1.xrds",
"chars": 692,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<XRDS ref=\"xri://=keturn*isDrummond\" xmlns=\"xri://$xrds\">\n <XRD xmlns=\"xri://$xrd"
},
{
"path": "test/data/test_xrds/spoof2.xrds",
"chars": 698,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<XRDS ref=\"xri://=keturn*isDrummond\" xmlns=\"xri://$xrds\">\n <XRD xmlns=\"xri://$xrd"
},
{
"path": "test/data/test_xrds/spoof3.xrds",
"chars": 1036,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<XRDS ref=\"xri://=keturn*isDrummond\" xmlns=\"xri://$xrds\">\n <XRD xmlns=\"xri://$xrd"
},
{
"path": "test/data/test_xrds/status222.xrds",
"chars": 292,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<XRDS ref=\"xri://=x\" xmlns=\"xri://$xrds\">\n <XRD xmlns=\"xri://$xrd*($v*2.0)\">\n <Q"
},
{
"path": "test/data/test_xrds/subsegments.xrds",
"chars": 2418,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<XRDS ref=\"xri://=nishitani*masaki\" xmlns=\"xri://$xrds\">\n <XRD xmlns=\"xri://$xrd*"
},
{
"path": "test/data/test_xrds/valid-populated-xrds.xml",
"chars": 1230,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<xrds:XRDS\n xmlns:xrds=\"xri://$xrds\"\n xmlns:openid=\"http://openid.net/xmlns"
},
{
"path": "test/data/trustroot.txt",
"chars": 5935,
"preview": "========================================\nTrust root parsing checking\n========================================\n\n---------"
},
{
"path": "test/data/urinorm.txt",
"chars": 1615,
"preview": "Already normal form\nhttp://example.com/\nhttp://example.com/\n\nAdd a trailing slash\nhttp://example.com\nhttp://example.com/"
},
{
"path": "test/discoverdata.rb",
"chars": 4123,
"preview": "\nrequire 'uri'\nrequire 'openid/yadis/constants'\nrequire 'openid/yadis/discovery'\nrequire 'openid/util'\n\nmodule OpenID\n\n "
},
{
"path": "test/test_accept.rb",
"chars": 4337,
"preview": "require 'minitest/autorun'\nrequire 'testutil'\nrequire 'openid/yadis/accept'\nrequire 'openid/util'\n\nmodule OpenID\n\n clas"
},
{
"path": "test/test_association.rb",
"chars": 9222,
"preview": "require \"minitest/autorun\"\nrequire \"openid/association\"\nrequire \"openid/protocolerror\"\n\nmodule OpenID\n class Associatio"
},
{
"path": "test/test_associationmanager.rb",
"chars": 29939,
"preview": "require \"minitest/autorun\"\nrequire \"testutil\"\nrequire \"openid/consumer/associationmanager\"\nrequire \"openid/association\"\n"
},
{
"path": "test/test_ax.rb",
"chars": 25154,
"preview": "require 'minitest/autorun'\nrequire 'openid/extensions/ax'\nrequire 'openid/message'\nrequire 'openid/consumer/responses'\nr"
},
{
"path": "test/test_checkid_request.rb",
"chars": 9472,
"preview": "require \"minitest/autorun\"\nrequire \"openid/consumer/checkid_request\"\nrequire \"openid/message\"\nrequire \"testutil\"\nrequire"
},
{
"path": "test/test_consumer.rb",
"chars": 8604,
"preview": "require \"minitest/autorun\"\nrequire \"testutil\"\nrequire \"openid/consumer\"\n\nmodule OpenID\n class Consumer\n module TestC"
},
{
"path": "test/test_cryptutil.rb",
"chars": 3228,
"preview": "# coding: ASCII-8BIT\nrequire \"minitest/autorun\"\nrequire \"openid/cryptutil\"\nrequire \"pathname\"\n\nclass CryptUtilTestCase <"
},
{
"path": "test/test_dh.rb",
"chars": 2486,
"preview": "require 'minitest/autorun'\nrequire 'testutil'\nrequire 'openid/dh'\n\nmodule OpenID\n class DiffieHellmanExposed < OpenID::"
},
{
"path": "test/test_discover.rb",
"chars": 24428,
"preview": "require 'minitest/autorun'\nrequire 'testutil'\nrequire 'util'\nrequire 'openid/fetchers'\nrequire 'openid/yadis/discovery'\n"
},
{
"path": "test/test_discovery_manager.rb",
"chars": 7955,
"preview": "require 'minitest/autorun'\nrequire 'openid/consumer'\nrequire 'testutil'\n\nmodule OpenID\n class TestDiscoveredServices < "
},
{
"path": "test/test_extension.rb",
"chars": 1376,
"preview": "require 'minitest/autorun'\nrequire 'openid/extension'\nrequire 'openid/message'\n\nmodule OpenID\n class DummyExtension < O"
}
]
// ... and 26 more files (download for full content)
About this extraction
This page contains the full source code of the openid/ruby-openid GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 226 files (1.3 MB), approximately 394.6k tokens, and a symbol index with 2348 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.