0.0
No commit activity in last 3 years
No release in over 3 years
Rack Middleware for authenticating requests via an http header
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0

Runtime

>= 0
 Project Readme

Rack::HeaderKey

Rack::HeaderKey is Rack Middleware for providing authorization for requests via an HTTP header. This is useful in instances where you want to authenticate some client of yours to an API where it's easier or preferrable over HTTP basic authentication.

Installation

install it via rubygems:

gem install rack-header-key

or put it in your Gemfile:

# Gemfile

gem 'rack-header-key', :require => 'rack/header_key'

Usage

In a Rack application:

# app.rb

use Rack::HeaderKey, :path => "/api", :key => "shared_key"

The optional :path value determines a specific path you choose to protect. Leaving it off will call the root path to be protected entirely.

Copyright

Copyright © 2011 Brendon Murphy. See MIT-LICENSE for details.