X-Git-Url: https://git.mdrn.pl/django-cas-provider.git/blobdiff_plain/38e127a205b49ab137d554895d426cb8e7dcd785..82bdc6de3fbe4463fcb13520c6c62f9b0715524c:/README.rst diff --git a/README.rst b/README.rst index d7bed27..b093c3f 100644 --- a/README.rst +++ b/README.rst @@ -23,9 +23,11 @@ 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 @@ -62,11 +64,17 @@ PROVIDED VIEWS 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: -* 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