Redirect to login view instead of partially reimplementing it. Remove unusable flows...
[django-cas-provider.git] / README.rst
index 258d685..b093c3f 100644 (file)
@@ -19,36 +19,15 @@ Or, put `cas_provider` somewhere on your Python path.
 
 If you want use CAS v.2 protocol or above, you must install `lxml` package to correct work.
 
 
 If you want use CAS v.2 protocol or above, you must install `lxml` package to correct work.
 
-UPDATING FROM PREVIOUS VERSION
-===============================
-
-I introduced south for DB schema migration. The schema from any previous version without south is 0001_initial.
-You will get an error:
-
-    ``Running migrations for cas_provider:``
-
-    ``- Migrating forwards to 0001_initial.``
-
-    ``> cas_provider:0001_initial``
-
-    ``Traceback (most recent call last):``
-
-    ``...``
-
-    ``django.db.utils.DatabaseError: relation "cas_provider_serviceticket" already exists``
-
-to circumvent that problem you will need to fake the initial migration:
-
- python manage.py migrate cas_provider 0001_initial --fake
-
-
 USAGE
 ======
 
 #. Add ``'cas_provider'`` to your ``INSTALLED_APPS`` tuple in *settings.py*.
 USAGE
 ======
 
 #. Add ``'cas_provider'`` to your ``INSTALLED_APPS`` tuple in *settings.py*.
-#. In *settings.py*, set ``LOGIN_URL`` to ``'/cas/login/'`` and ``LOGOUT_URL`` to ``'/cas/logout/'``
-#. In *urls.py*, put the following line: ``(r'^cas/', include('cas_provider.urls')),``
-#. Create login/logout templates (or modify the samples)
+#. In *urls.py*, put the following line: ``path('cas/', include('cas_provider.urls')),``
+#. Set up a regular Django login view (e.g. ``django.contrib.auth.views.LoginView``,
+   included in ``django.contrib.auth.urls``) and point ``LOGIN_URL`` to it.
+   ``LOGIN_URL`` must *not* point to the CAS login endpoint.
+#. Create logout and warn templates (or modify the samples)
 #. Use 'cleanuptickets' management command to clean up expired tickets
 
 SETTINGS
 #. Use 'cleanuptickets' management command to clean up expired tickets
 
 SETTINGS
@@ -85,11 +64,17 @@ PROVIDED VIEWS
 login
 ---------
 
 login
 ---------
 
+This is the CAS login endpoint (``/login?service=...``). It doesn't display a login form:
+if the user is not authenticated, it redirects to ``settings.LOGIN_URL``
+with ``next`` pointing back to itself. Once the user is authenticated, it issues
+a Service Ticket and redirects to the service.
+
+The ``renew`` and ``gateway`` parameters are not supported.
+
 It has not required arguments.
 
 Optional arguments:
 
 It has not required arguments.
 
 Optional arguments:
 
-* template_name - login form template name (default is 'cas/login.html')
 * success_redirect - redirect after successful login if service GET argument is not provided
    (default is settings.LOGIN_REDIRECT_URL)
 * warn_template_name - warning page template name to allow login user to service if he
 * success_redirect - redirect after successful login if service GET argument is not provided
    (default is settings.LOGIN_REDIRECT_URL)
 * warn_template_name - warning page template name to allow login user to service if he