Readme.md in decode_this-0.1.0 vs Readme.md in decode_this-0.1.1

- old
+ new

@@ -1,7 +1,9 @@ # DecodeThis +[![Build Status](https://travis-ci.org/myxaluch/decode_this.svg?branch=master)](https://travis-ci.org/myxaluch/decode_this) + Simple decoder JWT token by given key ## Installation Add this line to your application's Gemfile: @@ -21,17 +23,23 @@ ## Usage Configuration file scheme: ``` test: - algorightm: 'RS256' + algorithm: 'RS256' path: 'paht/to/keys' ``` ```ruby -token = DecodeThis.call(token, config_file: '/path/to/config.yml', env: :my_env) -token['field1'] -token['field2'] +payload = { + 'field1' => 'foo', + 'field2' => 'bar' +} +jwt_token = JWT.encode(payload, private_token, true, algorithm: algorithm) +... +decoded_token = DecodeThis.decode(jwt_token, config_file: '/path/to/config.yml', env: :my_env, logger: logger) +token['field1'] = 'foo' +token['field2'] = 'bar' ``` ## Contributing Bug reports and pull requests are welcome on GitHub at https://github.com/myxaluch/decode_this.