Package org.springframework.security.core

# Class AuthenticationException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.springframework.security.core.AuthenticationException

All Implemented Interfaces:
  `Serializable`

Direct Known Subclasses:
  `AccountStatusException`, `AuthenticationCredentialsNotFoundException`, `AuthenticationServiceException`, `BadCredentialsException`, `CompromisedPasswordException`, `InsufficientAuthenticationException`, `InvalidOneTimeTokenException`, `ProviderNotFoundException`, `UsernameNotFoundException`

public abstract class AuthenticationException extends RuntimeException
Abstract superclass for all exceptions related to an `Authentication` object being invalid for whatever reason.

See Also:
  - Serialized Form

## Constructor Summary

Constructors
Constructor
Description
`AuthenticationException(String msg)`
Constructs an `AuthenticationException` with the specified message and no root cause.
`AuthenticationException(String msg, Throwable cause)`
Constructs an `AuthenticationException` with the specified message and root cause.

## Method Summary

### 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

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

## Constructor Details

### AuthenticationException

public AuthenticationException(String msg, Throwable cause)
Constructs an `AuthenticationException` with the specified message and root cause.

Parameters:
  `msg` - the detail message
  `cause` - the root cause

### AuthenticationException

public AuthenticationException(String msg)
Constructs an `AuthenticationException` with the specified message and no root cause.

Parameters:
  `msg` - the detail message