Debut integration django-mellon dans l'appli
This commit is contained in:
parent
bacd75d1a2
commit
b78915f483
|
@ -8,6 +8,7 @@ import ldap
|
|||
import ldap.modlist as modlist
|
||||
import json
|
||||
|
||||
#import django-mellon
|
||||
|
||||
# Create your views here.
|
||||
base = "ou=People,dc=entrouvert,dc=lan"
|
||||
|
|
|
@ -26,8 +26,19 @@ TEMPLATE_DEBUG = True
|
|||
|
||||
ALLOWED_HOSTS = []
|
||||
|
||||
MELLON_IDENTITY_PROVIDERS = [{
|
||||
'METADATA_URL': 'http://localhost:8999/idp/saml2/metadata'
|
||||
}]
|
||||
|
||||
# Application definition
|
||||
AUTHENTICATION_BACKENDS = (
|
||||
'mellon.backends.SAMLBackend',
|
||||
)
|
||||
|
||||
LOGIN_URL = 'mellon_login'
|
||||
LOGOUT_URL = 'mellon_logout'
|
||||
|
||||
|
||||
|
||||
INSTALLED_APPS = (
|
||||
'django.contrib.admin',
|
||||
|
@ -37,6 +48,7 @@ INSTALLED_APPS = (
|
|||
'django.contrib.messages',
|
||||
'django.contrib.staticfiles',
|
||||
'saml',
|
||||
'mellon',
|
||||
)
|
||||
|
||||
MIDDLEWARE_CLASSES = (
|
||||
|
|
|
@ -10,4 +10,5 @@ urlpatterns = patterns('',
|
|||
|
||||
url(r'^admin/', include(admin.site.urls)),
|
||||
url(r'^saml/', include('saml.urls')),
|
||||
url(r'^accounts/mellon/', include('mellon.urls')),
|
||||
)
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Get venv site-packages path
|
||||
DSTDIR=`python -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())'`
|
||||
|
||||
# Get not venv site-packages path
|
||||
# Remove first path (assuming that is the venv path)
|
||||
NONPATH=`echo $PATH | sed 's/^[^:]*://'`
|
||||
SRCDIR=`PATH=$NONPATH python -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())'`
|
||||
|
||||
# Clean up
|
||||
rm -f $DSTDIR/lasso.*
|
||||
rm -f $DSTDIR/_lasso.*
|
||||
|
||||
# Link
|
||||
ln -sv $SRCDIR/lasso.py $DSTDIR
|
||||
ln -sv $SRCDIR/_lasso.* $DSTDIR
|
||||
|
||||
exit 0
|
2
doc.md
2
doc.md
|
@ -604,6 +604,8 @@ Dans Authentic 2, cette politique de gestion consiste en un choix parmi trois po
|
|||
* Permettre à l'utilisateur de choisir, attribut par attribut, ceux qui peuvent être redirigés
|
||||
|
||||
#### authentic2-ctl
|
||||
installation par pip en local
|
||||
pip install ./
|
||||
Outil d'administration en ligne de commande
|
||||
|
||||
#### Installation
|
||||
|
|
Reference in New Issue