Sha256: d110d3bb364695bda1b19edbdcb87b8577c01209b1c56431a1fe209683c980f4

Contents?: true

Size: 1.23 KB

Versions: 3

Compression:

Stored size: 1.23 KB

Contents

= OpenIDConnect

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)

== Examples

=== Encoding

  claim = {
    iss: 'nov',
    exp: 1.week.from_now,
    nbf: Time.now
  }

  # No signature, no encryption
  JSON::JWT.new(claim).to_s

  # With signiture, no encryption
  JSON::JWT.new(claim).sign(key, algorithm).to_s

  # With signature & encryption
  JSON::JWT.new(claim).sign(key, algorithm).encrypt(key, algorithm).to_s

=== Decoding

  jwt_string = "jwt_header.jwt_claims.jwt_signature"

  JSON::JWT.decode(jwt_string, public_key)

== 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.

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
json-jwt-0.0.4 README.rdoc
json-jwt-0.0.3 README.rdoc
json-jwt-0.0.2 README.rdoc