if ci_badges.map(&:color).detect { it != "green"} ☝️ let me know, as I may have missed the discord 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.
OAuth 1.0a is an industry-standard protocol for authorization. It is an update to the original OAuth 1.0 protocol, and is used by many popular services.
This RubyGem provides a CLI for OAuth 1.0 or 1.0a clients and servers in Ruby applications.
All dependencies of this gem are signed, so it can be installed with a HighSecurity profile.
| Tokens to Remember | |
|---|---|
| Works with JRuby | |
| Works with Truffle Ruby | |
| Works with MRI Ruby 3 | |
| Works with MRI Ruby 2 | |
| Support & Community | |
| Source | |
| Documentation | |
| Compliance | |
| Style | |
| Maintainer 🎖️ | |
... 💖 |
Compatible with MRI Ruby 2.3.0+, and concordant releases of JRuby, and TruffleRuby.
| 🚚 Amazing test matrix was brought to you by | 🔎 appraisal2 🔎 and the color 💚 green 💚 |
|---|---|
| 👟 Check it out! | ✨ github.com/appraisal-rb/appraisal2 ✨ |
Available as part of the Tidelift Subscription.
Install the gem and add to the application’s Gemfile by executing:
bundle add oauth-tty
If bundler is not being used to manage dependencies, install the gem by executing:
gem install oauth-tty
The oauth-tty gem is a thin CLI over the oauth gem. You supply your consumer credentials, token credentials (when applicable), a target URI, and optional parameters, and the tool signs requests or helps you complete an OAuth 1.0/1.0a 3-legged flow.
What you can configure
| HTTP method: –method GET | POST | PUT | DELETE | … (default: POST) |
| Signature method: –signature-method HMAC-SHA1 | RSA-SHA1 | PLAINTEXT (default: HMAC-SHA1) |
Required inputs (by command)
Authorization endpoints (for oauth authorize)
Providing options
Example options file (oauth.opts)
--consumer-key ck_123
--consumer-secret cs_456
--token at_789
--secret ats_abc
--method GET
--uri https://api.example.com/v1/profile
--parameters foo:bar
--parameters "status=active"
--header
Run with: oauth sign -O oauth.opts
Defaults at a glance
Tips
In a shell run oauth to start the console.
Quick help and version
oauth --help
oauth --version # or oauth -v
Sign a request (minimal) Print just the OAuth signature value for a GET request:
oauth sign \
--consumer-key ck \
--consumer-secret cs \
--token at \
--secret ats \
--method GET \
--uri "https://api.example.com/v1/resource?limit=10"
Sign a request (verbose, header output)
oauth sign \
--consumer-key ck \
--consumer-secret cs \
--token at \
--secret ats \
--method POST \
--uri https://api.example.com/v1/resource \
--parameters "status=active" \
--header \
--verbose
This prints OAuth parameters, normalized parameters, signature base string, Authorization header, and both raw and escaped signatures.
Query a protected resource Performs the signed HTTP request and prints the HTTP status and body.
oauth query \
--consumer-key ck \
--consumer-secret cs \
--token at \
--secret ats \
--method GET \
--uri https://api.example.com/v1/profile \
--parameters "fields=id,name"
Notes:
Start an OAuth 1.0a authorization flow Guides you to obtain an access token and token secret from a provider.
oauth authorize \
--consumer-key ck \
--consumer-secret cs \
--request-token-url https://provider.example.com/oauth/request_token \
--authorize-url https://provider.example.com/oauth/authorize \
--access-token-url https://provider.example.com/oauth/access_token \
--callback-url https://yourapp.example.com/oauth/callback
What happens:
Using an options file
oauth sign -O oauth.opts
You can still add/override flags after -O; later flags win.
For more examples
In a shell run oauth to start the console.
For now, please see the tests for other usage.
While ruby-oauth tools are free software and will always be, the project would benefit immensely from some funding. Raising a monthly budget of… “dollars” would make the project more sustainable.
We welcome both individual and corporate sponsors! We also offer a wide array of funding channels to account for your preferences (although currently Open Collective is our preferred funding platform).
If you’re working in a company that’s making significant use of ruby-oauth tools we’d appreciate it if you suggest to your company to become a ruby-oauth sponsor.
You can support the development of ruby-oauth tools via GitHub Sponsors, Liberapay, PayPal, Open Collective and Tidelift.
| 📍 NOTE |
|---|
| If doing a sponsorship in the form of donation is problematic for your company from an accounting standpoint, we’d recommend the use of Tidelift, where you can get a support-like subscription instead. |
Support us with a monthly donation and help us continue our activities. [Become a backer]
NOTE: kettle-readme-backers updates this list every day, automatically.
No backers yet. Be the first!
Become a sponsor and get your logo on our README on GitHub with a link to your site. [Become a sponsor]
NOTE: kettle-readme-backers updates this list every day, automatically.
No sponsors yet. Be the first!
How wonderful it is that nobody need wait a single moment before starting to improve the world.
—Anne Frank
I’m driven by a passion to foster a thriving open-source community – a space where people can tackle complex problems, no matter how small. Revitalizing libraries that have fallen into disrepair, and building new libraries focused on solving real-world challenges, are my passions — totaling 79 hours of FLOSS coding over just the past seven days, a pretty regular week for me. I was recently affected by layoffs, and the tech jobs market is unwelcoming. I’m reaching out here because your support would significantly aid my efforts to provide for my family, and my farm (11 🐔 chickens, 2 🐶 dogs, 3 🐰 rabbits, 8 🐈 cats).
If you work at a company that uses my work, please encourage them to support me as a corporate sponsor. My work on gems you use might show up in bundle fund.
I’m developing a new library, floss_funding, designed to empower open-source developers like myself to get paid for the work we do, in a sustainable way. Please give it a look.
Floss-Funding.dev: 👉️ No network calls. 👉️ No tracking. 👉️ No oversight. 👉️ Minimal crypto hashing. 💡 Easily disabled nags
See SECURITY.md.
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 reek, 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.
See CONTRIBUTING.md.
Everyone interacting with this project’s codebases, issue trackers,
chat rooms and mailing lists agrees to follow the .
Made with contributors-img.
Also see GitLab Contributors: https://gitlab.com/ruby-oauth/oauth-tty/-/graphs/main
This Library adheres to .
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.
dropping support for a platform is both obviously and objectively a breaking change
—Jordan Harband (@ljharb, maintainer of SemVer) in SemVer issue 716
I understand that policy doesn’t work universally (“exceptions to every rule!”), but it is the policy here. As such, in many cases it is good to specify a dependency on this library using the Pessimistic Version Constraint with two digits of precision.
For example:
spec.add_dependency("oauth-tty", "~> 1.0")
See CHANGELOG.md for a list of releases.
The gem is available as open source under the terms of
the MIT License .
See LICENSE.txt for the official Copyright Notice.
Maintainers have teeth and need to pay their dentists. After getting laid off in an RIF in March and filled with many dozens of rejections, I’m now spending ~60+ hours a week 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 👇️ Join the Discord.
To say “thanks!” ☝️ Join the Discord or 👇️ send money.
Thanks for RTFM. ☺️