Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

Commit 02cfc1e

Browse files
committed
If no ID Token then no sid.
1 parent 3088dec commit 02cfc1e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/oidcrp/rp_handler.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from inspect import currentframe
12
import logging
23
import sys
34
import traceback
@@ -377,7 +378,6 @@ def init_authorization(self,
377378
"""
378379

379380
logger.debug(20 * "*" + " init_authorization " + 20 * "*")
380-
381381
if not client:
382382
if state:
383383
client = self.get_client_from_session_key(state)
@@ -791,16 +791,15 @@ def finalize(self, issuer, response, behaviour_args: Optional[dict] = None):
791791

792792
_context = client.client_get("service_context")
793793
try:
794-
_sid_support = _context.get('provider_info')[
795-
'backchannel_logout_session_supported']
794+
_sid_support = _context.get('provider_info')['backchannel_logout_session_supported']
796795
except KeyError:
797796
try:
798797
_sid_support = _context.get('provider_info')[
799798
'frontchannel_logout_session_supported']
800799
except:
801800
_sid_support = False
802801

803-
if _sid_support:
802+
if _sid_support and _id_token:
804803
try:
805804
sid = _id_token['sid']
806805
except KeyError:

0 commit comments

Comments
 (0)