mitocw/django-cas — pull request #2 by fmyzjs (2014-12-03 03:45:30+00:00)
Title: CAS 3.0 support

CAS 3.0 support

To support CAS 3.0,the attribute mapper should be like:

```python

def populate_user(user, authentication_response):
if authentication_response is not None:
if authentication_response.has_key('is_superuser'):
user.is_superuser = authentication_response['is_superuser']

if authentication_response.has_key('is_staff'):
user.is_staff = authentication_response['is_staff']

if authentication_response.has_key('givenName'):
user.first_name = authentication_response['givenName']

if authentication_response.has_key('sn'):
user.last_name = authentication_response['sn']

if authentication_response.has_key('email'):
user.email = authentication_response['email']

pass
```