Skip to content

Kellel/bottle-cas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bottle-cas

Build Status

A CAS Client written with bottle.py

Usage

from bottle import route, run, request, Bottle
from bottle_cas.client import CASClient
from bottle_cas.client import CASMiddleware
cas = CASClient()

app = Bottle()
app = CASMiddleware(app)

@route('/')
@cas.require
def index():
    user = request.environ['REMOTE_USER']
    return "Hello %s." % user

run(app=app)

A more complete example can be found within the client (bottle_cas/client.py). Try running it!

Installation

python setup.py build
python setup.py install

Configuration

Configuration should be done in the config.py file located in your python site-packages

cd /usr/lib/python2.7/site-packages/bottle_cas
vim config.py

You really should only need to edit CAS_SERVER and SECRET to get this working.

CAS_SERVER = "https://sso.domian.com" # sso server you would like to auth against
CAS_LOGOUT_URL = "/cas/logout" # The url of the logout
CAS_COOKIE = "CAS" # Name of the cookie
COOKIE_PATH = '/'
MAX_COOKIE_AGE = 1
SECRET = "PLOX_MAKE_DIS_SECRET"
DEBUG = 1

About

A CAS Client written with bottle.py

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages