Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A sinatra app and rack middleware piece for the hancock SSO server
Ruby
branch: master
Failed to load latest commit information.
examples/dragon
features make these slightly more modern and make the integration specs easier…
lib
spec
.gitignore
Gemfile
LICENSE
README.md make these slightly more modern and make the integration specs easier…
Rakefile

README.md

hancock-client

A gem that integrates sinatra applications into the Hancock SSO environment. It also doubles as rack middleware that can be used in rails(>= 2.3.2) and sinatra applications.

Dependencies

% sudo gem install bundler

testing

Rake works for basic stuff, there's safariwatir for integration.

% gem bundle
% bin/rake

For the integration tests you'll need to be on a mac,

% bin/rake example

Application

The goal is to make it simple to write sso enabled apps.

require 'hancock-client'

class HancockClientDemo < Sinatra::Default
  set :views,  File.dirname(__FILE__) + '/views'
  set :public, File.dirname(__FILE__) + '/public'

  use Hancock::Client::Middleware do |sso|
    sso.sso_url = 'http://hancock.atmos.org/sso'
    sso.exclude_paths = %w(/api/)
  end

  get '/' do
    haml(:home)
  end
end
run HancockClientDemo

Feedback

  • Use the Issues Page on Github for Questions
Something went wrong with that request. Please try again.