如何自定义 keycloak AccountPages?

How do I customize keycloak AccountPages?

我开发了一个定制的spi_keycloak。

并且部署成功。但对于某些人,我想在 AccountPages 中编辑 (add/delete) 个页面。

为了显示我想要更改的内容,请看这张图片,我想编辑左侧的项目(内容)和菜单。

如何在我的 keycloak 中构建和部署。

换句话说,当我访问/auth/realms/abc/account页面时,我可以看到左侧有一个侧边栏菜单,其中包含“帐户”、“密码”、“身份验证器”等选项.我想在该侧边栏中添加一个新项目,并能够通过 /auth/realms/abc/account/custom

之类的内容进行访问

Keycloak 12 was released recently and allows you to write custom React code in the account console. This is the recommended way to go for newer keycloak versions. You can customise the new account console as shown in the keycloak quickstarts.

对于较旧的 keycloak 版本,您可以通过 adding a custom theme 自定义帐户控制台。 您可以使用 existing base template for inspiration.

稍后编辑: 要创建您的自定义休息端点,请参阅 keycloak rest extension example

这可用于管理您的 extended keycloak data model using jpa entities. For an example see keycloak avatar extension