Skip to content

Commit 16bb169

Browse files
author
Giuseppe De Marco
authored
Merge pull request #345 from bthorben/master
Better logging for _get_attribute_value to debug wrong configurations
2 parents bbe845a + 455052f commit 16bb169

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

djangosaml2/backends.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,11 @@ def _get_attribute_value(
110110
return saml_attribute[0]
111111
else:
112112
logger.error(
113-
"attributes[saml_attr] attribute "
114-
"value is missing. Probably the user "
115-
"session is expired."
113+
"attributes[saml_attr] attribute value is missing. "
114+
f"Either the user session is expired or your mapping is invalid.\n"
115+
f"django_field: {django_field}\n"
116+
f"attributes: {attributes}\n"
117+
f"attribute_mapping: {attribute_mapping}"
116118
)
117119

118120
def authenticate(

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def read(*rnames):
2727

2828
setup(
2929
name="djangosaml2",
30-
version="1.5.2",
30+
version="1.5.3",
3131
description="pysaml2 integration for Django",
3232
long_description=read("README.md"),
3333
long_description_content_type="text/markdown",

0 commit comments

Comments
 (0)