Skip to content

allow user info schema customization#89

Draft
Nimo-19 wants to merge 10 commits into
collective:mainfrom
Nimo-19:88-allow-schema-customisation
Draft

allow user info schema customization#89
Nimo-19 wants to merge 10 commits into
collective:mainfrom
Nimo-19:88-allow-schema-customisation

Conversation

@Nimo-19

@Nimo-19 Nimo-19 commented Jun 10, 2026

Copy link
Copy Markdown

Allow user info schema customization to correctly parse Oauth spec lists. should fix: #88

The idea is to configure a list of values of the style <claim>:<ParamDefinitionName>
During the get_user_info step the configuration is parsed into its corresponding ParamDefinition form oic/oauth2/message.py:

SINGLE_REQUIRED_STRING = ParamDefinition(str, True, None, None, False)
SINGLE_OPTIONAL_STRING = ParamDefinition(str, False, None, None, False)
SINGLE_OPTIONAL_INT = ParamDefinition(int, False, None, None, False)
OPTIONAL_LIST_OF_STRINGS = ParamDefinition([str], False, list_serializer, list_deserializer, False)
REQUIRED_LIST_OF_STRINGS = ParamDefinition([str], True, list_serializer, list_deserializer, False)
OPTIONAL_LIST_OF_SP_SEP_STRINGS = ParamDefinition([str], False, sp_sep_list_serializer, sp_sep_list_deserializer, False)
REQUIRED_LIST_OF_SP_SEP_STRINGS = ParamDefinition([str], True, sp_sep_list_serializer, sp_sep_list_deserializer, False)
SINGLE_OPTIONAL_JSON = ParamDefinition(str, False, json_serializer, json_deserializer, False)

The OpenIDSchema from oic/message.py is now extended and the claim can be parsed correctly by the pyoidc package.

I didn't get a better idea for configuration. JSONField in the plone ui clashed somehow with the acl_users ui.

@Nimo-19 Nimo-19 marked this pull request as draft June 10, 2026 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

claim used for group_ids won't be parsed correctly and will always be one string

1 participant