Coder Social home page Coder Social logo

pycas's Introduction

pycas v0.0.3

Notice: this seems to not quite fit the needs of the project it was intended for. It will remain in its current form, but consider the package no longer maintained. Feel free to improve it further if you choose, and submit pull requests on github.

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:
    • Remove default secret key
    • Better yet, ditch md5 entirely
    • Add signed cookies (e.g. itsdangerous)
  • 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.

pycas's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.