使用pyramid CAS

访问量: 824

注: 不好用,还是算了吧,回归rails. 

1. git clone https://github.com/aaguirre/pyramid_cas.git

2. use your pyramid_env ( cd <pyramid_env> && . bin/active)

3. cd <pyramid_cas folder> && python setup.py develop

4. change your project .ini file,e.g.

pyramid.default_locale_name = en

+pyramid.includes = pyramid_cas

+pyramid_cas.cas_server = http://10.103.13.121:3535

5. cd <pramid_cas_folder> , edit the view.py: add the line if your are

using URL dispatcher( rather than traversal)

+@view_config(route_name='cas-login',renderer='string')

@view_config(name='cas-login',renderer='string')

@view_config(context='pyramid.httpexceptions.HTTPForbidden')

def casLogin(request):

6. now restart the server and use /cas-login to perform a login action:

localhost:6543/cas-login

and you will see your CAS login page.

7. logout:

localhost:6543/cas-logout

订阅/RSS Feed

Subscribe

分类/category