是否可以在密钥斗篷中更改电子邮件内容? [英] Is it possible to change the email content in keycloak?
问题描述
我是Keycloak的新手,我的项目使用Keycloak作为身份验证服务器.目前,我正在项目中进行用户维护,因此,当使用WEB-API在密钥斗篷中创建新用户时,我想向新创建的用户发送电子邮件,说欢迎使用该应用程序,请更新密码.
终点:/admin/realms/{realm}/users/{id}/execute-actions-email
我正在使用上述端点发送更新密码电子邮件,并且正在向该端点传递 UPDATE_PASSWORD
操作.
它可以正确发送电子邮件,但是我想在电子邮件模板中添加欢迎使用应用程序文本,并希望从该模板中删除一些默认文本.
有什么办法可以更改密钥斗篷模板的内容吗?
是的,您必须在位置/opt/keycloak/theme
和列表中的几个文件中进行更改的文件名是
- executeActions.ftl(
/opt/keycloak/themes/base/email/html
) - executeActions.ftl(
/opt/keycloak/themes/base/email/text
) - messages_en.properties(
/opt/keycloak/themes/base/email/messages
)
请记住,如果您使用的是keycloak默认主题,则必须更改这些文件,如果添加了其他主题,请进行相应的更改.
I am new to Keycloak, my project is having keycloak as authentication server. Currently I am developing User maintenance in my project so When new user gets created in keycloak using WEB-API, I wan to send an email to the newly created user, saying welcome to the application and please update your password.
End point: /admin/realms/{realm}/users/{id}/execute-actions-email
I am using the above endpoint to send an update password email and I am passing UPDATE_PASSWORD
action to this endpoint.
And it is sending email correctly but I want to add Welcome to Application text in email template and want remove some default text from that template.
Is there any way to change keycloak template content?
Yes this this possible you have to make the changes in the couple of files in the location /opt/keycloak/theme
and list of files name are
- executeActions.ftl(
/opt/keycloak/themes/base/email/html
) - executeActions.ftl(
/opt/keycloak/themes/base/email/text
) - messages_en.properties(
/opt/keycloak/themes/base/email/messages
)
Remember you have to change these files if you are using keycloak default theme ,if you added some other theme please change accordingly .
这篇关于是否可以在密钥斗篷中更改电子邮件内容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!