Add a verbone names to CAS_FEDERATE_PROVIDERS

This commit is contained in:
Valentin Samir
2016-06-21 14:42:35 +02:00
parent 46cfaa6745
commit a00e5d403d
4 changed files with 44 additions and 8 deletions

View File

@@ -295,19 +295,21 @@ For instance:
.. code-block:: python
CAS_FEDERATE_PROVIDERS = {
"example.com": ("https://cas.example.com", 3),
"exemple.fr": ("https://cas.exemple.fr", 3),
"example.com": ("https://cas.example.com", 3, "Example dot com"),
"exemple.fr": ("https://cas.exemple.fr", 3, "Exemple point fr"),
}
``CAS_FEDERATE_PROVIDERS`` is a dictionnary using provider names as key and a tuple
(cas address, cas version protocol) as value.
(cas address, cas version protocol, provider verbose name) as value.
In federation mode, ``django-cas-server`` build user's username as follow:
``provider_returned_username@provider_name``.
You can choose the provider returned username for ``django-cas-server`` and the provider name
in order to make sense.
The "provider verbose name" is showed on the select menu of the login page.
Then using federate mode, you should add one command to a daily crontab: ``cas_clean_federate``.
This command clean the local cache of federated user from old unused users.