-
Notifications
You must be signed in to change notification settings - Fork 315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Declarative User Profile : Annotations & validator config as Json #705
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
c := make(map[string]interface{}) | ||
for k, v := range config { | ||
if _, ok := v.([]interface{}); ok { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know that the validators that come bundled with Keycloak either have string or array keys (which is what we're checking for here), but do you think it would also be useful to handle nested objects? You mention that you have custom validators, do any of them use nested objects?
Hi @mrparkers |
Sorry for nagging but is there any progress on this one? We need to be able to create a profile attribute which have a list as validator configuration and an object as annotation. It is for a select input with given options. Anything we can do to help out? Thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again for this PR, sorry for taking so long to get it merged.
Hi @mrparkers Do you plan to make a new tag soon ? We require this feature and would like to use it :) Thanks |
Hello,
In "Declarative User Profile", Annotations and Validators are not just
map[string]string
, it should bemap[string]interface{}
In Terraform, an attribut (in a map) for a resource cannot be String or Object in the same time (Generics missing ;))
With this PR, the workaround I propose is to serialize the object as a Json string.
Hope this will help