Skip to main content

A pypi-downloadable version of Jon Rifkin's pycas client.

Project description

What?

This is a copy of Jon Rifkin’s Python CAS client. The original can be found at https://wiki.jasig.org/display/CASC/Pycas. This fork lives at https://github.com/ryanfox/pycas and on Pypi.

The original appears to have not been updated for some time now, and is not on Pypi. This is an attempt to rectify that situation.

Potential things to be added:
  • Unit tests

  • Better security

  • Enforce the timeout

Installation

pip install pycas

Why?

The pycas CAS client provides CAS authentication for your Python CGI web application.

How?

STEPS TO ADD CAS AUTHENTICATION

  1. Add four lines to your Python Web app like this:

    import pycas
    CAS_SERVER  = "https://casserver.mydomain"
    SERVICE_URL = "http://webserver.mydomain/cgi-bin/webapp.py"
    status, userid, cookie = pycas.login(CAS_SERVER, SERVICE_URL)
  2. Process the returned variables:

    status carries the success or failure status.
    userid 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pycas-0.0.2.tar.gz (6.3 kB view details)

Uploaded Source

File details

Details for the file pycas-0.0.2.tar.gz.

File metadata

  • Download URL: pycas-0.0.2.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pycas-0.0.2.tar.gz
Algorithm Hash digest
SHA256 dd39c692ecab03bed6026f1ad8ae99532a8b3c3dd31430599eec00933b5aaca6
MD5 4b8e916d4655a0ae88efcf60009af436
BLAKE2b-256 8a92c201ba7842c255d503316edcdb9c23783b83982e78e85e487707aaff46df

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page