org.springframework.security.core
Class AuthenticationException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.springframework.security.core.AuthenticationException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AccountStatusException, AuthenticationCancelledException, AuthenticationCredentialsNotFoundException, AuthenticationServiceException, BadCredentialsException, InsufficientAuthenticationException, NonceExpiredException, PreAuthenticatedCredentialsNotFoundException, ProviderNotFoundException, RememberMeAuthenticationException, SessionAuthenticationException, 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
AuthenticationException(String msg)
          Constructs an AuthenticationException with the specified message and no root cause.
AuthenticationException(String msg, Object extraInformation)
          Deprecated. Use the exception message or use a custom exception if you really need additional information.
AuthenticationException(String msg, Throwable t)
          Constructs an AuthenticationException with the specified message and root cause.
 
Method Summary
 void clearExtraInformation()
          Deprecated. 
 Authentication getAuthentication()
          The authentication request which this exception corresponds to (may be null)
 Object getExtraInformation()
          Deprecated. Use the exception message or use a custom exception if you really need additional information.
 void setAuthentication(Authentication authentication)
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AuthenticationException

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

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

AuthenticationException

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

Parameters:
msg - the detail message

AuthenticationException

@Deprecated
public AuthenticationException(String msg,
                                          Object extraInformation)
Deprecated. Use the exception message or use a custom exception if you really need additional information.

Method Detail

getAuthentication

public Authentication getAuthentication()
The authentication request which this exception corresponds to (may be null)


setAuthentication

public void setAuthentication(Authentication authentication)

getExtraInformation

@Deprecated
public Object getExtraInformation()
Deprecated. Use the exception message or use a custom exception if you really need additional information.

Any additional information about the exception. Generally a UserDetails object.

Returns:
extra information or null

clearExtraInformation

@Deprecated
public void clearExtraInformation()
Deprecated.