Skip to content

Commit

Permalink
Merge pull request #345 from bthorben/master
Browse files Browse the repository at this point in the history
Better logging for _get_attribute_value to debug wrong configurations
  • Loading branch information
Giuseppe De Marco authored Sep 20, 2022
2 parents bbe845a + 455052f commit 16bb169
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions djangosaml2/backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,11 @@ def _get_attribute_value(
return saml_attribute[0]
else:
logger.error(
"attributes[saml_attr] attribute "
"value is missing. Probably the user "
"session is expired."
"attributes[saml_attr] attribute value is missing. "
f"Either the user session is expired or your mapping is invalid.\n"
f"django_field: {django_field}\n"
f"attributes: {attributes}\n"
f"attribute_mapping: {attribute_mapping}"
)

def authenticate(
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def read(*rnames):

setup(
name="djangosaml2",
version="1.5.2",
version="1.5.3",
description="pysaml2 integration for Django",
long_description=read("README.md"),
long_description_content_type="text/markdown",
Expand Down

0 comments on commit 16bb169

Please sign in to comment.