Fork me on GitHub

Hippo CMS 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/bloomreach-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>
        

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 use this plugin add a plugin version to your main pom properties and add the following dependencies:

/pom.xml

          <dependency>
            <groupId>org.onehippo.forge</groupId>
            <artifactId>resetpassword</artifactId>
            <version>${forge.resetpassword.version}</version>
          </dependency>
          
This adds the main dependency

/bootstrap/configuration/pom.xml

          <dependency>
            <groupId>org.onehippo.forge</groupId>
            <artifactId>resetpassword-bootstrap-configuration</artifactId>
            <version>${forge.resetpassword.version}</version>
          </dependency>
          
Registers e-mail module, extended login page and the resetpassword functionality.

/bootstrap/content/pom.xml

          <dependency>
            <groupId>org.onehippo.forge</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.

/cms/pom.xml

          <dependency>
            <groupId>org.onehippo.forge</groupId>
            <artifactId>resetpassword-cms</artifactId>
            <version>${forge.resetpassword.version}</version>
          </dependency>
          
Add cms functionality.

Update CMS web.xml

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

/cms/src/main/webapp/WEB-INF/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>