Class TerminateAuthenticationChainException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.springframework.security.core.AuthenticationException
org.springframework.security.authentication.AccountStatusException
com.appiancorp.suiteapi.security.auth.TerminateAuthenticationChainException
- All Implemented Interfaces:
Serializable
public final class TerminateAuthenticationChainException
extends org.springframework.security.authentication.AccountStatusException
This exception could be thrown by an AuthenticationProvider
to stop authenticating against other available AuthenticationProviders and
immediately fail authentication.
To instantiate this exception, one must provide an AuthenticationException as the
cause, which will then be handled appropriately by the framework.
For instance, if an AuthenticationProvider decides to terminate the chain of
authentication against all the available AuthenticationProviders due to failed
authentication, it can throw a new TerminateAuthenticationChainException with
BadCredentialsException as the cause. Following is a sample code snippet to do so:
AuthenticationException cause = new BadCredentialsException("invalid credentials");
throw new TerminateAuthenticationChainException(cause);
- See Also:
-
BadCredentialsExceptionLockedExceptionTemporaryCredentialsExpiredExceptionAuthenticationException- Serialized Form
-
Constructor Summary
ConstructorsConstructorDescriptionTerminateAuthenticationChainException(org.springframework.security.core.AuthenticationException cause) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.core.AuthenticationExceptiongetCause()Methods inherited from class org.springframework.security.core.AuthenticationException
getAuthenticationRequest, setAuthenticationRequestMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
TerminateAuthenticationChainException
public TerminateAuthenticationChainException(org.springframework.security.core.AuthenticationException cause) - Parameters:
cause- anAuthenticationException- Throws:
NullPointerException- this exception will be thrown if the cause is null
-
-
Method Details