Skip to content

Commit 88e3c41

Browse files
author
Thorben Croisé
committed
Better logging for _get_attribute_value to debug wrong configurations
1 parent bbe845a commit 88e3c41

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

djangosaml2/backends.py

Lines changed: 5 additions & 3 deletions
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(

0 commit comments

Comments
 (0)