Skip to content

Commit 7569430

Browse files
committed
Simplifications
1 parent ca85bef commit 7569430

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/idpyoidc/client/oauth2/stand_alone_client.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@ def do_provider_info(
6161
_pi = _context.get("provider_info")
6262
if _pi is None:
6363
dynamic_provider_info_discovery(self, behaviour_args=behaviour_args)
64-
return _context.get("provider_info")["issuer"]
64+
_pi = _context.provider_info
6565
elif len(_pi) == 1 and 'issuer' in _pi:
6666
_context.issuer = _pi['issuer']
6767
dynamic_provider_info_discovery(self, behaviour_args=behaviour_args)
68-
return _context.issuer
68+
_pi = _context.provider_info
6969
else:
7070
for key, val in _pi.items():
7171
# All service endpoint parameters in the provider info has
@@ -95,12 +95,8 @@ def do_provider_info(
9595
else:
9696
raise ValueError("Unknown provider JWKS type: {}".format(typ))
9797

98-
_context.map_supported_to_preferred(info=_pi)
99-
100-
try:
101-
return _context.get("provider_info")["issuer"]
102-
except KeyError:
103-
return _context.get("issuer")
98+
_context.map_supported_to_preferred(info=_pi)
99+
return _context.provider_info['issuer']
104100

105101
def do_client_registration(
106102
self,

0 commit comments

Comments
 (0)