<commit_before># django-cas

CAS client for Django.  This library requires Django 1.5 or above, and Python 2.6, 2.7, 3.4

Current version: 1.1.0

This is [K-State&#39;s fork](https://github.com/kstateome/django-cas) of [the original](https://bitbucket.org/cpcc/django-cas/overview) and includes [several additional features](https://github.com/kstateome/django-cas/#additional-features) as well as features merged from

*  [KTHse&#39;s django-cas2](https://github.com/KTHse/django-cas2).
*  [Edmund Crewe's proxy ticket patch](http://code.google.com/r/edmundcrewe-proxypatch/source/browse/django-cas-proxy.patch).


## Install

This project is registered on PyPi as django-cas-client.  To install::

    pip install django-cas-client==1.1.0
    
    
### Add to URLs

Add the login and logout patterns to your main URLS conf.

    # CAS
    url(r'^accounts/login/$', 'cas.views.login', name='login'),
    url(r'^accounts/logout/$', 'cas.views.logout', name='logout'),

### Add middleware and settings

Set your CAS server URL

    CAS_SERVER_URL = "https://signin.somehwere/cas/"

Add cas to middleware classes

    'cas.middleware.CASMiddleware',
    

## How to Contribute

Fork and branch off of the ``develop`` branch.  Submit Pull requests back to ``kstateome:develop``.

### Run The Tests

All PRs must pass unit tests.  To run the tests locally:

    pip install -r requirements-dev.txt
    python run_tests.py


## Settings.py for CAS

Add the following to middleware if you want to use CAS::

    MIDDLEWARE_CLASSES = (
    'cas.middleware.CASMiddleware',
    )


Add these to ``settings.py`` to use the CAS Backend::<commit_msg>Update readme to include authentication backend documentation.<commit_after># django-cas

CAS client for Django.  This library requires Django 1.5 or above, and Python 2.6, 2.7, 3.4

Current version: 1.1.0

This is [K-State&#39;s fork](https://github.com/kstateome/django-cas) of [the original](https://bitbucket.org/cpcc/django-cas/overview) and includes [several additional features](https://github.com/kstateome/django-cas/#additional-features) as well as features merged from

*  [KTHse&#39;s django-cas2](https://github.com/KTHse/django-cas2).
*  [Edmund Crewe's proxy ticket patch](http://code.google.com/r/edmundcrewe-proxypatch/source/browse/django-cas-proxy.patch).


## Install

This project is registered on PyPi as django-cas-client.  To install::

    pip install django-cas-client==1.1.0
    
    
### Add to URLs

Add the login and logout patterns to your main URLS conf.

    # CAS
    url(r'^accounts/login/$', 'cas.views.login', name='login'),
    url(r'^accounts/logout/$', 'cas.views.logout', name='logout'),

### Add middleware and settings

Set your CAS server URL

    CAS_SERVER_URL = "https://signin.somehwere/cas/"

Add cas to middleware classes

    'cas.middleware.CASMiddleware',
    

### Add authentication backends 

AUTHENTICATION_BACKENDS = (
    ‘django.contrib.auth.backends.ModelBackend’,
    ‘cas.backends.CASBackend’,
)

## How to Contribute

Fork and branch off of the ``develop`` branch.  Submit Pull requests back to ``kstateome:develop``.

### Run The Tests

All PRs must pass unit tests.  To run the tests locally:

    pip install -r requirements-dev.txt
    python run_tests.py


## Settings.py for CAS

Add the following to middleware if you want to use CAS::

    MIDDLEWARE_CLASSES = (
    'cas.middleware.CASMiddleware',
    )


Add these to ``settings.py`` to use the CAS Backend::
{'fraction_non_alphanumeric': 0.12536023054755044, 'fraction_numerical': 0.011527377521613832, 'mean_word_length': 3.7353342428376535, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4273059', 'n_tokens_mistral': 1187, 'n_tokens_neox': 1113, 'n_words': 331}