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
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,8 @@ We use GitHub pull requests. If your PR should produce a new release of authoriz

Changelog
---------
* v2.4.1
* Bugfix: handle both string and dict versions of jwks definitions.
* v2.4.0
* Make middleware use TRUSTED_JWKS by default; compose this from other settings if needed.
* Allow jwks from file/dict in TRUSTED_JWKS rather than url for testing.
Expand Down
6 changes: 5 additions & 1 deletion authorization_django/jwks.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from __future__ import annotations

import json
import logging
import time
from collections import defaultdict
Expand Down Expand Up @@ -62,7 +63,10 @@ def check_update_keyset(self):

def _load_jwks(keyset: JWKSet, jwks):
try:
keyset.import_keyset(jwks)
if type(jwks) is str:
keyset.import_keyset(jwks)
else:
keyset.import_keyset(json.dumps(jwks))
except JWException as e:
raise AuthzConfigurationError("Failed to import keyset from settings") from e
logger.info("Loaded JWKS from JWKS setting.")
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "uv_build"

[project]
name = "datapunt-authorization-django"
version = "2.4.0"
version = "2.4.1"
description = "Datapunt authorization check for Django"
readme = "README.md"
requires-python = ">=3.10"
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading