Skip to content

ClaimField class should allow custom base_field configuration #145

Open
@robinmolen

Description

@robinmolen

For Open Formulieren we need to add custom claim fields for eIDAS company information (open-formulieren/open-forms#4453). The claim for this field is urn:etoegang:1.11:EntityConcernedID:eIDASLegalIdentifier, which is too long according to the ClaimField base_field config

class ClaimField(ArrayField):
"""
A field to store a path to claims holding the desired value(s).
Each item is a segment in the path from the root to leaf for nested claims.
"""
def __init__(self, *args, **kwargs):
kwargs["base_field"] = models.CharField(_("claim path segment"), max_length=50)
super().__init__(*args, **kwargs)

I think it would be best to make the ClaimField base_field configurable, to allow situation specific configuration.

If overriding base_field was done intentionally, we could also make max_length configurable, which is then passed to the base_field config.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions