π OpenID
if ci_badges.map(&:color).detect { it != "green"} βοΈ let me know on Discord or RubyForum, as I may have missed the notification.
if ci_badges.map(&:color).all? { it == "green"} ποΈ send money so I can do more of this. FLOSS maintenance is now my full-time job.
I've summarized my thoughts in this blog post.
ruby-openid2 is the protocol library behind the Ruby OpenID stack. It provides consumer and server APIs, discovery, association management, stores, and the SReg, Attribute Exchange, PAPE, OAuth, and UI extensions for OpenID 1.x/2.0.
Use it directly when a framework adapter is not appropriate, or use
rack-openid2 and open_id_authentication for Rack and Rails integration.
This project implements OpenID, not OpenID Connect (OIDC).
π‘ Info you can shake a stick at
| Tokens to Remember |
|
|---|---|
| Works with JRuby |
|
| Works with Truffle Ruby |
|
| Works with MRI Ruby 4 |
|
| Works with MRI Ruby 3 |
|
| Works with MRI Ruby 2 | |
| Support & Community |
|
| Source |
|
| Documentation |
|
| Compliance |
|
| Style |
|
| Maintainer ποΈ |
|
... π |
|
Compatibility
Compatible with MRI Ruby 2.7.0+, and concordant releases of JRuby, and TruffleRuby.
CI workflows and Appraisals are generated for MRI Ruby 2.7.0+.
This test floor is configured by ruby.test_minimum in .kettle-jem.yml and
may be higher than the gem's runtime compatibility floor when legacy Rubies are
not practical for the current toolchain.
The amazing test matrix is powered by the kettle-dev stack.
| Gem | Source | Role | Daily download rank |
|---|---|---|---|
| appraisal2 | GitHub | multi-dependency Appraisal matrix generation | |
| appraisal2-rubocop | GitHub | RuboCop Appraisal generator integration | |
| kettle-dev | GitHub | development, release, and CI workflow tooling | |
| kettle-jem | GitHub | Appraisals & CI workflow templates | |
| kettle-soup-cover | GitHub | SimpleCov coverage policy and reporting | |
| kettle-test | GitHub | standard test runner and coverage harness | |
| rubocop-lts | GitHub | Ruby-version-aware linting | |
| turbo_tests2 | GitHub | parallel test execution |
Federated DVCS
| Federated DVCS Repository | Status | Issues | PRs | Wiki | CI |
|---|---|---|---|---|---|
| π§ͺ ruby-openid/ruby-openid2 on GitLab | The Truth | π | π | π | π Tiny Matrix |
| π§ ruby-openid/ruby-openid2 on CodeBerg | An Ethical Mirror (Donate) | π | π | β | βοΈ No Matrix |
| π ruby-openid/ruby-openid2 on GitHub | Another Mirror | π | π | π | π― Full Matrix |
Available as part of the Tidelift Subscription.
The maintainers of this and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source packages you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact packages you use.
- π‘Subscribe for support guarantees covering all your FLOSS dependencies
- π‘Tidelift is part of Sonar
- π‘Tidelift pays maintainers to maintain the software you depend on!
π@Pointy Haired Boss: An enterprise support subscription is "never gonna let you down", and supports open source maintainers
Alternatively:
β¨ Installation
Install the gem and add to the application's Gemfile by executing:
bundle add ruby-openid2If bundler is not being used to manage dependencies, install the gem by executing:
gem install ruby-openid2βοΈ Configuration
Create an OpenID::Consumer for each request with a session-like object and a
durable store. The session holds the in-progress authentication transaction;
the store holds associations and nonces shared across requests.
require "openid"
require "openid/consumer"
require "openid/store/filesystem"
store = OpenID::Store::Filesystem.new("tmp/openid")
consumer = OpenID::Consumer.new(session, store)OpenID::Store::Memory is useful for tests and one long-running process, but
it is not thread-safe or durable. Use Filesystem, Memcache, or a custom
OpenID::Store implementation for deployments that need state shared across
requests or processes. When serving as an OpenID provider, construct
OpenID::Server::Server with the same kind of durable store and the public
endpoint URL.
π§ Basic Usage
π Security
See SECURITY.md.
π€ Contributing
If you need some ideas of where to help, you could work on adding more code coverage, or if it is already π― (see below) check issues or PRs, or use the gem and think about how it could be better.
We so if you make changes, remember to update it.
See CONTRIBUTING.md for more detailed instructions.
π Release Instructions
See CONTRIBUTING.md.
Code Coverage
πͺ Code of Conduct
Everyone interacting with this project's codebases, issue trackers,
chat rooms and mailing lists agrees to follow the .
π Contributors
Made with contributors-img.
Also see GitLab Contributors: https://gitlab.com/ruby-openid/ruby-openid2/-/graphs/main
π Versioning
This library follows for its public API where practical.
For most applications, prefer the Pessimistic Version Constraint with two digits of precision.
For example:
spec.add_dependency("ruby-openid2", "~> 3.0")Dropping support for a platform can be a breaking change for affected users. If a release changes supported platforms, it should be called out clearly in the changelog and versioned with that impact in mind.
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:
See CHANGELOG.md for a list of releases.
π License
The gem is available under the following licenses: Ruby, [Apache Software License 2.0](https://github.com/ruby-openid/ruby-openid2/blob/main/Apache Software License 2.0.md). See LICENSE.md for details.
If none of the available licenses suit your use case, please contact us to discuss a custom commercial license.
Β© Copyright
See LICENSE.md for the official copyright notice.
- Copyright (c) 2005-2007 tailor
- Copyright (c) 2006 Josh Hoyt
- Copyright (c) 2007-2008 http://j3h.us/
- Copyright (c) 2007-2008 Kevin Turner
- Copyright (c) 2007-2008 tailor
- Copyright (c) 2007-2009 tailor
- Copyright (c) 2008-2010 Carl Howells
- Copyright (c) 2008 tailor
- Copyright (c) 2008 tailor
- Copyright (c) 2010 dbloete
- Copyright (c) 2010 Kouhei Sutou
- Copyright (c) 2010 Lilli
- Copyright (c) 2010 Mike Mell
- Copyright (c) 2011 mcary
- Copyright (c) 2011-2012 nov matake
- Copyright (c) 2011 Steven Davidovitz
- Copyright (c) 2011 Tom Quackenbush
- Copyright (c) 2012 Cal Heldenbrand
- Copyright (c) 2012-2015 Dennis Reimann
- Copyright (c) 2012 grosser
- Copyright (c) 2013 Akira Matsuda
- Copyright (c) 2013 Kendall Buchanan
- Copyright (c) 2013 Kenichi Kamiya
- Copyright (c) 2013 Marcel M. Cary
- Copyright (c) 2013 Mike Dillon
- Copyright (c) 2013, 2019 Tobias Haagen Michaelsen
- Copyright (c) 2013 Zaid Zawaideh
- Copyright (c) 2014 grosser
- Copyright (c) 2014 Ken Dreyer
- Copyright (c) 2014 ppretorius
- Copyright (c) 2014 tsukasaoishi
- Copyright (c) 2014 vivek
- Copyright (c) 2017 Kazuhiro Serizawa
- Copyright (c) 2018 Abraham Sangha
- Copyright (c) 2018 IanAtLooker
- Copyright (c) 2018-2019 Tobias Haagen Michaelsen
- Copyright (c) 2019 Olle Jonsson
- Copyright (c) 2019 Utkarsh Gupta
- Copyright (c) 2019 Vadim Shaulski
- Copyright (c) 2020 Randy Ebersole
- Copyright (c) 2024-2026 Peter H. Boling
π€ A request for help
Maintainers have teeth and need to pay their dentists. After getting laid off in an RIF in March, and encountering difficulty finding a new one, I began spending most of my time building open source tools. I'm hoping to be able to pay for my kids' health insurance this month, so if you value the work I am doing, I need your support. Please consider sponsoring me or the project.
To join the community or get help, use the RubyForum or Discord.
To say "thanks!" βοΈ Join the community or ποΈ send money.
Please give the project a star β β₯.
Many parts of this project are actively managed by a kettle-jem smart template utilizing StructuredMerge.org merge contracts.
Thanks for RTFM. βΊοΈ
| Field | Value |
|---|---|
| Package | ruby-openid2 |
| Description | π A library for consuming and serving OpenID identities. |
| Homepage | https://github.com/ruby-openid/ruby-openid2 |
| Source | https://github.com/ruby-openid/ruby-openid2 |
| License |
Ruby OR Apache Software License 2.0
|
| Funding | https://github.com/sponsors/pboling, https://ko-fi.com/pboling, https://liberapay.com/pboling/donate, https://opencollective.com/ruby-openid, https://thanks.dev/gh/pboling, https://tidelift.com/funding/github/rubygems/ruby-openid2, https://www.buymeacoffee.com/pboling |