This documentation is for WSO2 Identity Server 5.0.0. View documentation for the latest release.
Recovering Account Information Using a Webapp - Identity Server 5.0.0 - WSO2 Documentation
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

This topic lists out the steps required to configure and run the password recovery sample web application with the WSO2 Identity Server.

Prerequisites

Configuring the sample

  1. Configure the web.xml file with the following.
    1. Specify the "carbonServerUrl" with the URL of the Identity Server. E.g., https://localhost:9443
    2. Specify the credentials to access Identity Server with admin privileges for "accessUsername" and "accessPassword".
    3. Specify the trustStore absolute resource path for "trustStorePath". E.g., path to wso2carbon.jks of the Identity Server
  2. 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="/home/chamath/apps/wso2is-4.5.0-7.18.2-SNAPSHOT/repository/resources/security/wso2carbon.jks" keystorePass="wso2carbon" />
  3. Configure the email confirmation links. The configurations you make in this section depend on what you want to achieve.

    Tip: Refer to the topic on account recovery with notification for a sample email template. See the topic on Self Sign Up and Account Confirmation for a sample email template relevant to that scenario.

    The following configurations provide information on what needs to be configured based on your scenario.

    1. To configure for password reset call back in Identity Server, open the <IS_HOME>/repository/conf/email/email-admin-config.xml file and edit the section with the email type as "passwordReset". This is the confirmation handler path of the user's confirmation.

      <targetEpr>https://localhost:8443/InfoRecoverySample/infoRecover/verify</targetEpr>
    2. To configure account confirmation and self sign up, edit the configuration in the <IS_HOME>/repository/conf/email/email-admin-config.xml file with email type as "accountConfirmation". Following is the call back handler for the sample.

      <targetEpr>https://localhost:8443/InfoRecoverySample/confirmReg</targetEpr>
  4. Configure the following attributes in the <IS_HOME>/repository/conf/security/identity-mgt.properties file in the WSO2 Identity Server.

    Identity.Listener.Enable=true
    Notification.Sending.Enable=true
    Notification.Expire.Time=7200
    Notification.Sending.Internally.Managed=true
    UserAccount.Recovery.Enable=true
    Captcha.Verification.Internally.Managed=true

    See the following table for descriptions of these configurations.

    ConfigurationDescription
    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=7200
    The time specified here is in minutes. In this case, the recovery expires after 7200 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.

To run the sample app you can either directly copy the InfoRecoverySample.war file in the target or build using maven.

Running the sample by deploying the existing .war file

  1. Copy the InfoRecoverySample.war file in the target folder to tomcat's webapp folder.
  2. Start and stop the tomcat server
  3. Configure tomcat as instructed above "Configuration" step.
  4. Start tomcat.
  5. Access the sample with URL - https://localhost:8443/InfoRecoverySample

Building the sample using Apache Maven

Before building the sample, ensure that the following dependencies are satisfied.

  • org.wso2.carbon.identity.mgt.stub
  • org.wso2.carbon.utils
  • org.wso2.carbon.um.ws.api.stub
  • org.wso2.carbon.identity.user.registration.stub
  • org.apache.axis2.wso2
  • org.apache.ws.commons.axiom.wso2

Follow the instructions in the Configuration step above.

  1. Build the sample using Apache Maven by 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.

  2. Copy the .war file that is generated to tomcat webapps.
  • No labels