'How to add custom attributes for Keycloak client (not user)?

I would like to add custom attributes to a Keycloak client, similar as we already have "Valid Redirect URIs" which we can easily configure in the Keycloak admin console.

To be more specific - i would like to configure such attributes as "Error redirect URI", which i would be able to access in a custom auth extension f.ex. from the ClientModel.

Is this possible?

Note: I have already tried creating Protocol Mappers (like hardcoded claim), but this feels like a bad workaround and is more on the user level not a client level.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source