mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

neil_a_wilson
17.59.2007 2c7b8d6d8c0c177e8089272140dae66b87852ff7
opends/src/server/org/opends/server/core/PasswordPolicy.java
@@ -175,6 +175,12 @@
  // The number of grace logins that a user may have.
  private int graceLoginCount = DEFAULT_PWPOLICY_GRACE_LOGIN_COUNT;
  // The number of passwords to keep in the history.
  private int historyCount = DEFAULT_PWPOLICY_HISTORY_COUNT;
  // The maximum length of time in seconds to keep passwords in the history.
  private int historyDuration = DEFAULT_PWPOLICY_HISTORY_DURATION;
  // The maximum length of time in seconds that an account may remain idle
  // before it is locked out.
  private int idleLockoutInterval = DEFAULT_PWPOLICY_IDLE_LOCKOUT_INTERVAL;
@@ -812,6 +818,11 @@
    this.stateUpdateFailurePolicy = configuration.getStateUpdateFailurePolicy();
    // Get the password history count and duration.
    this.historyCount    = configuration.getPasswordHistoryCount();
    this.historyDuration = (int) configuration.getPasswordHistoryDuration();
    /*
     *  Holistic validation.
     */
@@ -1115,6 +1126,34 @@
  /**
   * Retrieves the maximum number of previous passwords to maintain in the
   * password history.
   *
   * @return  The maximum number of previous passwords to maintain in the
   *          password history.
   */
  public int getPasswordHistoryCount()
  {
    return historyCount;
  }
  /**
   * Retrieves the maximum length of time in seconds that previous passwords
   * should remain in the password history.
   *
   * @return  The maximum length of time in seconds that previous passwords
   *          should remain in the password history.
   */
  public int getPasswordHistoryDuration()
  {
    return historyDuration;
  }
  /**
   * Indicates whether users with this password policy will be required to
   * authenticate in a secure manner that does not expose their password.
   *
@@ -1739,6 +1778,14 @@
    buffer.append(idleLockoutInterval);
    buffer.append(" seconds");
    buffer.append(EOL);
    buffer.append("History Count:                         ");
    buffer.append(historyCount);
    buffer.append(EOL);
    buffer.append("Update Failure Policy:                 ");
    buffer.append(stateUpdateFailurePolicy.toString());
    buffer.append(EOL);
  }
}