Class AuthnError.Builder

  • Enclosing class:
    AuthnError

    public static class AuthnError.Builder
    extends Object
    A fluent builder for AuthnError instances.
    Since:
    9.3
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • build

        public AuthnError build()
        Create the authn error.
      • httpStatus

        public AuthnError.Builder httpStatus​(int httpStatus)
        Set the status code.
      • userMessageKey

        public AuthnError.Builder userMessageKey​(String messageKey)
        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 or the pingfederate-messages properties file for the user's locale.
      • userMessage

        public AuthnError.Builder userMessage​(String userMessage)
        Directly set the localized user-facing error message.