Skip to content

Commit

Permalink
Merge pull request #1516 from maykinmedia/issue/2860-hc-brp-afnemer-h…
Browse files Browse the repository at this point in the history
…eader

[#2860] Additional header for Haal Centraal BRP via Yenlo
  • Loading branch information
alextreme authored Dec 13, 2024
2 parents 235ec5a + f360032 commit a4eb8ae
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/open_inwoner/haalcentraal/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ def make_request(self, user_bsn: str) -> requests.Response:
headers["x-doelbinding"] = self.config.api_doelbinding
if self.config.api_verwerking:
headers["x-verwerking"] = self.config.api_verwerking
if self.config.api_afnemer_oin: # See Taiga #2860 / Yenlo
headers["x-afnemer-oin"] = self.config.api_afnemer_oin

response = self.client.post(
url=url,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 4.2.16 on 2024-12-04 13:47

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("haalcentraal", "0003_haalcentraalconfig_api_verwerking_and_more"),
]

operations = [
migrations.AddField(
model_name="haalcentraalconfig",
name="api_afnemer_oin",
field=models.CharField(
blank=True,
help_text="Value of the 'x-afnemer-oin' header for Haalcentraal BRP API requests.",
max_length=64,
verbose_name="API 'OIN' afnemer header",
),
),
]
8 changes: 8 additions & 0 deletions src/open_inwoner/haalcentraal/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ class HaalCentraalConfig(SingletonModel):
"Value of the 'x-origin-oin' header for Haalcentraal BRP API requests."
),
)
api_afnemer_oin = models.CharField(
verbose_name=_("API 'OIN' afnemer header"),
max_length=64,
blank=True,
help_text=_(
"Value of the 'x-afnemer-oin' header for Haalcentraal BRP API requests."
),
)
api_doelbinding = models.CharField(
verbose_name=_("API 'doelbinding' header"),
max_length=64,
Expand Down

0 comments on commit a4eb8ae

Please sign in to comment.