Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Download the Python CAS client here.

STEPS TO ADD CAS AUTHENTICATION

...

1) Add four lines to your Python Web app like this,

Code Block

import pycas
CAS_SERVER  = "https://casserver.mydomain"

...


...

SERVICE_URL = "http://webserver.mydomain/cgi-bin/webapp.py"

...

status, id, cookie = login(CAS_SERVER, SERVICE_URL)

2) Process the returned variables,

Panel

status carries the success or failure status.
id is the user's account name.
cookie is the header string to send to the client if it's not empty.


For more information, see comments in the Python code.