nov / Json Jwt
Licence: mit
JSON Web Token and its family (JSON Web Signature, JSON Web Encryption and JSON Web Key) in Ruby
Stars: ✭ 262
Programming Languages
ruby
36898 projects - #4 most used programming language
Projects that are alternatives of or similar to Json Jwt
Go Jose
An implementation of JOSE standards (JWE, JWS, JWT) in Go
Stars: ✭ 1,849 (+605.73%)
Mutual labels: jwt, jws, jose, jwe, json-web-token
Jose
🔐 JSON Object Signing and Encryption Framework (JWT, JWS, JWE, JWA, JWK, JWKSet and more)
Stars: ✭ 479 (+82.82%)
Mutual labels: jwt, jws, jose, jwe
Jose2go
Golang (GO) implementation of Javascript Object Signing and Encryption specification
Stars: ✭ 150 (-42.75%)
Mutual labels: jwt, jws, jose, jwe
Jose
Universal "JSON Web Almost Everything" - JWA, JWS, JWE, JWT, JWK with no dependencies
Stars: ✭ 1,029 (+292.75%)
Mutual labels: jwt, jws, jose, jwe
Authlib
The ultimate Python library in building OAuth, OpenID Connect clients and servers. JWS,JWE,JWK,JWA,JWT included.
Stars: ✭ 2,854 (+989.31%)
Mutual labels: jwt, jws, jose, jwe
Jose
JSON Object Signing and Encryption for Node.js and the browser
Stars: ✭ 25 (-90.46%)
Mutual labels: jwt, jws, jose, jwe
Cli
🧰 A zero trust swiss army knife for working with X509, OAuth, JWT, OATH OTP, etc.
Stars: ✭ 2,151 (+720.99%)
Mutual labels: jwt, jws, jose, jwe
Jose Jwt
Ultimate Javascript Object Signing and Encryption (JOSE) and JSON Web Token (JWT) Implementation for .NET and .NET Core
Stars: ✭ 692 (+164.12%)
Mutual labels: jwt, jws, jose, jwe
Jwt
Safe, simple and fast JSON Web Tokens for Go
Stars: ✭ 231 (-11.83%)
Mutual labels: jwt, jws, jose, jwe
jwt-signature
[READ ONLY] Signature component of the JWT Framework
Stars: ✭ 32 (-87.79%)
Mutual labels: jose, jwe, jws
Joseswift
A framework for the JOSE standards JWS, JWE, and JWK written in Swift.
Stars: ✭ 114 (-56.49%)
Mutual labels: jws, jose, jwe
Jwx
Implementation of various JWx (Javascript Object Signing and Encryption/JOSE) technologies
Stars: ✭ 600 (+129.01%)
Mutual labels: jwt, jws, jwe
jwt-core
[READ-ONLY] Core component of the JWT Framework
Stars: ✭ 46 (-82.44%)
Mutual labels: jose, jwe, jws
node-jose-tools
Command line tools for node-jose's features
Stars: ✭ 29 (-88.93%)
Mutual labels: jose, jwe, jws
lexik-jose-bridge
An Encoder for the LexikJWTAuthenticationBundle that uses web-token/jwt-framework
Stars: ✭ 27 (-89.69%)
Mutual labels: jose, jwe, jws
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)
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.
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].