Coverage for cas_server/default_settings.py : 96%
![Show keyboard shortcuts](keybd_closed.png)
Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
# -*- coding: utf-8 -*- # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License version 3 for # more details. # # You should have received a copy of the GNU General Public License version 3 # along with this program; if not, write to the Free Software Foundation, Inc., 51 # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # (c) 2015-2016 Valentin Samir
#: URL to the logo showed in the up left corner on the default templates. #: URL to the favicon (shortcut icon) used by the default templates. Default is a key icon. # is settings.DEBUG is False and collectstatics has not been run yet, the static function will # raise a ValueError because the file is not found. except ValueError: #: URL to the logo showed in the up left corner on the default templates. CAS_LOGO_URL = None #: URL to the favicon (shortcut icon) used by the default templates. Default is a key icon. CAS_FAVICON_URL = None
#: Show the powered by footer if set to ``True`` #: URLs to css and javascript external components. "bootstrap3_css": "//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css", "bootstrap3_js": "//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js", "html5shiv": "//oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js", "respond": "//oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js", "jquery": "//code.jquery.com/jquery.min.js", } #: Path to the template showed on /login then the user is not autenticated. #: Path to the template showed on /login?service=... then the user is authenticated and has asked #: to be warned before being connected to a service. #: Path to the template showed on /login then to user is authenticated. #: Path to the template showed on /logout then to user is being disconnected. #: Should we redirect users to /login after they logged out instead of displaying #: :obj:`CAS_LOGOUT_TEMPLATE`.
#: A dotted path to a class or a class implementing cas_server.auth.AuthUser. #: Path to certificate authorities file. Usually on linux the local CAs are in #: /etc/ssl/certs/ca-certificates.crt. ``True`` tell requests to use its internal certificat #: authorities. #: Maximum number of parallel single log out requests send #: if more requests need to be send, there are queued #: Timeout for a single SLO request in seconds. #: Shared to transmit then using the view :class:`cas_server.views.Auth` #: Max time after with the user MUST reauthenticate. Let it to `None` for no max time. #: This can be used to force refreshing cached informations only available upon user authentication #: like the user attributes in federation mode or with the ldap auth in bind mode.
#: Number of seconds the service tickets and proxy tickets are valid. This is the maximal time #: between ticket issuance by the CAS and ticket validation by an application. #: Number of seconds the proxy granting tickets are valid. #: Number of seconds a ticket is kept in the database before sending Single Log Out request and #: being cleared.
#: All CAS implementation MUST support ST and PT up to 32 chars, #: PGT and PGTIOU up to 64 chars and it is RECOMMENDED that all #: tickets up to 256 chars are supports so we use 64 for the default #: len.
#: alias of :obj:`settings.CAS_TICKET_LEN` #: alias of :obj:`settings.CAS_TICKET_LEN` #: Services MUST be able to accept service tickets of up to 32 characters in length. #: alias of :obj:`settings.CAS_TICKET_LEN` #: Back-end services MUST be able to accept proxy tickets of up to 32 characters. #: alias of :obj:`settings.CAS_TICKET_LEN` #: Services MUST be able to handle proxy-granting tickets of up to 64 #: alias of :obj:`settings.CAS_TICKET_LEN` #: Services MUST be able to handle PGTIOUs of up to 64 characters in length.
#: Prefix of login tickets. #: Prefix of service tickets. Service tickets MUST begin with the characters ST so you should not #: change this. #: Prefix of proxy ticket. Proxy tickets SHOULD begin with the characters, PT. #: Prefix of proxy granting ticket. Proxy-granting tickets SHOULD begin with the characters PGT. #: Prefix of proxy granting ticket IOU. Proxy-granting ticket IOUs SHOULD begin with the characters #: PGTIOU.
#: Host for the SQL server. #: Username for connecting to the SQL server. #: Password for connecting to the SQL server. #: Database name. #: Database charset.
#: The query performed upon user authentication. #: The method used to check the user password. Must be one of ``"crypt"``, ``"ldap"``, #: ``"hex_md5"``, ``"hex_sha1"``, ``"hex_sha224"``, ``"hex_sha256"``, ``"hex_sha384"``, #: ``"hex_sha512"``, ``"plain"``. #: charset the SQL users passwords was hash with
#: Address of the LDAP server #: LDAP user bind address, for example ``"cn=admin,dc=crans,dc=org"`` for connecting to the LDAP #: server. #: LDAP connection password #: LDAP seach base DN, for example ``"ou=data,dc=crans,dc=org"``. #: LDAP search filter for searching user by username. User inputed usernames are escaped using #: :func:`ldap3.utils.conv.escape_bytes`. #: LDAP attribute used for users usernames #: LDAP attribute used for users passwords #: The method used to check the user password. Must be one of ``"crypt"``, ``"ldap"``, #: ``"hex_md5"``, ``"hex_sha1"``, ``"hex_sha224"``, ``"hex_sha256"``, ``"hex_sha384"``, #: ``"hex_sha512"``, ``"plain"``. #: charset the LDAP users passwords was hash with
#: Username of the test user. #: Password of the test user. #: Attributes of the test user. 'nom': 'Nymous', 'prenom': 'Ano', 'email': 'anonymous@example.net', 'alias': ['demo1', 'demo2'] }
#: A :class:`bool` for activatinc the hability to fetch tickets using javascript.
#: A :class:`bool` for activating the federated mode #: Time after witch the cookie use for “remember my identity provider” expire (one week).
#: A :class:`bool` for diplaying a warning on html pages then a new version of the application #: is avaible. Once closed by a user, it is not displayed to this user until the next new version. #: A :class:`bool` for sending emails to ``settings.ADMINS`` when a new version is available. #: URL to the pypi json of the application. Used to retreive the version number of the last version. #: You should not change it.
#: If the service message should be displayed on the login page
#: Messages displayed in a info-box on the html pages of the default templates. #: ``CAS_INFO_MESSAGES`` is a :class:`dict` mapping message name to a message :class:`dict`. #: A message :class:`dict` has 3 keys: #: * ``message``: A :class:`unicode`, the message to display, potentially wrapped around #: ugettex_lazy #: * ``discardable``: A :class:`bool`, specify if the users can close the message info-box #: * ``type``: One of info, success, info, warning, danger. The type of the info-box. #: ``CAS_INFO_MESSAGES`` contains by default one message, ``cas_explained``, which explain #: roughly the purpose of a CAS. "cas_explained": { "message": _( u"The Central Authentication Service grants you access to most of our websites by " u"authenticating only once, so you don't need to type your credentials again unless " u"your session expires or you logout." ), "discardable": True, "type": "info", # one of info, success, info, warning, danger }, } #: :class:`list` of message names. Order in which info-box messages are displayed. #: Let the list empty to disable messages display.
# only care about parameter begining by CAS_ # get the current setting value, falling back to default_value # set the setting value to its value if defined, ellse to the default_value.
# Allow the user defined CAS_COMPONENT_URLS to omit not changed values
# if the federated mode is enabled, we must use the :class`cas_server.auth.CASFederateAuth` auth # backend.
#: SessionStore class depending of :django:setting:`SESSION_ENGINE` |