Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

A CAS server implemented with Twisted

The protocol:

Full documentation is hosted at


  • Implements the CAS Protocol required sections (1-3).
  • Easy to start/stop service that listens and responds to incoming requests. No external web server or web application container required.
  • Open source Python code making heavy use of the Twisted networking library.
  • Flexible plugin architecture, allowing customization of major architectural components.
  • Plugins for Authentication (file, unix, LDAP), User Realms (basic, LDAP), Ticket Stores (in-memory, CouchDB), Service Managers (JSON), and View Providers (Jinja2 templates).
  • Simple configuration.

Running the Demonstration

Run the script as follows:

$ python

The CAS server will run on port 9800. Service 1 runs on port 9801. Service 2 runs on port 9802. Service 3 runs on port 9803. Service 4 runs on port 9804. All services listen on localhost (

Quick Start

Copy cas.cfg.example to cas.cfg. Copy cas.tac.example to cas.tac. Then edit the settings in both files. Run the service with:

$ twistd -n -y cas.tac

To run as a daemon (in the background even when you log out of the shell), omit the -n option.

You can also run the server and specify the options from the command line. The following example runs the server on port 9800.:

$ twistd -n cas -p 9800

To get a list of all command line options:

$ twistd -n cas --help


The HTML pages presented by txcas are fully customizable via view provider plugins. The included Jinja2 view provider allows you to design pages using powerful yet easy to use Jinja2 templates (see

A sample theme using Bootstrap 3 is available at


CAS server implemented with Twisted







No packages published

Contributors 4