Skip to content

Commit

Permalink
⬆️ Upgrade commonground-api-common to 1.13.4
Browse files Browse the repository at this point in the history
this version moves the auth middleware to the proper directory, to avoid unnecessary migrations if the authorizations app is unused

also remove the vng_api_common.authorizations.AuthMiddleware from the MIDDLEWARE setting, because Open Klant does not use JWT authentication
  • Loading branch information
stevenbal committed Oct 25, 2024
1 parent 77ab5b0 commit c42cf93
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ click-plugins==1.1.1
# via celery
click-repl==0.3.0
# via celery
commonground-api-common==1.13.3
commonground-api-common==1.13.4
# via open-api-framework
coreapi==2.3.3
# via commonground-api-common
Expand Down
2 changes: 1 addition & 1 deletion requirements/ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ click-repl==0.3.0
# celery
codecov==2.1.13
# via -r requirements/ci.in
commonground-api-common==1.13.3
commonground-api-common==1.13.4
# via
# -r requirements/base.txt
# open-api-framework
Expand Down
2 changes: 1 addition & 1 deletion requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ click-repl==0.3.0
# via
# -r requirements/base.txt
# celery
commonground-api-common==1.13.3
commonground-api-common==1.13.4
# via
# -r requirements/base.txt
# open-api-framework
Expand Down
5 changes: 0 additions & 5 deletions src/openklant/conf/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@
# but we don't want to rely on it anymore (e.g. when generating the label for 2FA)
INSTALLED_APPS.remove("django.contrib.sites")

# FIXME should these be part of OAf?
MIDDLEWARE.insert(
MIDDLEWARE.index("django.contrib.auth.middleware.AuthenticationMiddleware") + 1,
"vng_api_common.middleware.AuthMiddleware",
)
MIDDLEWARE = MIDDLEWARE + ["openklant.utils.middleware.APIVersionHeaderMiddleware"]

#
Expand Down
2 changes: 1 addition & 1 deletion src/openklant/tests/test_cors_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def test_credentialed_request(self):
response = self.client.get(
"/cors",
HTTP_ORIGIN="http://localhost:3000",
HTTP_AUTHORIZATION="Bearer foobarbaz",
HTTP_AUTHORIZATION="Token foobarbaz",
)

self.assertEqual(response["Access-Control-Allow-Origin"], "*")
Expand Down

0 comments on commit c42cf93

Please sign in to comment.