Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A sinatra app and rack middleware piece for the hancock SSO server

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 examples
Octocat-spinner-32 features
Octocat-spinner-32 lib
Octocat-spinner-32 spec
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Gemfile
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.md
Octocat-spinner-32 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.