Skip to content

Commit 4715811

Browse files
authored
[#293] update token configuration file namespaces (#305)
1 parent 3c7e502 commit 4715811

11 files changed

+21
-22
lines changed

docker/setup_configuration/data.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
openklant_tokens_config_enable: true
2-
openklant_tokens:
1+
tokenauth_config_enable: true
2+
tokenauth:
33
items:
44
- identifier: token-1
55
token: ba9d233e95e04c4a8a661a27daffe7c9bd019067

docs/installation/setup_configuration.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ Create a (single) YAML configuration file with your settings:
3131

3232
.. code-block:: yaml
3333
34-
openklant_tokens_config_enable: true
35-
openklant_tokens:
34+
tokenauth_config_enable: true
35+
tokenauth:
3636
items:
3737
- identifier: token-1
3838
token: ba9d233e95e04c4a8a661a27daffe7c9bd019067

src/openklant/setup_configuration/models.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
from django_setup_configuration.models import ConfigurationModel
2-
from pydantic import Field
32

43
from openklant.components.token.models import TokenAuth
54

@@ -20,4 +19,4 @@ class Meta:
2019

2120

2221
class TokenAuthGroupConfigurationModel(ConfigurationModel):
23-
items: list[TokenAuthConfigurationModel] = Field()
22+
items: list[TokenAuthConfigurationModel]

src/openklant/setup_configuration/steps.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ class TokenAuthConfigurationStep(
1919
Configure configuration groups for the Objects API backend
2020
"""
2121

22-
namespace = "openklant_tokens"
23-
enable_setting = "openklant_tokens_config_enable"
22+
namespace = "tokenauth"
23+
enable_setting = "tokenauth_config_enable"
2424

2525
verbose_name = "Configuration to set up authentication tokens for Open Klant"
2626
config_model = TokenAuthGroupConfigurationModel

src/openklant/setup_configuration/tests/files/token_all_fields.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
openklant_tokens_config_enable: true
2-
openklant_tokens:
1+
tokenauth_config_enable: true
2+
tokenauth:
33
items:
44
- identifier: token-1
55
token: 18b2b74ef994314b84021d47b9422e82b685d82f

src/openklant/setup_configuration/tests/files/token_empty_database.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
openklant_tokens_config_enable: true
2-
openklant_tokens:
1+
tokenauth_config_enable: true
2+
tokenauth:
33
items:
44
- identifier: token-1
55
token: 7b2b212d9f16d171a70a1d927cdcfbd5ca7a4799

src/openklant/setup_configuration/tests/files/token_existing_tokens.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
openklant_tokens_config_enable: true
2-
openklant_tokens:
1+
tokenauth_config_enable: true
2+
tokenauth:
33
items:
44
- identifier: token-1
55
token: 18b2b74ef994314b84021d47b9422e82b685d82f

src/openklant/setup_configuration/tests/files/token_idempotent.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
openklant_tokens_config_enable: true
2-
openklant_tokens:
1+
tokenauth_config_enable: true
2+
tokenauth:
33
items:
44
- identifier: token-1
55
token: 7b2b212d9f16d171a70a1d927cdcfbd5ca7a4799

src/openklant/setup_configuration/tests/files/token_invalid_email.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
openklant_tokens_config_enable: true
2-
openklant_tokens:
1+
tokenauth_config_enable: true
2+
tokenauth:
33
items:
44
- identifier: token-1
55
token: ba9d233e95e04c4a8a661a27daffe7c9bd019067

src/openklant/setup_configuration/tests/files/token_invalid_identifier.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
openklant_tokens_config_enable: true
2-
openklant_tokens:
1+
tokenauth_config_enable: true
2+
tokenauth:
33
items:
44
- identifier: foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar
55
token: ba9d233e95e04c4a8a661a27daffe7c9bd019067

src/openklant/setup_configuration/tests/files/token_invalid_token.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
openklant_tokens_config_enable: true
2-
openklant_tokens:
1+
tokenauth_config_enable: true
2+
tokenauth:
33
items:
44
- identifier: token-1
55
token: foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar

0 commit comments

Comments
 (0)