A summary of data about the Ruby ecosystem.

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

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

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


GitHub Events

Total
Last Year

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 Email 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:


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

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/nov/json-jwt

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

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

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

json-jwt.gemspec rubygems
  • 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
.github/workflows/spec.yml actions
  • actions/checkout v3 composite
  • ruby/setup-ruby v1 composite
Gemfile rubygems

Score: 29.885880997902344