A Ruby library for verifying and serving OpenID identities.
- 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
Install the gem and add to the application's Gemfile by executing:
$ bundle add ruby-openid2
If bundler is not being used to manage dependencies, install the gem by executing:
$ gem install ruby-openid2
Versions 3.0.x were released with hard dependencies on the new stand alone gem replacements for the old stdlib gems.
This made it impossible for downstream libraries to make the choice to stay on the old stdlib gems.
As a result, starting with version 3.1.0, they will not be direct dependencies.
See this discussion for more information.
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.
Primary Namespace | OpenID |
---|---|
gem name | ruby-openid2 |
code triage | |
documentation | on Github.com, on rubydoc.info |
expert support | |
... π |
π» π |
Discussion regarding the Ruby OpenID library and other JanRain OpenID libraries takes place on the OpenID mailing list.
Please join this list to discuss, ask implementation questions, report bugs, etc. Also check out the openid channel on the freenode IRC network.
See CONTRIBUTING.md
Made with contributors-img.
Everyone interacting in this project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.
This Library adheres to Semantic Versioning 2.0.0. Violations of this scheme should be reported as bugs. Specifically, if a minor or patch version is released that breaks backward compatibility, a new version should be immediately released that restores compatibility. Breaking changes to the public API will only be introduced with new major versions.
To get a better understanding of how SemVer is intended to work over a project's lifetime, read this article from the creator of SemVer:
As a result of this policy, you can (and should) specify a dependency on these libraries using the Pessimistic Version Constraint with two digits of precision.
For example:
spec.add_dependency("ruby-openid2", "~> 3.0")
See CHANGELOG.md for list of releases.
- Copyright (c) 2006-2012 JanRain, Inc.
- Copyright (c) 2024 Peter H. Boling of Rails Bling
Apache Software License. For more information see the LICENSE file.
You made it to the bottom of the page! If you think maintaining this gem is more difficult than parsing a README, or if you think I've done a bang up job with this gem, please consider supporting my efforts via this link, or one of the others at the head.