0.0
No commit activity in last 3 years
No release in over 3 years
Transparently secure your rack application with google. For test rigs etc.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.10
~> 0.6
~> 10.0
~> 3.3
~> 1.2

Runtime

 Project Readme

Rack::NinjaAuth

Require authentication via google for your application without passing any auth information to your application. This may sound crazy, but it's perfect for securing a test environment.

Example

Add this as middleware to your rack application so that a rack session is already available, then execute with NINJA_GOOGLE_CLIENT_ID AND NINJA_GOOGLE_CLIENT_SECRET environment variables set.

require 'sinatra'
require 'rack/ninja_auth'

use Rack::NinjaAuth::Middleware, email_matcher: /@gmail.com$/

get '/' do
  "This is secure without authorisation with a google account with an email ending in @gmail.com"
end

License

The gem is available as open source under the terms of the MIT License.