com.holonplatform.auth.exceptions

## Class AuthenticationException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - java.lang.RuntimeException
      - - com.holonplatform.http.ErrorResponse.ErrorResponseException
        - - com.holonplatform.auth.exceptions.AuthenticationException

- All Implemented Interfaces:
    AuthenticationError, ErrorResponse, Serializable
  Direct Known Subclasses:
    DisabledAccountException, ExpiredCredentialsException, InvalidCredentialsException, InvalidTokenException, LockedAccountException, UnexpectedAuthenticationException, UnknownAccountException, UnsupportedMessageException, UnsupportedTokenException

      public abstract class AuthenticationException
      extends ErrorResponse.ErrorResponseException
      implements AuthenticationError

  Base class for exceptions which may be thrown during authentication
  Since:
    5.0.0
  See Also:
    `Authenticator`, Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface com.holonplatform.http.ErrorResponse

      `ErrorResponse.ErrorResponseException`

  - ### Field Summary

    - ### Fields inherited from interface com.holonplatform.http.ErrorResponse

      `ERROR_CODE_SERIALIZATION_NAME, ERROR_DESCRIPTION_SERIALIZATION_NAME, ERROR_URI_SERIALIZATION_NAME, INVALID_CLIENT, INVALID_REQUEST, INVALID_TOKEN, SERVER_ERROR, TEMPORARY_UNAVAILABLE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AuthenticationException(String errorCode, String errorDescription)` Constructor
    `AuthenticationException(String errorCode, String errorDescription, int httpStatus)` Constructor
    `AuthenticationException(String errorCode, String errorDescription, String errorURI, int httpStatus)` Constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getScheme()` Get authentication scheme
    `void` | `setScheme(String scheme)` Set authentication scheme

    - ### Methods inherited from class com.holonplatform.http.ErrorResponse.ErrorResponseException

      `getErrorCode, getErrorDescription, getErrorURI, getHttpStatus`

    - ### Methods inherited from class java.lang.Throwable

      `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface com.holonplatform.http.ErrorResponse

      `getErrorCode, getErrorDescription, getErrorURI, getHttpStatus`

- - ### Constructor Detail

    - #### AuthenticationException

          public AuthenticationException(String errorCode,
                                         String errorDescription)

      Constructor
      Parameters:
        `errorCode` - Error code
        `errorDescription` - Error description, i.e. a human-readable explanation of this error

    - #### AuthenticationException

          public AuthenticationException(String errorCode,
                                         String errorDescription,
                                         int httpStatus)

      Constructor
      Parameters:
        `errorCode` - Error code
        `errorDescription` - Error description, i.e. a human-readable explanation of this error
        `httpStatus` - HTTP status code to represent error as a HTTP response

    - #### AuthenticationException

          public AuthenticationException(String errorCode,
                                         String errorDescription,
                                         String errorURI,
                                         int httpStatus)

      Constructor
      Parameters:
        `errorCode` - Error code
        `errorDescription` - Error description, i.e. a human-readable explanation of this error
        `errorURI` - Error URI that leads to further details about this error
        `httpStatus` - HTTP status code to represent error as a HTTP response

  - ### Method Detail

    - #### getScheme

          public String getScheme()

      Description copied from interface: `AuthenticationError`
      Get authentication scheme
      Specified by:
        `getScheme` in interface `AuthenticationError`
      Returns:
        Scheme name

    - #### setScheme

          public void setScheme(String scheme)

      Set authentication scheme
      Parameters:
        `scheme` - the scheme to set

Copyright © 2019 The Holon Platform. All rights reserved.