
Welcome!
Everything is fine.
CAS¶
Today, we'll talk about authenticating users with the CAS server at Wellesley. CAS essentially allows us to punt having to manage passwords and logins.
Plan¶
- Announcements
- We'll go over the basics of CAS
- Quiz Questions
- Breakout sessions in project teams
Announcements¶
- Grading status
- Enjoy the break. Take some time for well-deserved R&R. I plan to!
CAS Highlights¶
flask_cas
creates acas.login
handler for logins- You can decide how to format that as a button in your app
- When the user clicks the button, flask transfers the user to the CAS server
- They authenticate. If they are successful....
- CAS transfers back to your app (at a route of your choosing), and
- puts useful info in the
session
, particularly CAS_USERNAME
, which is the user's official Wellesley username, e.g.sanderso
All the coding details are in the cas
folder in
~cs304/pub/downloads/cas
Quiz Questions¶
I'll answer your quiz questions
Demo (if desired)¶
Here's a demo of the PHP version working for account requests
Here's what you have to do to use Wellesley's CAS server. We can do this together in class.
- install
flask_cas
using pip - fix the bug
- import
flask_cas
into yourapp.py
- configure it with the CAS server, URLs, etc. Values below
- start with a different port, described below
Checklist¶
Here's a checklist for running the app, which you can adapt for running your project code.
Once Only¶
- activate venv
- install
flask_cas
- install my patch using
install-scott-routing.sh
cd ~/cs304
source venv/bin/activate
pip install flask_cas
cp -r ~cs304/pub/downloads/cas cas
cd cas
bash install-scott-routing.sh
Each Time¶
- Start VPN (if and only if you are outside the Wellesley firewall)
- activate venv
- run on port 1943-1952
cd ~/cs304
source venv/bin/activate
cd cas
python app.py 1952
Breakout¶
You're welcome to work on your projects now.