如何向 wso2 身份服务器密码重置电子邮件添加更多参数?
How to add more parameters to wso2 identity server password reset email?
在发送密码重新设置电子邮件时,我需要向密码重置添加更多参数 link。目前 "user-name"、"confirmation-code" 可用。有什么方法可以添加更多参数,例如租户域、电子邮件等?
您可以通过$IS_HOME/repository/conf/email/email-admin-config.xml
文件对其进行配置。编辑此文件以修改 "passwordReset" template/configuration,保存文件并重新启动 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了解更多详情。
为了添加租户代码,我们转移到了支持附加参数的 wso2 身份服务器 5.1.0(里程碑 6)版本。
在发送密码重新设置电子邮件时,我需要向密码重置添加更多参数 link。目前 "user-name"、"confirmation-code" 可用。有什么方法可以添加更多参数,例如租户域、电子邮件等?
您可以通过$IS_HOME/repository/conf/email/email-admin-config.xml
文件对其进行配置。编辑此文件以修改 "passwordReset" template/configuration,保存文件并重新启动 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了解更多详情。
为了添加租户代码,我们转移到了支持附加参数的 wso2 身份服务器 5.1.0(里程碑 6)版本。