Class AuthnError

    • Constructor Detail

      • AuthnError

        public AuthnError()
        Create a new instance.
      • AuthnError

        public AuthnError​(int httpStatus,
                          String code,
                          String message)
        Create an instance with the specified parameters.
        Parameters:
        httpStatus - The HTTP status code.
        code - The error code string.
        message - The error message.
      • AuthnError

        public AuthnError​(int httpStatus,
                          String code,
                          String message,
                          List<AuthnErrorDetail> details)
        Create an instance with the specified parameters.
        Parameters:
        httpStatus - The HTTP status code.
        code - The error code string.
        message - The error message.
        details - The details of the error.
    • Method Detail

      • getHttpStatus

        public int getHttpStatus()
        Get the HTTP status code.
      • setHttpStatus

        public void setHttpStatus​(int httpStatus)
        Set the HTTP status code.
      • getCode

        public String getCode()
        Get the error code.
      • setCode

        public void setCode​(String code)
        Set the error code.
      • getMessage

        public String getMessage()
        Get the developer-facing error message.
      • setMessage

        public void setMessage​(String message)
        Set the developer-facing error message.
      • getUserMessage

        public String getUserMessage()
        Get the user-facing error message. A user-facing error message should be provided for any error likely to be displayed to the end user. A localizable message key can be provided with setUserMessageKey() or the localized error message can be directly set with setUserMessage().
      • setUserMessageKey

        public void setUserMessageKey​(String userMessageKey)
        Set the user-facing error message key. In the JSON serialization this key will automatically be converted to a localized string if a corresponding message is defined in the authn-api-messages properties file for the user's locale.
      • getUserMessageKey

        public String getUserMessageKey()
        Get the user-facing error message key.
      • setUserMessage

        public void setUserMessage​(String userMessage)
        Directly set the localized user-facing error message.
      • setState

        public void setState​(String state)
        Set the cookieless state value.
        Specified by:
        setState in interface WithStateAttributeSupport
        Parameters:
        state - the cookieless state value
        Since:
        12.1