Castanet: a small, snappy CAS client library
Castanet is a Central Authentication Service (CAS) client library. It implements version 2.0 of the CAS protocol.
Castanet was built at the Northwestern University Biomedical Informatics Center as a replacement for RubyCAS-Client in internal software.
Castanet is tested on Ruby 1.8.7, Ruby 1.9.2, JRuby 1.5.6 in Ruby 1.8 mode, and Rubinius 1.2.0. Continuous integration reports are available at NUBIC's CI server.
Getting started
Castanet is distributed as a Rubygem, and can be installed like any other Rubygem:
gem install castanet
Mix Castanet::Client
into the objects that need CAS client behavior.
Objects that include Castanet::Client
must implement cas_url
,
proxy_callback_url
, and proxy_retrieval_url
.
See the documentation for Castanet::Client
for more information and usage
examples.
Acknowledgments
Castanet's test harness was based off of code originally written by Rhett Sutphin.
Query string building code was taken from Rack.
Development
Castanet uses Bundler version ~> 1.0
for dependency
management.
Some of Castanet's development dependencies work best in certain versions of
Ruby. Additionally, some implementations of Ruby do not support constructs
(i.e. fork
) used by Castanet's tests. For this reason, Castanet's Cucumber
scenarios use RVM to run servers in
appropriate Ruby implementations.
Castanet's CAS response parsers are implemented using Ragel.
Once you've got Bundler, RVM, and Ragel installed and set up:
$ bundle install
$ rake udaeta:install_dependencies --trace # because it helps to see what's going on
$ rake ci --trace # ditto
Assuming you cloned Castanet at a point where its CI build succeeded, all steps should pass. If they don't, feel free to ping me.
License
Copyright (c) 2011 David Yip. Released under the X11 (MIT) License; see LICENSE for details.