WebAuth
Django CAS 1.0/2.0 authentication backend, adapted from
https://github.com/kstateome/django-cas to work with
Dartmouth WebAuth.
-
fyt.webauth.views.login(request, next_page=None)[source]
Forwards to CAS login URL or verifies CAS ticket
-
fyt.webauth.views.logout(request, next_page=None)[source]
Redirects to CAS logout page
-
class
fyt.webauth.backends.WebAuthBackend[source]
CAS authentication backend for Dartmouth Webauth
-
authenticate(ticket, service)[source]
Verifies CAS ticket and gets or creates User object.
-
get_user(user_id)[source]
Retrieve the user’s entry in the User model if it exists
-
fyt.webauth.backends.parse_cas_success(tree)[source]
Callback function for parsing Dartmouth’s CAS response.
Returns the verified user.
-
fyt.webauth.backends.verify(ticket, service)[source]
Verifies CAS 2.0+ XML-based authentication ticket.
Returns user on success and None on failure.
-
class
fyt.webauth.middleware.WebAuthMiddleware[source]
Middleware that allows CAS authentication on admin pages
-
process_request(request)[source]
Checks that the authentication middleware is installed
-
process_view(request, view_func, view_args, view_kwargs)[source]
Forwards unauthenticated requests to the admin page to the CAS
login URL, as well as calls to django.contrib.auth.views.login and
logout.