Skip to content

Commit 6358ade

Browse files
committed
fix: handle case where entity_id is None in start_logout
1 parent f4c8760 commit 6358ade

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Diff for: src/satosa/backends/saml2.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -204,10 +204,14 @@ def start_logout(self, context, internal_req, internal_authn_resp):
204204
205205
:type context: satosa.context.Context
206206
:type internal_req: satosa.internal.InternalData
207-
:rtype:
207+
:rtype: satosa.response.Response
208208
"""
209209

210-
entity_id = self.get_idp_entity_id(context)
210+
entity_id = internal_authn_resp["auth_info"]["issuer"]
211+
if entity_id is None:
212+
message = "Logout Failed"
213+
status = "500 FAILED"
214+
return Response(message=message, status=status)
211215
return self.logout_request(context, entity_id, internal_authn_resp)
212216

213217
def disco_query(self, context):

0 commit comments

Comments
 (0)