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

Commit

Permalink
keys can not be used as attribute name for key information since Conf…
Browse files Browse the repository at this point in the history
…iguration is a subclass of dict.
  • Loading branch information
rohe committed Dec 16, 2021
1 parent 0cdca24 commit e25bf71
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/oidcop/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ def __init__(

if key == "template_dir":
_val = os.path.abspath(_val)
if key == "keys":
key = "key_conf"

setattr(self, key, _val)

Expand Down
2 changes: 1 addition & 1 deletion src/oidcop/endpoint_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def __init__(
self.template_handler = Jinja2TemplateHandler(_loader)

# self.setup = {}
_keys_conf = conf.get("keys")
_keys_conf = conf.get("key_conf")
if _keys_conf:
jwks_uri_path = _keys_conf["uri_path"]

Expand Down
2 changes: 2 additions & 0 deletions tests/test_00_configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ def test_op_configure_from_file():

assert configuration
assert "add_on" in configuration
assert "key_conf" in configuration
authz_conf = configuration["authz"]
assert set(authz_conf.keys()) == {"kwargs", "class"}
id_token_conf = configuration.get("id_token")
Expand Down Expand Up @@ -111,6 +112,7 @@ def test_server_configure():
assert "op" in configuration
op_conf = configuration["op"]
assert "add_on" in op_conf
assert "key_conf" in op_conf
authz = op_conf["authz"]
assert set(authz.keys()) == {"kwargs", "class"}
id_token_conf = op_conf.get("id_token", {})
Expand Down
1 change: 1 addition & 0 deletions tests/test_00_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ def test_capabilities_default():
"code id_token token",
}
assert server.endpoint_context.provider_info["request_uri_parameter_supported"] is True
assert server.endpoint_context.jwks_uri == 'https://127.0.0.1:80/static/jwks.json'


def test_capabilities_subset1():
Expand Down

0 comments on commit e25bf71

Please sign in to comment.