summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Marillonnet <pmarillonnet@entrouvert.com>2017-10-18 07:48:25 (GMT)
committerPaul Marillonnet <pmarillonnet@entrouvert.com>2017-10-18 07:48:25 (GMT)
commit5726ddcf1fa875c51c9f747895ce1696c800891f (patch)
tree037c9001a3c82ca358886bfb6fada832d3aa23fb
parent0bc4765a34d01a1932020c12c339854c45ee736f (diff)
downloadpaul-synchro-5726ddcf1fa875c51c9f747895ce1696c800891f.zip
paul-synchro-5726ddcf1fa875c51c9f747895ce1696c800891f.tar.gz
paul-synchro-5726ddcf1fa875c51c9f747895ce1696c800891f.tar.bz2
POC Campus Condorcet : logs de la session mellon et des metadonnes SAML
-rw-r--r--django/sp_sso/sp_sso/views.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/django/sp_sso/sp_sso/views.py b/django/sp_sso/sp_sso/views.py
index acdfd93..1b9cd87 100644
--- a/django/sp_sso/sp_sso/views.py
+++ b/django/sp_sso/sp_sso/views.py
@@ -5,7 +5,7 @@ from django.contrib.auth import logout as auth_logout
from django.contrib.auth import views as auth_views
from django.utils.translation import ugettext as _
from django.views.generic import FormView
-from mellon.utils import get_idps
+from mellon.utils import get_idps, create_metadata
from saml.forms import RegistrationForm
from saml.utils import sso_attributes, render_message, ldap_contains_user, \
@@ -46,6 +46,9 @@ def logout(request, next_page=None):
return HttpResponseRedirect(next_page)
def logged_in(request, next_page=None):
+ if hasattr(request, 'session'):
+ logger.info('Mellon session : %r \n' % request.session.get('mellon_session', {}))
+ logger.info('SAML Metadata : %r \n' % create_metadata(request))
callback = request.session.get('next_field', '/')
return HttpResponseRedirect(callback)