Fork me on GitHub

BloomReach Experience Manager Reset Password

This project provides basic reset password functionality.

Code base on GitHub

The code of this project is on GitHub at https://github.com/onehippo-forge/reset-password/.

Installation

Add the Forge repository configuration

In the main pom.xml of the project, in the repositories section, add this repository if it is not configured there yet.

    <repository>
      <id>hippo-forge</id>
      <name>Bloomreach Forge Maven 2 repository.</name>
      <url>https://maven.onehippo.com/maven2-forge/</url>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <releases>
        <updatePolicy>never</updatePolicy>
      </releases>
      <layout>default</layout>
    </repository>
        

Method 1: use Essentials plugin

In the Essentials pom.xml of the project, add following dependency.

     <dependency>
        <groupId>org.bloomreach.forge.resetpassword</groupId>
        <artifactId>reset-password-essentials</artifactId>
        <version>3.0</version>
     </dependency>
        
Now build and run the project; from Essentials choose the Reset Password feature.

Method 2: manual installation

Add version property to the project pom

In the main pom.xml of the project, in the properties section, add this property. For the correct version number, check the Release Notes page.

    <forge.resetpassword.version>version.number</forge.resetpassword.version>
        

Add dependencies to the CMS

Add the following dependencies to the cms/pom.xml:

          <dependency>
            <groupId>org.bloomreach.forge.resetpassword</groupId>
            <artifactId>resetpassword-cms</artifactId>
            <version>${forge.resetpassword.version}</version>
          </dependency>
          
This adds the main dependency.
          <dependency>
            <groupId>org.bloomreach.forge.resetpassword</groupId>
            <artifactId>resetpassword-bootstrap-configuration</artifactId>
            <version>${forge.resetpassword.version}</version>
          </dependency>
          
Registers e-mail module, extended login page and the resetpassword functionality.
          <dependency>
            <groupId>org.bloomreach.forge.resetpassword</groupId>
            <artifactId>resetpassword-bootstrap-content</artifactId>
            <version>${forge.resetpassword.version}</version>
          </dependency>
          
Adds a content document to the repository at /content/documents/resetpassword/password-reset containing all labels and duration configuration.
Note: before version 3.0, the artifacts' groupId was org.onehippo.forge

Update CMS web.xml

Additionally you need to add the following filter and filter-mapping to the CMS' web.xml:

      <filter>
        <filter-name>ResetPassword</filter-name>
        <filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
        <init-param>
          <param-name>applicationClassName</param-name>
          <param-value>org.onehippo.forge.resetpassword.frontend.ResetPasswordMain</param-value>
        </init-param>
        <init-param>
          <param-name>config</param-name>
          <param-value>resetpassword</param-value>
        </init-param>
        <init-param>
          <param-name>wicket.configuration</param-name>
          <param-value>deployment</param-value>
        </init-param>
        <init-param>
          <param-name>repository-address</param-name>
          <param-value>vm://</param-value>
        </init-param>
      </filter>

        <filter-mapping>
          <filter-name>ResetPassword</filter-name>
          <url-pattern>/resetpassword/*</url-pattern>
        </filter-mapping>
              

After installation

Project's YAML module dependencies

The plugin contains a bootstrapping modules with group "bloomreach-forge". Make sure your project bootstraps later than that, by setting after: [hippo-cms, bloomreach-forge] in the hcm-module.yaml file of the repository-data application module.