README.md in matic-jwt-1.1.0 vs README.md in matic-jwt-1.2.0
- old
+ new
@@ -18,10 +18,19 @@
$ gem install matic-jwt
## Usage
-####With Grape
+### Plain Ruby
+
+Use `MaticJWT::Generator` to create JWT tokens or headers:
+```ruby
+generator = MaticJWT::Generator.new
+token = generator.token_for('my_client', 'my_super_secret', additional_payload: 'test')
+header = generator.authentication_header_for('my_client', 'my_super_secret', user_id: 'test@localhost.com')
+```
+
+### With Grape
Use ```:jwt_auth``` strategy and provide secret.
```ruby
auth :jwt_auth, {
secret: -> (client_name) { ::ApiClient.find_by!(name: client_name).secret }