From 19cac4bf43b50fae9c3427003b3da0f1d7ce2cd9 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Thu, 17 Jun 2021 13:52:10 +0200 Subject: [PATCH] providers/saml: fix error when getting transient user identifier Signed-off-by: Jens Langhammer --- authentik/providers/saml/processors/assertion.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/authentik/providers/saml/processors/assertion.py b/authentik/providers/saml/processors/assertion.py index f441fe657..20e14e1bf 100644 --- a/authentik/providers/saml/processors/assertion.py +++ b/authentik/providers/saml/processors/assertion.py @@ -184,7 +184,7 @@ class AssertionProcessor: return name_id if name_id.attrib["Format"] == SAML_NAME_ID_FORMAT_TRANSIENT: # Use the hash of the user's session, which changes every session - session_key: str = self.http_request.user.session.session_key + session_key: str = self.http_request.session.session_key name_id.text = sha256(session_key.encode()).hexdigest() return name_id raise UnsupportedNameIDFormat(