Class InvalidCredentialException

All Implemented Interfaces:
Serializable

public class InvalidCredentialException extends CrowdException
Thrown when the supplied credential is not valid.
See Also:
  • Constructor Details

    • InvalidCredentialException

      public InvalidCredentialException()
    • InvalidCredentialException

      public InvalidCredentialException(String message)
    • InvalidCredentialException

      public InvalidCredentialException(String genericMessage, @Nullable String policyDescription, Collection<PasswordConstraint> violatedConstraints)
      Use this constructor when you can identify a specific policy that has been violated. If the policy is not known, use one of the other constructors.
      Parameters:
      genericMessage - a general message describing how this exception happened
      policyDescription - a message describing the policy that has been violated
      violatedConstraints - a list of which constraints were violated to cause the failure
    • InvalidCredentialException

      public InvalidCredentialException(String policyDescription, Collection<PasswordConstraint> violatedConstraints)
    • InvalidCredentialException

      public InvalidCredentialException(String message, Throwable cause)
    • InvalidCredentialException

      public InvalidCredentialException(Throwable throwable)
      Default constructor.
      Parameters:
      throwable - the Exception.
  • Method Details

    • getPolicyDescription

      @Nullable public String getPolicyDescription()
      Returns:
      a description of the policy that has been violated, if available. If such description is not available, this method returns null. In that case, refer to Throwable.getMessage() for a general description of the exception.
    • getViolatedConstraints

      @Nullable public Collection<PasswordConstraint> getViolatedConstraints()
      Returns:
      a list of all the constraints that were violated, or null if the policy that has been violated is not known