在发送密码重新设置电子邮件时,我需要在密码重置链接中添加更多参数。目前"用户名","确认码"可用。有没有办法添加更多参数,如租户域名,电子邮件等。
答案 0 :(得分:0)
您可以通过$IS_HOME/repository/conf/email/email-admin-config.xml
文件对其进行配置。编辑此文件以修改“passwordReset”模板/配置,保存文件并重新启动Identity Server。我在这里给出了一个示例,其中包含一个附加参数“firstname”。
<configuration type="passwordReset">
<targetEpr></targetEpr>
<subject>Password Reset Notification</subject>
<body>
Hi {first-name}
We received a request to change the password on the {user-name} account
associated with this email address. If you made this request, please click
the link below to securely change your password:
http://localhost:9443/InfoRecoverySample/infoRecover/verify?confirmation={confirmation-code}&username={user-name}&firstname={first-name}
If clicking the link doesn't seem to work, you can copy and paste the link
into your browser's address window.
If you did not request to have your {user-name} password reset, simply
disregard this email and no changes to your
account will be made.
</body>
<footer>
Best Regards,
WSO2 Carbon Team http://www.wso2.com
</footer>
<redirectPath></redirectPath>
</configuration>
有关详细信息,请参阅this doc。
答案 1 :(得分:0)
要添加租户代码,我们转移到支持其他参数的wso2身份服务器5.1.0(里程碑6)版本。