Interface PasswordValidator

All Known Implementing Classes:
PasswordValidationService

public interface PasswordValidator
Interface for validating password update rules.

Implementations should define the logic to validate password changes, such as checking if the old password matches and whether the new password is different.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    validate(boolean oldPasswordMatches, boolean isSameAsOld)
    Validates password change conditions.
  • Method Details

    • validate

      void validate(boolean oldPasswordMatches, boolean isSameAsOld)
      Validates password change conditions.
      Parameters:
      oldPasswordMatches - indicates whether the provided old password matches the stored one.
      isSameAsOld - indicates whether the new password is the same as the old one.
      Throws:
      RuntimeException - or a custom exception if the validation fails.