<commit_before># Rack::Indicium

If a JWT is sent in the header, it will be decoded and available in the `jwt.payload` and `jwt.header` rack `env` variables.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'rack-indicium'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install rack-indicium

## Usage

```Ruby
require "rack/indicium"
use Rack::Indicium, ENV.fetch("JWT_SECRET")
run App
```

If you need custom options to decode JWT, override the decoder:

```Ruby
require "rack/indicium"

unsafe_decoder = lambda { |jwt, secret| JWT.decode(jwt, secret, true, verify_expiration: false) }

use Rack::Indicium, ENV.fetch("JWT_SECRET"), unsafe_decoder
run App
```

## Contributing

1. Fork it ( https://github.com/[my-github-username]/rack-indicium/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request<commit_msg>Update GitHub account in README<commit_after># Rack::Indicium

If a JWT is sent in the header, it will be decoded and available in the `jwt.payload` and `jwt.header` rack `env` variables.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'rack-indicium'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install rack-indicium

## Usage

```Ruby
require "rack/indicium"
use Rack::Indicium, ENV.fetch("JWT_SECRET")
run App
```

If you need custom options to decode JWT, override the decoder:

```Ruby
require "rack/indicium"

unsafe_decoder = lambda { |jwt, secret| JWT.decode(jwt, secret, true, verify_expiration: false) }

use Rack::Indicium, ENV.fetch("JWT_SECRET"), unsafe_decoder
run App
```

## Contributing

1. Fork it ( https://github.com/twingly/rack-indicium/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request
{'fraction_non_alphanumeric': 0.1208313194780087, 'fraction_numerical': 0.004833252779120348, 'mean_word_length': 4.404699738903394, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2575205', 'n_tokens_mistral': 751, 'n_tokens_neox': 690, 'n_words': 251}