Class AuthenticationException

All Implemented Interfaces:
Serializable, Loggable
Direct Known Subclasses:
CredentialsExpiredException

public class AuthenticationException extends LoginFailedException
Thrown by an AuthenticationProvider that vetoes the credentials it was given.

The AuthenticationManager throws it as well, if no provider authenticated the credentials, or if the user could not be resolved because no UserResolver is configured.

It extends LoginFailedException so that clients handling a failed login — most notably the desktop client's LoginFailedHandler — treat it like any other refused login.

A provider that simply is not responsible for the credentials must not throw: it returns null to abstain and let the next provider in the chain try.

Author:
harald
See Also:
  • Constructor Details

    • AuthenticationException

      public AuthenticationException(String message)
      Constructs a new authentication exception with the specified detail message.
      Parameters:
      message - the detail message
    • AuthenticationException

      public AuthenticationException(String message, Throwable cause)
      Constructs a new authentication exception with the specified detail message and cause.
      Parameters:
      message - the detail message
      cause - the cause
    • AuthenticationException

      public AuthenticationException()
      Constructs a new authentication exception.
      No-args constructor mainly for serialization.