adapt to module reorganization in authentic2 and portail-citoyen

This commit is contained in:
Benjamin Dauvergne 2014-03-21 11:27:08 +01:00
parent ef33765bd7
commit 54b2e9c556
1 changed files with 9 additions and 34 deletions

View File

@ -168,6 +168,7 @@ INSTALLED_APPS = (
'authentic2.saml',
'authentic2.idp',
'authentic2.idp.saml',
'authentic2.idp.idp_openid',
'authentic2.auth2_auth',
'authentic2.attribute_aggregator',
'authentic2.disco_service',
@ -286,7 +287,14 @@ AUTHENTICATION_EVENT_EXPIRATION = int(os.environ.get('AUTHENTICATION_EVENT_EXPIR
# List of IdP backends, mainly used to show available services in the homepage
# of user, and to handle SLO for each protocols
IDP_BACKENDS = [ ]
IDP_BACKENDS = (
'authentic2.idp.saml.backend.SamlBackend',
'authentic2.idp.idp_openid.backend.OpenIDBackend',
)
TEMPLATE_CONTEXT_PROCESSORS += ('authentic2.idp.idp_openid.context_processors.openid_meta',)
RESTRICT_OPENID_RP = ["http://data.montpellier-agglo.com/", ]
IDP_OPENID = True
IDP_SAML2 = True
# You MUST changes these keys, they are just for testing !
LOCAL_METADATA_CACHE_TIMEOUT = int(os.environ.get('LOCAL_METADATA_CACHE_TIMEOUT', 600))
@ -445,14 +453,6 @@ ADMIN_TOOLS_APP_INDEX_DASHBOARD = 'compte_agglo_montpellier.dashboard.CustomAppI
ADMIN_TOOLS_MENU = 'compte_agglo_montpellier.menu.CustomMenu'
ADMIN_TOOLS_THEMING_CSS = 'portail_citoyen/css/admin.css'
AUTH_OPENID = 'AUTH_OPENID' in os.environ
AUTH_SSL = 'AUTH_SSL' in os.environ
AUTH_OATH = 'AUTH_OATH' in os.environ
IDP_SAML2 = True
IDP_OPENID = 'IDP_OPENID' in os.environ
IDP_CAS = 'IDP_CAS' in os.environ
# cms settings
CMS_TEMPLATES = (
('base_two_columns.html', 'Canevas sur deux colonnes'),
@ -541,28 +541,3 @@ if USE_DEBUG_TOOLBAR:
INSTALLED_APPS += ('debug_toolbar',)
except ImportError:
print "Debug toolbar missing, not loaded"
if AUTH_OPENID:
INSTALLED_APPS += ('authentic2.auth2_auth.auth2_openid', 'django_authopenid',)
AUTH_FRONTENDS += ('authentic2.auth2_auth.auth2_openid.backend.OpenIDFrontend',)
if AUTH_SSL:
AUTHENTICATION_BACKENDS += ('authentic2.auth2_auth.auth2_ssl.backend.SSLBackend',)
AUTH_FRONTENDS += ('authentic2.auth2_auth.auth2_ssl.frontend.SSLFrontend',)
INSTALLED_APPS += ('authentic2.auth2_auth.auth2_ssl',)
if AUTH_OATH:
INSTALLED_APPS += ('authentic2.auth2_auth.auth2_oath',)
AUTHENTICATION_BACKENDS += ('authentic2.auth2_auth.auth2_oath.backend.OATHTOTPBackend',)
AUTH_FRONTENDS += ('authentic2.auth2_auth.auth2_oath.frontend.OATHOTPFrontend',)
if IDP_SAML2:
IDP_BACKENDS += ('authentic2.idp.saml.backend.SamlBackend',)
if IDP_OPENID:
INSTALLED_APPS += ('authentic2.idp.idp_openid',)
TEMPLATE_CONTEXT_PROCESSORS += ('authentic2.idp.idp_openid.context_processors.openid_meta',)
RESTRICT_OPENID_RP = ["http://data.montpellier-agglo.com/", ]
if IDP_CAS:
INSTALLED_APPS += ('authentic2.idp.idp_cas',)