Class LengthBasedPasswordValidator

    • Constructor Detail

      • LengthBasedPasswordValidator

        public LengthBasedPasswordValidator()
        Creates a new instance of this password validator.
    • Method Detail

      • passwordIsAcceptable

        public boolean passwordIsAcceptable​(ByteString newPassword,
                                            Set<ByteString> currentPasswords,
                                            Operation operation,
                                            Entry userEntry,
                                            LocalizableMessageBuilder invalidReason)
        Description copied from class: PasswordValidator
        Indicates whether the provided password is acceptable for use by the specified user. If the password is determined to be unacceptable, then a human-readable explanation should be appended to the provided buffer.
        Specified by:
        passwordIsAcceptable in class PasswordValidator<LengthBasedPasswordValidatorCfg>
        Parameters:
        newPassword - The proposed clear-text password that should be validated.
        currentPasswords - The set of clear-text current passwords for the user (if available). Note that the current passwords may not always be available, and this may not comprise entire set of passwords currently for the user.
        operation - The operation that is being used to set the password. It may be an add, a modify, or a password modify operation.
        userEntry - The entry for the user whose password is being changed.
        invalidReason - The buffer to which the human-readable explanation should be appended if it is determined that the password is not acceptable.
        Returns:
        true if the password is acceptable, or false if not.
      • isConfigurationAcceptable

        public boolean isConfigurationAcceptable​(LengthBasedPasswordValidatorCfg configuration,
                                                 List<LocalizableMessage> unacceptableReasons)
        Description copied from class: PasswordValidator
        Indicates whether the provided configuration is acceptable for this password validator. It should be possible to call this method on an uninitialized password validator instance in order to determine whether the password validator would be able to use the provided configuration.
        Overrides:
        isConfigurationAcceptable in class PasswordValidator<LengthBasedPasswordValidatorCfg>
        Parameters:
        configuration - The password validator configuration for which to make the determination.
        unacceptableReasons - A list that may be used to hold the reasons that the provided configuration is not acceptable.
        Returns:
        true if the provided configuration is acceptable for this password validator, or false if not.
      • createPasswordQualityCriteria

        public com.forgerock.opendj.ldap.controls.PasswordQualityAdviceResponseControl.Criteria createPasswordQualityCriteria()
        Description copied from class: PasswordValidator
        Returns a password quality criteria corresponding to the type and parameters of this validator for use in a PasswordQualityAdviceResponseControl.
        Specified by:
        createPasswordQualityCriteria in class PasswordValidator<LengthBasedPasswordValidatorCfg>
        Returns:
        A password quality criteria corresponding to the type and parameters of this validator.