Class ErrorCodeValidator.Error

java.lang.Object
org.jose4j.jwt.consumer.ErrorCodeValidator.Error
Enclosing interface:
ErrorCodeValidator

public static class ErrorCodeValidator.Error extends Object
JWT validation error with stable error code and friendly error message
  • Constructor Details

    • Error

      public Error(int errorCode, String errorMessage)
      Creates a new JWT validation error with the given code and message. ErrorCodes has the codes defined in this library. User defined error codes should use negative values so as to avoid potential collisions with error code values used by this library.
      Parameters:
      errorCode - the error code
      errorMessage - the error message
  • Method Details

    • getErrorCode

      public int getErrorCode()
      The error code. ErrorCodes has the codes defined in this library.
      Returns:
      the error code
    • getErrorMessage

      public String getErrorMessage()
      The error message
      Returns:
      the error message
    • toString

      public String toString()
      Overrides:
      toString in class Object