1.11
[auf_django_saml.git] / auf / django / saml / monkey.py
CommitLineData
dfe3afcc
OL
1# -*- coding: utf-8 -*-
2
3"""
4Setup automatique de LOGIN_URL et LOGOUT_URL
5si SAML_AUTO_AUTH_URLS est positionné à True
6"""
7
8import django
9from django.conf import settings
10import settings as saml_settings
11
12
13if saml_settings.SAML_AUTO_AUTH_URLS:
14 if saml_settings.SAML_AUTH:
15 LOGIN_URL = '/mellon/login'
16 LOGOUT_URL = '/logout'
17 else:
18 LOGIN_URL = '/sandbox/login'
19 LOGOUT_URL = '/sandbox/logout'
20
21 django.contrib.auth.REDIRECT_FIELD_NAME = saml_settings.SAML_REDIRECT_FIELD_NAME
22 settings.LOGIN_URL = LOGIN_URL
23 settings.LOGOUT_URL = LOGOUT_URL