https://github.com/nov/json-jwt
JSON Web Token and its family (JSON Web Signature, JSON Web Encryption and JSON Web Key) in Ruby
https://github.com/nov/json-jwt
Keywords
jose json-web-encryption json-web-key json-web-signature json-web-token jwe jwk jws jwt
Keywords from Contributors
rubygem activerecord mvc activejob oauth2 crash-reporting static-code-analysis rubocop code-formatter oauth-oidc
Last synced: about 6 hours ago
JSON representation
Repository metadata
JSON Web Token and its family (JSON Web Signature, JSON Web Encryption and JSON Web Key) in Ruby
- Host: GitHub
- URL: https://github.com/nov/json-jwt
- Owner: nov
- License: mit
- Created: 2011-09-14T16:09:22.000Z (about 14 years ago)
- Default Branch: main
- Last Pushed: 2025-08-09T02:09:02.000Z (4 months ago)
- Last Synced: 2025-12-06T18:21:35.072Z (5 days ago)
- Topics: jose, json-web-encryption, json-web-key, json-web-signature, json-web-token, jwe, jwk, jws, jwt
- Language: Ruby
- Homepage:
- Size: 392 KB
- Stars: 299
- Watchers: 11
- Forks: 82
- Open Issues: 2
- Releases: 11
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
README.md
JSON::JWT
JSON Web Token and its family (JSON Web Signature, JSON Web Encryption and JSON Web Key) in Ruby
Installation
gem install json-jwt
Resources
- View Source on GitHub (https://github.com/nov/json-jwt)
- Report Issues on GitHub (https://github.com/nov/json-jwt/issues)
- Documentation on GitHub (https://github.com/nov/json-jwt/wiki)
Examples
require 'json/jwt'
private_key = OpenSSL::PKey::RSA.new <<-PEM
-----BEGIN RSA PRIVATE KEY-----
MIIEpAIBAAKCAQEAyBKIFSH8dP6bDkGBziB6RXTTfZVTaaNSWNtIzDmgRFi6FbLo
:
-----END RSA PRIVATE KEY-----
PEM
public_key = OpenSSL::PKey::RSA.new <<-PEM
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyBKIFSH8dP6bDkGBziB6
:
-----END PUBLIC KEY-----
PEM
# Sign & Encode
claim = {
iss: 'nov',
exp: 1.week.from_now,
nbf: Time.now
}
jws = JSON::JWT.new(claim).sign(private_key, :RS256)
jws.to_s
# Decode & Verify
input = "jwt_header.jwt_claims.jwt_signature"
JSON::JWT.decode(input, public_key)
If you need to get a JWK from jwks_uri of OpenID Connect IdP, you can use JSON::JWK::Set::Fetcher to fetch (& optionally cache) it.
# JWK Set Fetching & Caching
# NOTE: Optionally by setting cache instance, JWKs are cached by kid.
JSON::JWK::Set::Fetcher.cache = Rails.cache
JSON::JWK::Set::Fetcher.fetch(jwks_uri, kid: kid)
# => returns JSON::JWK instance or raise JSON::JWK::Set::KidNotFound
For more details, read Documentation Wiki.
Note on Patches/Pull Requests
- Fork the project.
- Make your feature addition or bug fix.
- Add tests for it. This is important so I don't break it in a
future version unintentionally. - Commit, do not mess with rakefile, version, or history.
(if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull) - Send me a pull request. Bonus points for topic branches.
Copyright
Copyright (c) 2011 nov matake. See LICENSE for details.
Owner metadata
- Name: Nov Matake
- Login: nov
- Email: nov@matake.jp
- Kind: user
- Description: Working around Ruby, OAuth, OpenID etc.
- Website: https://matake.jp
- Location: Tokyo, Japan
- Twitter: nov
- Company: YAuth.jp LLC
- Icon url: https://avatars.githubusercontent.com/u/27299?u=d02b1d3e03dc134d2d0a42e670eac1be099064e0&v=4
- Repositories: 166
- Last ynced at: 2025-10-29T22:36:11.404Z
- Profile URL: https://github.com/nov
GitHub Events
Total
- Create event: 6
- Release event: 3
- Issues event: 3
- Watch event: 2
- Delete event: 2
- Issue comment event: 1
- Push event: 7
- Pull request event: 4
- Fork event: 1
Last Year
- Create event: 5
- Release event: 3
- Issues event: 3
- Watch event: 2
- Delete event: 2
- Issue comment event: 1
- Push event: 6
- Pull request event: 2
- Fork event: 1
Committers metadata
Last synced: 7 days ago
Total Commits: 435
Total Committers: 26
Avg Commits per committer: 16.731
Development Distribution Score (DDS): 0.276
Commits in past year: 7
Committers in past year: 2
Avg Commits per committer in past year: 3.5
Development Distribution Score (DDS) in past year: 0.143
| Name | Commits | |
|---|---|---|
| nov | n****v@m****p | 315 |
| nov | n****e@g****t | 63 |
| nov | n****e@o****p | 19 |
| Bart de Water | b****r@g****m | 9 |
| Ben Toews | b****s@g****m | 4 |
| Steven Davidovitz | s****z@z****m | 4 |
| Sean Dilda | s****n@d****u | 2 |
| Duke | d****6@g****m | 1 |
| Jester | j****r@a****u | 1 |
| Johnny Dongelmans | j****s@d****u | 1 |
| Kaoru Maeda | k****a@n****p | 1 |
| Nicolas Leger | n****r@n****m | 1 |
| Ramez Hanna | r****a@c****m | 1 |
| Akira Matsuda | r****e@d****p | 1 |
| Bart Mesuere | m****t@g****m | 1 |
| Ben Moskovitz | b****m@b****m | 1 |
| Bobby Lawrence | d****7@g****m | 1 |
| Christopher Kintner | c****r@z****m | 1 |
| Cody Cutrer | c****y@i****m | 1 |
| David Lozano | d****o@k****m | 1 |
| Lucas Kanashiro | l****o@c****m | 1 |
| Stephane Bellity | s****y@g****m | 1 |
| Stephen Touset | s****n@t****g | 1 |
| Vinay | v****s@g****m | 1 |
| denisenk | d****k@a****m | 1 |
| ojab | o****b@o****u | 1 |
Committer domains:
- zendesk.com: 2
- matake.jp: 1
- gree.net: 1
- optim.co.jp: 1
- duke.edu: 1
- aejis.eu: 1
- digidentity.eu: 1
- nts.ricoh.co.jp: 1
- nleger.com: 1
- criteo.com: 1
- dio.jp: 1
- buildkite.com: 1
- instructure.com: 1
- kantox.com: 1
- canonical.com: 1
- touset.org: 1
- amazon.com: 1
- ojab.ru: 1
Issue and Pull Request metadata
Last synced: 3 months ago
Total issues: 53
Total pull requests: 61
Average time to close issues: 4 months
Average time to close pull requests: about 1 month
Total issue authors: 50
Total pull request authors: 37
Average comments per issue: 3.11
Average comments per pull request: 1.34
Merged pull request: 35
Bot issues: 0
Bot pull requests: 0
Past year issues: 1
Past year pull requests: 3
Past year average time to close issues: N/A
Past year average time to close pull requests: about 1 month
Past year issue authors: 1
Past year pull request authors: 2
Past year average comments per issue: 1.0
Past year average comments per pull request: 0.0
Past year merged pull request: 2
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- nov (2)
- futureperfect (2)
- FranklinYu (2)
- rc-mattschwager (1)
- onli (1)
- MITSUBOSHI (1)
- clickmonkee (1)
- afilbert (1)
- Gerst20051 (1)
- sandergroen (1)
- travisofthenorth (1)
- economou (1)
- theirishpenguin (1)
- nhinds (1)
- ErnstA (1)
Top Pull Request Authors
- nov (14)
- bdewater (6)
- steved (2)
- mark-young-atg (2)
- moskyb (2)
- ccutrer (2)
- timrogers (2)
- Capncavedan (2)
- funzoneq (1)
- bmesuere (1)
- jhass (1)
- btoews (1)
- stouset (1)
- michael-harrison (1)
- v1nayv (1)
Top Issue Labels
Top Pull Request Labels
Package metadata
- Total packages: 3
-
Total downloads:
- rubygems: 190,332,014 total
- Total docker downloads: 1,027,907,014
- Total dependent packages: 68 (may contain duplicates)
- Total dependent repositories: 1,829 (may contain duplicates)
- Total versions: 287
- Total maintainers: 1
- Total advisories: 3
gem.coop: json-jwt
JSON Web Token and its family (JSON Web Signature, JSON Web Encryption and JSON Web Key) in Ruby
- Homepage: https://github.com/nov/json-jwt
- Documentation: http://www.rubydoc.info/gems/json-jwt/
- Licenses: MIT
- Latest release: 1.17.0 (published 4 months ago)
- Last Synced: 2025-12-09T12:30:20.660Z (3 days ago)
- Versions: 97
- Dependent Packages: 0
- Dependent Repositories: 0
- Downloads: 95,174,904 Total
- Docker Downloads: 513,953,507
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 0.087%
- Downloads: 0.261%
- Maintainers (1)
rubygems.org: json-jwt
JSON Web Token and its family (JSON Web Signature, JSON Web Encryption and JSON Web Key) in Ruby
- Homepage: https://github.com/nov/json-jwt
- Documentation: http://www.rubydoc.info/gems/json-jwt/
- Licenses: MIT
- Latest release: 1.17.0 (published 4 months ago)
- Last Synced: 2025-12-09T03:31:47.528Z (3 days ago)
- Versions: 97
- Dependent Packages: 68
- Dependent Repositories: 1,829
- Downloads: 95,157,110 Total
- Docker Downloads: 513,953,507
-
Rankings:
- Docker downloads count: 0.233%
- Downloads: 0.341%
- Dependent packages count: 0.443%
- Dependent repos count: 0.729%
- Average: 1.352%
- Forks count: 3.083%
- Stargazers count: 3.281%
- Maintainers (1)
- Advisories:
proxy.golang.org: github.com/nov/json-jwt
- Homepage:
- Documentation: https://pkg.go.dev/github.com/nov/json-jwt#section-documentation
- Licenses: mit
- Latest release: v1.17.0 (published 4 months ago)
- Last Synced: 2025-12-07T18:02:32.672Z (4 days ago)
- Versions: 93
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent packages count: 6.456%
- Average: 6.674%
- Dependent repos count: 6.892%
Dependencies
- rake >= 0 development
- rspec >= 0 development
- rspec-its >= 0 development
- simplecov >= 0 development
- webmock >= 0 development
- activesupport >= 4.2
- aes_key_wrap >= 0
- bindata >= 0
- httpclient >= 0
- actions/checkout v3 composite
- ruby/setup-ruby v1 composite
Score: 29.885880997902344