...
Edit the
<IS_HOME>/repository/conf/security/identity-mgt.properties
file with the following configurations.Code Block language java Identity.Listener.Enable=true Notification.Sending.Enable=true Notification.Expire.Time=3 Notification.Sending.Internally.Managed=true UserAccount.Recovery.Enable=true Captcha.Verification.Internally.Managed=false
See the following table for descriptions of these configurations.
Configuration Description Identity.Listener.Enable=true
This enables the identity listener. Notification.Sending.Enable=true
This enables the email sending function when recovering the account and verifying the user creation.
Notification.Expire.Time=3
The time specified here is in minutes. In this case, the recovery expires after three minutes. Notification.Sending.Internally.Managed=true
This enables the internal email sending module. If
false
, the email sending data is available to the application via a Web service. Thus the application can send the email using its own email sender.UserAccount.Recovery.Enable=true
This enables the user account recovery process. Captcha.Verification.Internally.Managed=false
Set this to true
if you do not have an existing captcha validation module.Ensure that the email-admin-config.xml file has the following configurations. This file is found in the
<IS_HOME>/repository/conf/email
directory. Use the email format with the type “passwordReset
”.Code Block language html/xml <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: httpshttp://localhost:84439443/InfoRecoverySample/infoRecover/verify?confirmation={confirmation-code} &username={user-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>
The email sent to user includes the
{confirmation-code}
, which the Identity Server API caller needs to pass along with the user name.Edit the axis.xml file with the following configuration. This file is found in the
<IS_HOME>/repository/conf/axis2/
directory. Uncomment the following in the file and provide the necessary email settings.Code Block language html/xml <transportSender name="mailto" class="org.apache.axis2.transport.mail.MailTransportSender"> <parameter name="mail.smtp.from">sampleemail@gmail.com</parameter> <parameter name="mail.smtp.user">sampleemail</parameter> <parameter name="mail.smtp.password">password</parameter> <parameter name="mail.smtp.host">smtp.gmail.com</parameter> <parameter name="mail.smtp.port">587</parameter> <parameter name="mail.smtp.starttls.enable">true</parameter> <parameter name="mail.smtp.auth">true</parameter> </transportSender>
...