This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.
Configuring Sample Application for Identity Management
This topic lists out the steps required to configure and run the password recovery sample web application with the WSO2 Identity Server. This is a sample implementation which uses SOAP services for identity management.
Prerequisites
- WSO2 Identity Server 5.1.0 or a later version installed - This can be downloaded from the WSO2 Identity Server product page and installed by following the instructions in the Installing the Product topic.
- Apache Tomcat 6 - To deploy the sample web application.
- InfoRecoverySample (located inÂ
/is-samples/modules/samples/identity-mgt/info-recovery-sample
 folder) - Follow these instructions to check out the samples folder.Â
Configuring the sample
- Do the following configuration changes to theÂ
<SAMPLE_HOME>/src/main/webapp/WEB-INF/web.xml
 file.Specify theÂ
carbonServerUrl
 as the URL of the Identity Server. The following is an example.<context-param> <param-name>carbonServerUrl</param-name> <param-value>https://localhost:9443/</param-value> </context-param>
Specify the credentials to access Identity Server with admin privileges forÂ
accessUsername
 andÂaccessPassword
. The following is an example with the default WSO2 Identity Server credentials used.<context-param> <param-name>accessUsername</param-name> <param-value>admin</param-value> </context-param> <context-param> <param-name>accessPassword</param-name> <param-value>admin</param-value> </context-param>
Specify the trustStore absolute resource path forÂ
trustStorePath
. The following example specifies the path to wso2carbon.jks of the Identity Server.<context-param> <param-name>trustStorePath</param-name> <param-value>/wso2carbon.jks</param-value> </context-param>
If you are deploying the sample in Apache Tomcat, enable the SSL configuration in theÂ
<TOMCAT_HOME>/conf/server.xml
 file.<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true" maxThreads="150" scheme="https" secure="true" clientAuth="false" sslProtocol="TLS" keystoreFile="[IS_HOME]/repository/resources/security/wso2carbon.jks" keystorePass="wso2carbon" />
*[IS_HOME] should be replaced with the correct installation directory for identity server.
Configure the email confirmation links in theÂ
<IS_HOME>/repository/conf/email/email-admin-config.xml
 file and relevant attributes in theÂ<IS_HOME>/repository/conf/security/identity-mgt.properties
 file. Configurations that we need to do on these files are changed on our use case. See the following use cases and find the required configurations.Recovering accounts using notification or secret question - Refer to the topic on password recovery with notification for a sample email template and the attributes needed in theÂ
identity-mgt.properties
 file.Self sign-up and account confirmation - Refer to the topic on Self-Registration and Account Confirmation for a sample email template and the attributes needed in theÂ
identity-mgt.properties
 file.- Creating Users using the Ask Password Option - Refer to the topic on Creating Users using the Ask Password Option for a sample email template and the attributes needed in theÂ
identity-mgt.properties
 file.
Email conformation link should point to the identity management application. By default its pointing to the accountrecoveryendpoint application, if you have a different application please configure that URL.
https://localhost:9443/accountrecoveryendpoint/confirmrecovery.do?confirmation={{confirmation-code}}&userstoredomain={{userstore-domain}}&username={{url:user-name}}&tenantdomain={{tenant-domain}}
To run the sample app you can build the sample using Apache Maven.
Building the sample using Apache Maven
Before building the sample, ensure that you have followed the instructions in the configuration steps above.
Build the sample using Apache Maven by navigating to the sample's location in the command line and running the following command.
mvn clean install
When building the sample, the Java source code of the project is compiled into class files and packaged into .jar files. The dependencies listed in the project are located in bins so that Tomcat can find and load them. Once the build process is complete, a
targets
folder is created that has the .war file.- Copy the .war file that is generated to theÂ
<TOMCAT_HOME>/webapps
 folder. - Start Apache Tomcat.