Keycloak自定义属性在编辑时进行验证 [英] Keycloak custom attrbiutes validation on edit
问题描述
我为组织对注册字段的要求添加了一些自定义属性.定制了主题并根据文档添加了验证.它工作正常.我也可以通过修改帐户模板将这些属性添加到帐户管理页面.
I have added few custom attributes for my org's requirement to registration field. Have customized the theme and added validation as per the documentation. It works fine. I could add these attributes to account management page also by modifying the account template.
但是,我想增加在帐户管理下编辑这些自定义属性的功能,以及此编辑操作的自定义验证逻辑.我找不到任何参考文件.
However, I want to add capability to edit these custom attributes under account management as well as custom validation logic for this edit action. I can't get any reference to the documentation.
非常感谢您的帮助.我正在RHEL 7.9 OS和Java 11上使用Keycloak 12.0.2.
Would appreciate any help. I am using Keycloak 12.0.2 on RHEL 7.9 OS with Java 11.
推荐答案
对此我知道三个选项.
- 您可以根据需要覆盖Keycloak源代码,但我不建议这样做,因为如果您更新源代码,则使用新版本的keycloak会更加困难.
- 您可以在修改帐户模板时重新放置自定义验证.
- 您可以编写一个全新的界面,而不直接使用keycloak,也可以编写新的后端,该后端在keycloak上使用admin rest api.通过这种方式,您可以找到用于不同语言的keycloak admin api的适配器(对于Js: keycloak-admin )
这篇关于Keycloak自定义属性在编辑时进行验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!