Class AbstractPasswordService.StrengthValidatorResult

java.lang.Object
eu.webtoolkit.jwt.auth.AbstractPasswordService.StrengthValidatorResult
Enclosing interface:
AbstractPasswordService

public static class AbstractPasswordService.StrengthValidatorResult
extends java.lang.Object
Result returned when validating password strength.

This class contains information on the validity and the strength of the password together with possible messages. When the password is considered not strong enough, a message should be provided which helps the user pick a stronger password.

See Also:
AbstractPasswordService.AbstractStrengthValidator.evaluateStrength(String password, String loginName, String email)
  • Constructor Summary

    Constructors
    Constructor Description
    StrengthValidatorResult​(boolean valid, java.lang.CharSequence message, int strength)
    Constructor.
  • Method Summary

    Modifier and Type Method Description
    WString getMessage()
    Returns a message describing the password strength.
    int getStrength()
    Returns the password strength in a scale of 0 to 5.
    boolean isValid()
    Returns whether the password is considered strong enough.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • StrengthValidatorResult

      public StrengthValidatorResult​(boolean valid, java.lang.CharSequence message, int strength)
      Constructor.
  • Method Details

    • isValid

      public boolean isValid()
      Returns whether the password is considered strong enough.
    • getMessage

      public WString getMessage()
      Returns a message describing the password strength.
    • getStrength

      public int getStrength()
      Returns the password strength in a scale of 0 to 5.