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

Commit e25bf71

Browse files
committed
keys can not be used as attribute name for key information since Configuration is a subclass of dict.
1 parent 0cdca24 commit e25bf71

File tree

4 files changed

+6
-1
lines changed

4 files changed

+6
-1
lines changed

src/oidcop/configure.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@ def __init__(
149149

150150
if key == "template_dir":
151151
_val = os.path.abspath(_val)
152+
if key == "keys":
153+
key = "key_conf"
152154

153155
setattr(self, key, _val)
154156

src/oidcop/endpoint_context.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ def __init__(
202202
self.template_handler = Jinja2TemplateHandler(_loader)
203203

204204
# self.setup = {}
205-
_keys_conf = conf.get("keys")
205+
_keys_conf = conf.get("key_conf")
206206
if _keys_conf:
207207
jwks_uri_path = _keys_conf["uri_path"]
208208

tests/test_00_configure.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ def test_op_configure_from_file():
5151

5252
assert configuration
5353
assert "add_on" in configuration
54+
assert "key_conf" in configuration
5455
authz_conf = configuration["authz"]
5556
assert set(authz_conf.keys()) == {"kwargs", "class"}
5657
id_token_conf = configuration.get("id_token")
@@ -111,6 +112,7 @@ def test_server_configure():
111112
assert "op" in configuration
112113
op_conf = configuration["op"]
113114
assert "add_on" in op_conf
115+
assert "key_conf" in op_conf
114116
authz = op_conf["authz"]
115117
assert set(authz.keys()) == {"kwargs", "class"}
116118
id_token_conf = op_conf.get("id_token", {})

tests/test_00_server.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ def test_capabilities_default():
111111
"code id_token token",
112112
}
113113
assert server.endpoint_context.provider_info["request_uri_parameter_supported"] is True
114+
assert server.endpoint_context.jwks_uri == 'https://127.0.0.1:80/static/jwks.json'
114115

115116

116117
def test_capabilities_subset1():

0 commit comments

Comments
 (0)