No commit activity in last 3 years
No release in over 3 years
There's a lot of open issues
Escher authorization for rack based http servers with ease in a form of middleware
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0
>= 2.2.20

Runtime

>= 0.3.3
>= 0
 Project Readme

Escher::RackMiddleware

Rack Middleware for ease of use escher authentication for your application

Installation

Add this line to your application's Gemfile:

gem 'escher-rack_middleware'

And then execute:

$ bundle

Or install it yourself as:

$ gem install escher-rack_middleware

Usage

require 'escher/rack_middleware'
Escher::RackMiddleware.config do |c|

  # the default logger use the ruby core logger with STDOUT
  c.logger= some_logger_instance

  # for read more about escher auth object initialization please visit escherauth.io
  c.add_escher_authenticator{ Escher::Auth.new( CredentialScope, AuthOptions ) }

  # this will be triggered every time a request hit your appication
  c.add_credential_updater{ Escher::Keypool.new.get_key_db }

  # autorization defaults to all paths
  # this help you exclude path(s) if you dont want require authorization for every endpoint
  c.add_exclude_path(/^\/*monitoring\//)

  # Alternatively, you can just authorize some paths:
  # this help you just include certain paths for authorization
  # c.add_include_path(/^\/*integrations\//)

  # NOTE: You can either use excluded paths or included_paths, using both will throw an
  #       exception.


end

use Escher::RackMiddleware
run YourAwesomeApplication

Contributing

  1. Fork it ( https://github.com/[my-github-username]/escher-rack_middleware/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