README.rst 1.51 KB
Newer Older
Valentin Samir's avatar
Valentin Samir committed
1 2 3 4
=====
CAS Server
=====

5 6 7
CAS Server is a Django app implementing the `CAS Protocol 3.0 Specification
<https://jasig.github.io/cas/development/protocol/CAS-Protocol-Specification.html>`_.

Valentin Samir's avatar
Valentin Samir committed
8 9 10 11 12 13
By defaut, the authentication process use django internal users but you can easily
use any sources (see auth classes in the auth.py file)

The differents parametters you can use in settings.py to tweak the application
are listed in default_settings.py

14
The defaut login/logout template use `django-bootstrap3 <https://github.com/dyve/django-bootstrap3>`_
Valentin Samir's avatar
Valentin Samir committed
15
but you can use your own templates using the CAS_LOGIN_TEMPLATE,
16
CAS_LOGGED_TEMPLATE, CAS_WARN_TEMPLATE and CAS_LOGOUT_TEMPLATEsetting variables.
Valentin Samir's avatar
Valentin Samir committed
17 18 19 20 21 22 23 24 25 26 27

Quick start
-----------

1. Add "cas_server" to your INSTALLED_APPS setting like this::

    INSTALLED_APPS = (
        ...
        'cas_server',
    )

28 29 30 31 32 33 34 35 36
   For internatinalization support, add "django.middleware.locale.LocaleMiddleware"
   to your MIDDLEWARE_CLASSES setting like this::

    MIDDLEWARE_CLASSES = (
        ...
        'django.middleware.locale.LocaleMiddleware',
        ...
    )

Valentin Samir's avatar
Valentin Samir committed
37 38
2. Include the polls URLconf in your project urls.py like this::

39
    url(r'^cas/', include('cas_server.urls', namespace="cas_server")),
Valentin Samir's avatar
Valentin Samir committed
40 41 42 43 44 45 46 47

3. Run `python manage.py migrate` to create the cas_server models.

4. Start the development server and visit http://127.0.0.1:8000/admin/
   to add a first service allowed to authenticate user agains the CAS
   (you'll need the Admin app enabled).

5. Visit http://127.0.0.1:8000/cas/ to login with your django users.