Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bu-ist/django-bu-cas
BU Django CAS implementation
https://github.com/bu-ist/django-bu-cas
Last synced: 2 days ago
JSON representation
BU Django CAS implementation
- Host: GitHub
- URL: https://github.com/bu-ist/django-bu-cas
- Owner: bu-ist
- Created: 2012-03-06T19:54:03.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2016-11-10T16:54:44.000Z (about 8 years ago)
- Last Synced: 2024-04-14T22:23:03.252Z (7 months ago)
- Language: Python
- Homepage:
- Size: 22.5 KB
- Stars: 2
- Watchers: 24
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
===========
BU Django CAS
===========The BU Django CAS middleware provides CAS integration for Django projects, allowing application to authetnicate against a CAS server.
**Note: If you are using Django>1.5, Please refer to the v2 branch of this repo.**
===========
Instructions
===========1. Add CAS configuration lines to settings.py:
```
MIDDLEWARE_CLASSES = (
...
'django.contrib.auth.middleware.AuthenticationMiddleware', # should already be there
'django_bucas.middleware.CASMiddleware',
...
)
``````
AUTHENTICATION_BACKENDS = (
...
'django.contrib.auth.backends.ModelBackend',
'django_bucas.backends.CASBackend',
...
)
``````
INSTALLED_APPS = (
...
'django_bucas',
...
)
```You will also need to configure the following CAS specific settings depending on the environment:
```
CAS_SERVER_URL = "https://weblogin-devl.bu.edu/cas/" # Adjust to use correct location per-environment
CAS_LOGOUT_COMPLETELY = True
CAS_REDIRECT_URL = "/admin"
```2. Modify urls.py to include URL's for CAS login/logout, i.e.
```
urlpatterns = patterns('',
...
url(r'^accounts/login/$', 'django_bucas.views.login'),
url(r'^accounts/logout/$', 'django_bucas.views.logout'),
...
)
```