saml: add logging around assertion attribute retrieval

This commit is contained in:
Frédéric Péters 2013-05-07 12:26:26 +02:00
parent 7bd6e6b64f
commit f09d2de741
1 changed files with 3 additions and 0 deletions

View File

@ -19,6 +19,7 @@ class Saml2Directory(qommon.saml2.Saml2Directory):
try:
assertion = lasso_session.getAssertions(None)[0]
except:
get_logger().warn('failed to lookup assertion')
return user
d = {}
@ -83,6 +84,8 @@ class Saml2Directory(qommon.saml2.Saml2Directory):
if not (user.name and user.email):
# we didn't get useful attributes, forget it.
get_logger().warn('failed to get useful attributes from the assertion')
get_logger().debug('received attributes: %s', repr(d))
return None
if d.get('local-admin') == 'true':