diff --git a/pyproject.toml b/pyproject.toml index f63cfeb0..c1b4b9d6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta" [metadata] name = "oidcop" -version = "2.3.0" +version = "2.3.2" author = "Roland Hedberg" author_email = "roland@catalogix.se" description = "Python implementation of an OAuth2 AS and an OIDC Provider" diff --git a/src/oidcop/__init__.py b/src/oidcop/__init__.py index 90a3e6a1..a932814f 100644 --- a/src/oidcop/__init__.py +++ b/src/oidcop/__init__.py @@ -1,6 +1,6 @@ import secrets -__version__ = "2.3.1" +__version__ = "2.3.2" DEF_SIGN_ALG = { "id_token": "RS256", diff --git a/src/oidcop/configure.py b/src/oidcop/configure.py index f286d80f..06332d22 100755 --- a/src/oidcop/configure.py +++ b/src/oidcop/configure.py @@ -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) diff --git a/src/oidcop/endpoint_context.py b/src/oidcop/endpoint_context.py index fb513a58..00d9da6c 100755 --- a/src/oidcop/endpoint_context.py +++ b/src/oidcop/endpoint_context.py @@ -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"] diff --git a/tests/test_00_configure.py b/tests/test_00_configure.py index c0c9a815..ed097558 100644 --- a/tests/test_00_configure.py +++ b/tests/test_00_configure.py @@ -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") @@ -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", {}) diff --git a/tests/test_00_server.py b/tests/test_00_server.py index a784e87a..c168c822 100755 --- a/tests/test_00_server.py +++ b/tests/test_00_server.py @@ -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():