Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/idpyoidc/client/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def __init__(
jwks_uri = jwks_uri or self.get_metadata_value("jwks_uri")
set_jwks_uri_or_jwks(self, self._service_context, config, jwks_uri, _kj)

# Deal with backward compatible
# Deal with backward compatibility
self.backward_compatibility(config)

self.construct_uris(self._service_context.issuer,
Expand Down Expand Up @@ -351,6 +351,11 @@ def backward_compatibility(self, config):
"usage", "services", "add_ons"]:
self.extra[key] = val

auth_request_args = config.conf.get("request_args", {})
if auth_request_args:
authz_serv = self.get_service('authorization')
authz_serv.default_request_args.update(auth_request_args)

def config_args(self):
res = {}
for id, service in self._service.items():
Expand Down
2 changes: 1 addition & 1 deletion src/idpyoidc/client/oidc/authorization.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class Authorization(authorization.Authorization):

def __init__(self, client_get, conf=None):
authorization.Authorization.__init__(self, client_get, conf=conf)
self.default_request_args = {"scope": ["openid"]}
self.default_request_args.update({"scope": ["openid"]})
self.pre_construct = [
self.set_state,
pre_construct_pick_redirect_uri,
Expand Down
9 changes: 9 additions & 0 deletions src/idpyoidc/client/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,11 @@ def __init__(
elif def_val is not None:
self.usage[param] = def_val

_default_request_args = conf.get("request_args", {})
if _default_request_args:
self.default_request_args = _default_request_args
del conf["request_args"]

else:
self.conf = {}

Expand Down Expand Up @@ -164,6 +169,10 @@ def gather_request_args(self, **kwargs):
if val:
ar_args[prop] = val

for key, val in self.default_request_args.items():
if key not in ar_args:
ar_args[key] = val

return ar_args

def method_args(self, context, **kwargs):
Expand Down