diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 00000000..4f6bdadd --- /dev/null +++ b/AUTHORS @@ -0,0 +1,72 @@ +Tim Rudat +Jeff Lindsay +A.B +Emilio Cristalli +Bob Aman +Zane Shannon +Nikita Shatov +Paul Battley +blackanger +Adam Michael +Ville Lautanala +Tyler Pickett +Peter M. Goldstein +Bill Mill +Klaas Jan Wierenga +Steve Sloan +yann ARMAND +Rodrigo López Dato +Steven Davidovitz +Erik Michaels-Ober +Brian Flethcer +Tom Wey +Jurriaan Pruis +lukas +ojab +sawyerzhang +Larry Lv +Marco Adkins +Micah Gates +Mike Eirih +Mike Pastore +Mingan +Mitch Birti +Nicolas Leger +Rob Wygand +Ryan Brushett +Ryan McIlmoyl +Steve Teti +Taiki Sugawara +Tobias Haar +Tomé Duarte +Travis Hunter +Yuji Yaginuma +Zuzanna Stolińska +aarongray +danielgrippi +nycvotes-dev +rono23 +Makoto Chiba +Adam Greene +Alexander Boyd +Alexandr Kostrikov +Aman Gupta +Ariel Salomon +Arnaud Mesureur +Austin Kabiru +B +Brandon Keepers +Dave Grijalva +Dorian Marié +Ernie Miller +Ilyaaaaaaaaaaaaa Zhitomirskiy +Jens Hausherr +Jeremiah Wuenschel +John Downey +Jordan Brough +Josh Bodah +Juanito Fatas +Julio Lopez +Katelyn Kasperowicz +Lowell Kirsh +Lucas Mazza diff --git a/README.md b/README.md index c31cc544..91dc34c9 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,9 @@ [![Code Climate](https://codeclimate.com/github/jwt/ruby-jwt/badges/gpa.svg)](https://codeclimate.com/github/jwt/ruby-jwt) [![Test Coverage](https://codeclimate.com/github/jwt/ruby-jwt/badges/coverage.svg)](https://codeclimate.com/github/jwt/ruby-jwt/coverage) [![Issue Count](https://codeclimate.com/github/jwt/ruby-jwt/badges/issue_count.svg)](https://codeclimate.com/github/jwt/ruby-jwt) +[![Ebert](https://ebertapp.io/github/jwt/ruby-jwt.svg)](https://ebertapp.io/github/jwt/ruby-jwt) -A pure ruby implementation of the [RFC 7519 OAuth JSON Web Token (JWT)](https://tools.ietf.org/html/rfc7519) standard. +A ruby implementation of the [RFC 7519 OAuth JSON Web Token (JWT)](https://tools.ietf.org/html/rfc7519) standard. If you have further questions related to development or usage, join us: [ruby-jwt google group](https://groups.google.com/forum/#!forum/ruby-jwt). @@ -154,12 +155,12 @@ gem 'rbnacl' For more detailed installation instruction check the official [repository](https://github.com/cryptosphere/rbnacl) on GitHub. -* ED25519 +* ED25519 -```ruby +```ruby private_key = RbNaCl::Signatures::Ed25519::SigningKey.new('abcdefghijklmnopqrstuvwxyzABCDEF') public_key = private_key.verify_key -token = JWT.encode payload, private_key, 'ED25519' +token = JWT.encode payload, private_key, 'ED25519' # eyJhbGciOiJFRDI1NTE5In0.eyJkYXRhIjoidGVzdCJ9.6xIztXyOupskddGA_RvKU76V9b2dCQUYhoZEVFnRimJoPYIzZ2Fm47CWw8k2NTCNpgfAuxg9OXjaiVK7MvrbCQ puts token @@ -428,31 +429,9 @@ bundle exec rspec **If you want a release cut with your PR, please include a version bump according to [Semantic Versioning](http://semver.org/)** ## Contributors - * Alex Baranov [@ab320012](https://github.com/ab320012) - * Jordan Brough - * Ilya Zhitomirskiy - * Daniel Grippi - * Jeff Lindsay - * Bob Aman - * Micah Gates - * Rob Wygand - * Ariel Salomon (Oscil8) - * Paul Battley - * Zane Shannon [@zshannon](https://github.com/zshannon) - * Brian Fletcher [@punkle](https://github.com/punkle) - * Alex [@ZhangHanDong](https://github.com/ZhangHanDong) - * John Downey [@jtdowney](https://github.com/jtdowney) - * Adam Greene [@skippy](https://github.com/skippy) - * Tim Rudat [@excpt](https://github.com/excpt) - Maintainer - -## License -MIT +See `AUTHORS` file. -Copyright (c) 2011 Jeff Lindsay - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +## License -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +See `LICENSE` file. diff --git a/spec/integration/readme_examples_spec.rb b/spec/integration/readme_examples_spec.rb index 52341e00..9ffd8818 100644 --- a/spec/integration/readme_examples_spec.rb +++ b/spec/integration/readme_examples_spec.rb @@ -134,7 +134,13 @@ end it 'string' do + aud = 'Kids' + aud_payload = { data: 'data', aud: aud } + + token = JWT.encode aud_payload, hmac_secret, 'HS256' + expect do + JWT.decode token, hmac_secret, true, aud: 'Kids', verify_aud: true, algorithm: 'HS256' end.not_to raise_error end end