<commit_before>= What is Rack::SimpleAuth

Rack::SimpleAuth will contain different Authentication Class Middlewares

Until now only HMAC is implemented...

== Installation

Add this line to your application's Gemfile:

    $ gem 'rack-simple_auth'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install rack-simple_auth

== Gem Status

{<img src="https://travis-ci.org/Benny1992/rack-simple_auth.svg?branch=v1.0.0rc" alt="Build Status" />}[https://travis-ci.org/Benny1992/rack-simple_auth]
{<img src="https://coveralls.io/repos/Benny1992/rack-simple_auth/badge.png" alt="Code Coverage" />}[https://coveralls.io/r/Benny1992/rack-simple_auth]
{<img src="https://badge.fury.io/rb/rack-simple_auth.png" alt="Gem Version" />}[http://badge.fury.io/rb/rack-simple_auth]
{<img src="https://gemnasium.com/Benny1992/rack-simple_auth.png" alt="Dependency Status" />}[https://gemnasium.com/Benny1992/rack-simple_auth]
{<img src="https://www.codeship.io/projects/f2d9d790-b0fe-0131-3fd5-025f180094b5/status" alt="Build Status" />}[https://www.codeship.io/projects/f2d9d790-b0fe-0131-3fd5-025f180094b5/status]

== Usage

=== HMAC

To use HMAC Authorization you have to use the Rack::SimpleAuth::HMAC::Middleware for your Rack App

Basic Usage:

    require 'rack/lobster'
    require 'rack/simple_auth'

    request_config = {
      'GET' => 'path',
      'POST' => 'params',
      'DELETE' => 'path',
      'PUT' => 'path',
      'PATCH' => 'path'
    }

    use Rack::SimpleAuth::HMAC::Middleware do |options|
      options.tolerance = 1500 # 1500ms -> 1.5s

      options.secret = 'test_secret'
      options.signature = 'test_signature'<commit_msg>added codeclimate badge<commit_after>= What is Rack::SimpleAuth

Rack::SimpleAuth will contain different Authentication Class Middlewares

Until now only HMAC is implemented...

== Installation

Add this line to your application's Gemfile:

    $ gem 'rack-simple_auth'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install rack-simple_auth

== Gem Status

{<img src="https://travis-ci.org/Benny1992/rack-simple_auth.svg?branch=v1.0.0rc" alt="Build Status" />}[https://travis-ci.org/Benny1992/rack-simple_auth]
{<img src="https://coveralls.io/repos/Benny1992/rack-simple_auth/badge.png" alt="Code Coverage" />}[https://coveralls.io/r/Benny1992/rack-simple_auth]
{<img src="https://badge.fury.io/rb/rack-simple_auth.png" alt="Gem Version" />}[http://badge.fury.io/rb/rack-simple_auth]
{<img src="https://gemnasium.com/Benny1992/rack-simple_auth.png" alt="Dependency Status" />}[https://gemnasium.com/Benny1992/rack-simple_auth]
{<img src="https://www.codeship.io/projects/f2d9d790-b0fe-0131-3fd5-025f180094b5/status" alt="Build Status" />}[https://www.codeship.io/projects/f2d9d790-b0fe-0131-3fd5-025f180094b5/status]
{<img src="https://codeclimate.com/github/Benny1992/rack-simple_auth.png" />}[https://codeclimate.com/github/Benny1992/rack-simple_auth]

== Usage

=== HMAC

To use HMAC Authorization you have to use the Rack::SimpleAuth::HMAC::Middleware for your Rack App

Basic Usage:

    require 'rack/lobster'
    require 'rack/simple_auth'

    request_config = {
      'GET' => 'path',
      'POST' => 'params',
      'DELETE' => 'path',
      'PUT' => 'path',
      'PATCH' => 'path'
    }

    use Rack::SimpleAuth::HMAC::Middleware do |options|
      options.tolerance = 1500 # 1500ms -> 1.5s

      options.secret = 'test_secret'
      options.signature = 'test_signature'
{'fraction_non_alphanumeric': 0.15922833285344082, 'fraction_numerical': 0.0489490354160668, 'mean_word_length': 4.108823529411764, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 26, 'https://': 20, 'lorem ipsum': 0, 'www.': 4, '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': '44242', 'n_tokens_mistral': 1380, 'n_tokens_neox': 1242, 'n_words': 226}